CAknEnumeratedTextSettingItem Class Reference

#include <mw/aknsettingitemlist.h>

class CAknEnumeratedTextSettingItem : public CAknSettingItem

Inherits from

Public Member Functions
CAknEnumeratedTextSettingItem(TInt)
~CAknEnumeratedTextSettingItem()
IMPORT_C CArrayPtr< CAknEnumeratedText > *EnumeratedTextArray()
virtual IMPORT_C voidHandleTextArrayUpdateL()
IMPORT_C TIntIndexFromValue(TInt)
IMPORT_C TIntNumberOfItems()
IMPORT_C CArrayPtr< HBufC > *PoppedUpTextArray()
IMPORT_C voidSetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *, CArrayPtr< HBufC > *)
Protected Member Functions
virtual IMPORT_C voidCompleteConstructionL()
IMPORT_C voidSetSettingPageTextL()
IMPORT_C CDesCArray *SettingPageTextArray()
Inherited Enumerations
CAknSettingItem:TFlags
CAknSettingItem:TSettingItemProtection
Inherited Functions
CAknSettingItem::AssociatedResourceId()const
CAknSettingItem::CAknSettingItem(TInt)
CAknSettingItem::ConstructL(const TBool,const TInt,const TDesC &,CArrayPtr< CGulIcon > *,const TInt,const TInt,const TInt,const TInt)
CAknSettingItem::CreateBitmapL()
CAknSettingItem::EditItemL(TBool)
CAknSettingItem::EditorControlType()const
CAknSettingItem::EmptyItemText()const
CAknSettingItem::HandleSettingPageEventL(CAknSettingPage *,TAknSettingPageEvent)
CAknSettingItem::HasIcon()const
CAknSettingItem::Identifier()const
CAknSettingItem::IsHidden()const
CAknSettingItem::IsNumberedStyle()const
CAknSettingItem::ListBoxText()
CAknSettingItem::LoadL()
CAknSettingItem::ProtectionState()
CAknSettingItem::SetCompulsoryIndTextL(const TDesC &)
CAknSettingItem::SetEmptyItemTextL(const TDesC &)
CAknSettingItem::SetHidden(TBool)
CAknSettingItem::SetIconMask(CFbsBitmap *)
CAknSettingItem::SetIconMaskAndReturnBitmap(CGulIcon *)
CAknSettingItem::SetParentListBox(const CEikFormattedCellListBox *)
CAknSettingItem::SetProtectionState(CAknSettingItem::TSettingItemProtection)
CAknSettingItem::SetSettingPage(CAknSettingPage *)
CAknSettingItem::SetSettingPageFlags(TInt)
CAknSettingItem::SetUpStandardSettingPageL()
CAknSettingItem::SettingEditorResourceId()const
CAknSettingItem::SettingName()
CAknSettingItem::SettingNumber()const
CAknSettingItem::SettingPage()const
CAknSettingItem::SettingPageFlags()const
CAknSettingItem::SettingPageResourceId()const
CAknSettingItem::SettingTextL()
CAknSettingItem::StoreL()
CAknSettingItem::UpdateListBoxTextL()
CAknSettingItem::VisibleIndex()
CAknSettingItem::~CAknSettingItem()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Detailed Description

CAknEnumeratedTextSettingItem

Abstract Base class for deriving listbox setting page related setting items

The class provides standard array support for these setting items and their listboxes. Then approach is centred upon the CAknEnumeratedText type.

The texts are exposed to the user, and appear in two versions, if desired - the text shown in the setting list when not being edited, and the "popped-up" version of the texts.

Constructor & Destructor Documentation

CAknEnumeratedTextSettingItem ( TInt )

IMPORT_CCAknEnumeratedTextSettingItem(TIntaResourceId)

Constructor. Resource Id for the setting item

~CAknEnumeratedTextSettingItem ( )

IMPORT_C~CAknEnumeratedTextSettingItem()

Destructor

Member Function Documentation

CompleteConstructionL ( )

IMPORT_C voidCompleteConstructionL()[protected, virtual]

Virtual method called by framework to complete the construction. In this class, the two arrays, pointers to which can be obtained by calling EnumeratedTextArray() and PoppedUpTextArray() are created.

EnumeratedTextArray ( )

IMPORT_C CArrayPtr< CAknEnumeratedText > *EnumeratedTextArray()const

Access to the enumerated text array. Texts here are used in the setting item list display. No ownership of the array or its contents is transferred

Returns: a pointer to an array of HBufC*s

HandleTextArrayUpdateL ( )

IMPORT_C voidHandleTextArrayUpdateL()[virtual]

Called to execute any code that might need to run when the text arrays are replaced. This class has a null implementation

IndexFromValue ( TInt )

IMPORT_C TIntIndexFromValue(TIntaInputValue)const

Routine to find the index in the enumerated text list that corresponds to the value passed in.

ParameterDescription
aInputValuevalue to search for in the enumerated items

Returns: 0 - based index in the item found. -1 if not found.

NumberOfItems ( )

IMPORT_C TIntNumberOfItems()const

Access to the number of items in the arrays

Returns: The number of items in the array returned by EnumeratedTextArray()

PoppedUpTextArray ( )

IMPORT_C CArrayPtr< HBufC > *PoppedUpTextArray()const

Access to the "popped up" array of texts. They may be defined differently from those in the enumerated text array so that the setting page items can be different from those displayed in the setting item editing list No ownership of the array or its contents is transferred

Returns: a pointer to an array of HBufC*s

SetEnumeratedTextArrays ( CArrayPtr< CAknEnumeratedText > *, CArrayPtr< HBufC > * )

IMPORT_C voidSetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *aEnumeratedTextArray,
CArrayPtr< HBufC > *PoppedUpTextArray
)

Set the enumerated arrays. Ownership of these arrays and their contents is wholly given over to the setting item object. The client must call HandleTextArrayUpdateL() after making this call.

After calling SetEnumeratedTextArrays(), it is the client code's responsibility to ensure that the current value of the external Tint value corresponds to one of the enumerated texts. This can be done, for instance, after calling SetEnumeratedTextArrays() by calling IndexFromValue() and ensuring a return value of a valid index (not -1 ). Otherwise, there will be a panic in HandleTextArrayUpdateL() when it is called.

This call transfers the ownership of the arrays, and the items pointed to by the arrays

ParameterDescription
aEnumeratedTextArrayarray of Integer-Text pairs to be the new basis for display This is the master array, and its Count() determines the number of entries to display

SetSettingPageTextL ( )

IMPORT_C voidSetSettingPageTextL()[protected]

Implementors of subclasses can call this non-virtual method to set up the list of texts to be used for the setting page. (Although it is not useful for CAknCheckBoxSettingPage) The list is constructed from the contents of the two text arrays, EnumeratedTextArray() and PoppedUpTextArray(). This is usually to be done "On the fly" immediately prior to the raising of a setting page.

SettingPageTextArray ( )

IMPORT_C CDesCArray *SettingPageTextArray()const [protected]

Accessor for the setting page text array