#include <mw/aknsettingitemlist.h>
class CAknEnumeratedTextSettingItem : public CAknSettingItem |
Public Member Functions | |
---|---|
CAknEnumeratedTextSettingItem(TInt) | |
~CAknEnumeratedTextSettingItem() | |
IMPORT_C CArrayPtr< CAknEnumeratedText > * | EnumeratedTextArray() |
virtual IMPORT_C void | HandleTextArrayUpdateL() |
IMPORT_C TInt | IndexFromValue(TInt) |
IMPORT_C TInt | NumberOfItems() |
IMPORT_C CArrayPtr< HBufC > * | PoppedUpTextArray() |
IMPORT_C void | SetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *, CArrayPtr< HBufC > *) |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | CompleteConstructionL() |
IMPORT_C void | SetSettingPageTextL() |
IMPORT_C CDesCArray * | SettingPageTextArray() |
Inherited Enumerations | |
---|---|
CAknSettingItem:TFlags | |
CAknSettingItem:TSettingItemProtection |
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.
IMPORT_C | CAknEnumeratedTextSettingItem | ( | TInt | aResourceId | ) |
Constructor. Resource Id for the setting item
IMPORT_C void | CompleteConstructionL | ( | ) | [protected, virtual] |
Reimplemented from CAknSettingItem::CompleteConstructionL()
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.
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
IMPORT_C void | HandleTextArrayUpdateL | ( | ) | [virtual] |
Called to execute any code that might need to run when the text arrays are replaced. This class has a null implementation
IMPORT_C TInt | NumberOfItems | ( | ) | const |
Access to the number of items in the arrays
Returns: The number of items in the array returned by EnumeratedTextArray()
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
IMPORT_C void | SetEnumeratedTextArrays | ( | 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
Parameter | Description |
---|---|
aEnumeratedTextArray | array 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 |
IMPORT_C void | SetSettingPageTextL | ( | ) | [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.
IMPORT_C CDesCArray * | SettingPageTextArray | ( | ) | const [protected] |
Accessor for the setting page text array