×
Namespaces

Variants
Actions
(Difference between revisions)

Determining the current editing state of a Symbian app

From Nokia Developer Wiki
Jump to: navigation, search
extkbeditor1 (Talk | contribs)
m
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot change of template (Template:KnowledgeBase) - now using Template:ArticleMetaData)
Line 5: Line 5:
 
[[Category:Technical Solution]]
 
[[Category:Technical Solution]]
  
{{KnowledgeBase
+
{{ArticleMetaData
 
|id=TSS000459
 
|id=TSS000459
 
|platform=S60 3rd Edition
 
|platform=S60 3rd Edition
Line 13: Line 13:
 
|creationdate=October 19, 2006
 
|creationdate=October 19, 2006
 
|keywords=
 
|keywords=
 +
 +
|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:Technical writer 2]]
 
}}
 
}}
  

Revision as of 14:19, 24 June 2011

Template:KBTS

Article Metadata
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 2 (19 Oct 2006)
Last edited: hamishwillee (24 Jun 2011)

Overview

Determining the current editing state of an S60 application

Description

S60 applications can get the current editing state. This information is displayed as an editing state indicator in the status pane. Some applications may want to indicate the editing state in a custom way in, e.g., their main pane. The following code snippet can be used to handle such situations.

Solution

The solution is to use the CAknEnv class to get the current editing state indicator.
//------------------------------------------------------------------------------
struct S_uid: public TUid
  {
  S_uid(int i){ iUid = i; }
  };
//Get a reference the indicator container using the CAKnEnv class.
MAknEditingStateIndicator *ei = CAknEnv::Static()->EditingStateIndicator();
CAknIndicatorContainer *ic = ei->IndicatorContainer();
//Check which editing state is active
if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorT9)))
    {
    // T9 Mode
    ...
    }
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorQuery)))
    {
    // Pen Mode
    ...
    }

const char *cp;
if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorLowerCase)))
    {
    // Lower case alphabet mode
    ...
    }
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorUpperCase)))
    {
     // Upper case alphabet mode
    ...
    }
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorTextCase)))
    {
     // Text Auto-case mode (Abc)
    ...
    }
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorNumberCase)))
    {
    // Numeric mode
    ...
    }
//------------------------------------------------------------------------------

59 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.

×