×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:How to Use CAknSliderSettingPage for creating dynamic slider

From Nokia Developer Wiki
Jump to: navigation, search
debjit.roy (Talk | contribs)
(Debjit.roy -)
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Move into Archived namespace)
Line 1: Line 1:
[[Category:Symbian C++]][[Category:S60 3rd Edition]][[Category:S60 3rd Edition]][[Category:How To]]
+
{{Archived|timestamp=20120313112701|user=roy.debjit| }}
<div align="right">'''Reviewer Approved''' &nbsp;&nbsp; [[File:Thumbs_up_icon_sm.jpg|31x38px]]</div>
+
[[Category:Symbian C++]][[Category:S60 3rd Edition (initial release)]][[Category:S60 3rd Edition (initial release)]][[Category:How To]]
{{ArticleMetaData
+
<div align="right">'''Reviewer Approved''' &nbsp;&nbsp; [[File:Thumbs up icon sm.jpg|31x38px]]</div>
|id=
+
{{ArticleMetaData <!-- v1.2 -->
 +
|sourcecode= [[Media:HelloWorld(SliderSettingPage).zip]]
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 +
|devices= S60
 +
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
 
|platform= Symbian
 
|platform= Symbian
|devices= S60
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|category= Symbian C++
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= CAknSliderSettingPage, CAknSlider
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20090928
 +
|author= [[User:Chenziteng]]
 +
<!-- The following are not in current metadata -->
 
|subcategory= S60 3rd Edition
 
|subcategory= S60 3rd Edition
|creationdate=September 27, 2009
 
|keywords= CAknSliderSettingPage, CAknSlider
 
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
 
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
 
|author=[[User:Chenziteng]]
 
 
}}
 
}}
{{Archived|timestamp=20120313112701|user=roy.debjit| }}
 
  
 
Class '''CAknSliderSettingPage''' provides functionality to create slider setting page on S60 3rd Edition phones and you can implement it in your application as follows.<br>
 
Class '''CAknSliderSettingPage''' provides functionality to create slider setting page on S60 3rd Edition phones and you can implement it in your application as follows.<br>
Line 95: Line 102:
  
 
[[File:CAknSliderSettingPage.PNG]]
 
[[File:CAknSliderSettingPage.PNG]]
 +
[[Category:Code Examples]]

Revision as of 04:20, 19 June 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Reviewer Approved    Thumbs up icon sm.jpg
Article Metadata
Code ExampleTested with
Devices(s): S60
CompatibilityArticle
Keywords: CAknSliderSettingPage, CAknSlider
Created: chenziteng (28 Sep 2009)
Last edited: hamishwillee (19 Jun 2012)

Class CAknSliderSettingPage provides functionality to create slider setting page on S60 3rd Edition phones and you can implement it in your application as follows.

RSG File:

// YouRssFile.rsg
...
// begin by chen
#define qtn_my_slider_item_title "Test"
#define STRING_r_minimum "Min"
#define STRING_r_maximum "Max"
 
// "S60 slider incomplete resource causes out of memory failure"
// http://www.developer.nokia.com/Community/Discussion/showthread.php?108981-S60-slider-incomplete-resource-causes-out-of-memory-failure
RESOURCE AVKON_SETTING_PAGE r_my_slider_item_setting_page
{
label = qtn_my_slider_item_title;
type = EAknCtSlider;
editor_resource_id = r_my_slider_item_slider;
}
 
RESOURCE SLIDER r_my_slider_item_slider
{
layout = EAknSettingsItemSliderLayout;
minvalue = 0;
maxvalue = 10;
step = 1;
valuetype = EAknSliderValueBareFigure;
minlabel = STRING_r_minimum;
maxlabel = STRING_r_maximum;
}
// end by chen
//...

cpp file.

// .cpp

...
// begin by chen
#include <YourRssFile.rsg> // R_MY_SLIDER_ITEM_SETTING_PAGE
#include <AknSliderSettingPage.h> // CAknSliderSettingPage
// end by chen
//...
// begin by chen
TInt value = 0;
CAknSliderSettingPage* ssp = new(ELeave) CAknSliderSettingPage(R_MY_SLIDER_ITEM_SETTING_PAGE, value);
CleanupStack::PushL(ssp);
ssp->ConstructL();
CleanupStack::Pop(ssp);
// begin, change the slider range programically
CAknSlider* slider = ssp->SliderControl();
if(slider!=NULL)
{
slider->SetRange(0,100);
}
// end
TBool ret = ssp->ExecuteLD();
if(ret)
{
// value is the slider value
// do someting to handle it
}
// end by chen
...

Source Code:

Full example: HelloWorld(SliderSettingPage).zip

Screenshots:

CAknSliderSettingPage.PNG

65 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×