CAknIntegerSettingPage Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <akntextsettingpage.h>

Inherits CAknEdwinSettingPage.


Detailed Description

Setting page specialized for display of CAknIntegerEdwin.

Public Types

enum   TAknIntegerSettingPageFlags {
  EInvalidValueNotOffered = 0x0, EEmptyValueAllowed = 0x0000001, EInvalidValueAllowed = 0x0000002, ENoInitialSelection = 0x0000004,
  EPutCursorAtBeginning = 0x0000008
}

Public Member Functions

IMPORT_C  CAknIntegerSettingPage (TInt aResourceID, TInt &aValue, TInt aTextSettingPageFlags=0)
IMPORT_C  CAknIntegerSettingPage (const TDesC *aSettingTitleText, TInt aSettingNumber, TInt aControlType, TInt aEditorResourceId, TInt aSettingPageResourceId, TInt &aValue, TInt aIntegerSettingPageFlags=0)
  Constructor that allows separate setting page and editor resources.
virtual IMPORT_C void  ConstructL ()
  2nd stage construction for this specific type.
IMPORT_C CAknIntegerEdwin IntegerEditorControl ()
  Type-specific access to the hosted editor.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.

Protected Member Functions

virtual IMPORT_C void  DynamicInitL ()
  Called immediately prior to activation of the dialog.
virtual IMPORT_C void  UpdateSettingL ()
  Called when something has changed and the client's object needs to have its value updated.
virtual IMPORT_C void  RestoreOriginalSettingL ()
  Called when the user rejects the setting.
virtual IMPORT_C void  CheckAndSetDataValidity ()
  Framework method to set the validity of the data This is called when the data changes.
virtual IMPORT_C void  UpdateCbaL ()
  This framework method is used to update the contents of the CBA in a custom way.
virtual IMPORT_C void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
  From MCoeControlObserver: Acts upon changes in the hosted control's state.
virtual IMPORT_C void  SizeChanged ()
  From CCoeControl This routine is called as part of the set-up of the control.
virtual IMPORT_C void  WriteInternalStateL (RWriteStream &aWriteStream) const
  Writes the internal state of the control and its components to aStream.

Member Enumeration Documentation

enum CAknIntegerSettingPage::TAknIntegerSettingPageFlags
 
Enumerator:
EInvalidValueNotOffered 
EEmptyValueAllowed 
EInvalidValueAllowed 
ENoInitialSelection 
EPutCursorAtBeginning 

Constructor & Destructor Documentation

IMPORT_C CAknIntegerSettingPage::CAknIntegerSettingPage TInt  aResourceID,
TInt &  aValue,
TInt  aTextSettingPageFlags = 0
 
IMPORT_C CAknIntegerSettingPage::CAknIntegerSettingPage const TDesC *  aSettingTitleText,
TInt  aSettingNumber,
TInt  aControlType,
TInt  aEditorResourceId,
TInt  aSettingPageResourceId,
TInt &  aValue,
TInt  aIntegerSettingPageFlags = 0
 

Constructor that allows separate setting page and editor resources.

This constructor allows the use of setting page using only the editor resource. Other combinations are also possible

In all cases the number (if supplied i.e. <> 0 ) is used.

Editor Resource Setting Page Resource present present Both are used (but text & number overridden) = 0 present Editor resource is used via SP resource (Effectively like the other constructor) present = 0 Default Avkon SP resource if used + this editor resource = 0 = 0 uses default resource for both SP and editor. This is OK if: i) control type is present, ii) a default resource exists ( OK for text, integer, date, time, duration )

Note: The first argument is a TDesC* (rather than TDesC&) because the other constructor cannot initialize such a member without allocation or having an internal dummy buffer.

Rules for text and numbers: The rules are the same for both: (non-zero length) text or number other than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource (unless that is zero length or EAknSettingPageNoOrdinalDisplayed). Note, however, that text or number given via the specific API for setting them, WILL override resource. It is assumed that number from resource is very rare. Special text is somewhat more likely.

Parameters:
aSettingTitleText  Text at top of setting pane; OWNED EXTERNALLY
aSettingNumber  Number at top left (if present)
aControlType  Determines the type constructed and how its resource is read
aEditorResourceId  Editor resource to use in the setting page (if present)
aSettingPageResourceId  Setting Page to use (if present)
aValue  Reference to integer value for editing
aIntegerSettingPageFlags  option flags for miscellaneous things

Member Function Documentation

virtual IMPORT_C void CAknIntegerSettingPage::CheckAndSetDataValidity  )  [protected, virtual]
 

Framework method to set the validity of the data This is called when the data changes.

May be over-ridden to change the validation rules.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::ConstructL  )  [virtual]
 

2nd stage construction for this specific type.

Call BaseConstructL in CAknSettingPage, where the object is constructed from resource.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::DynamicInitL  )  [protected, virtual]
 

Called immediately prior to activation of the dialog.

Framework routine for derived classes.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[protected, virtual]
 

From MCoeControlObserver: Acts upon changes in the hosted control's state.

The implementation of this class is trivial and should be able to be safely re-implemented in directly client-derived classes. For non-base setting page classes, a call to the base class should be made

Parameters:
aControl  The control changing its state (not used)
aEventType  The type of control event

Reimplemented from CAknSettingPage.

IMPORT_C void CAknIntegerSettingPage::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events

Reimplemented from CAknEdwinSettingPage.

IMPORT_C CAknIntegerEdwin* CAknIntegerSettingPage::IntegerEditorControl  ) 
 

Type-specific access to the hosted editor.

Returns:
CAknIntegerEdwin* pointer to the current hosted editor
virtual IMPORT_C void CAknIntegerSettingPage::RestoreOriginalSettingL  )  [protected, virtual]
 

Called when the user rejects the setting.

A backup copy may need to be restored if UpdateWhenChanged flag was set

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::SizeChanged  )  [protected, virtual]
 

From CCoeControl This routine is called as part of the set-up of the control.

It is the place to put layout code.

Implements CAknEdwinSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::UpdateCbaL  )  [protected, virtual]
 

This framework method is used to update the contents of the CBA in a custom way.

Some setting page classes implement a degree of validation and will implement this. Derived classes should ensure that this is being called frequently enough for their purposes.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::UpdateSettingL  )  [protected, virtual]
 

Called when something has changed and the client's object needs to have its value updated.

Reimplemented from CAknSettingPage.

virtual IMPORT_C void CAknIntegerSettingPage::WriteInternalStateL RWriteStream &  aWriteStream  )  const [protected, virtual]
 

Writes the internal state of the control and its components to aStream.

Does nothing in release mode. Designed to be overidden and base called by subclasses.

Parameters:
aWriteSteam  A connected write stream

Reimplemented from CAknSettingPage.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top