CAknSettingItem Class Reference

#include <mw/aknsettingitemlist.h>

class CAknSettingItem : public CBase

Inherits from

  • CAknSettingItem
    Public Member Enumerations
    enumTFlags { EIsHidden, EHasIcon, EIsNumberedStyle, ENoProtection, ..., EProtected }
    enumTSettingItemProtection { ENoSettingItemProtection, ESettingItemViewOnly, ESettingItemProtected }
    Public Member Functions
    CAknSettingItem(TInt)
    ~CAknSettingItem()
    IMPORT_C voidConstructL(const TBool, const TInt, const TDesC &, CArrayPtr< CGulIcon > *, const TInt, const TInt, const TInt, const TInt)
    virtual IMPORT_C voidEditItemL(TBool)
    virtual IMPORT_C voidHandleSettingPageEventL(CAknSettingPage *, TAknSettingPageEvent)
    IMPORT_C TBoolHasIcon()
    IMPORT_C TIntIdentifier()
    IMPORT_C TBoolIsHidden()
    IMPORT_C TBoolIsNumberedStyle()
    IMPORT_C HBufC *ListBoxText()
    virtual IMPORT_C voidLoadL()
    IMPORT_C CAknSettingItem::TSettingItemProtectionProtectionState()
    IMPORT_C voidSetCompulsoryIndTextL(const TDesC &)
    IMPORT_C voidSetEmptyItemTextL(const TDesC &)
    IMPORT_C voidSetHidden(TBool)
    voidSetParentListBox(const CEikFormattedCellListBox *)
    IMPORT_C voidSetProtectionState(CAknSettingItem::TSettingItemProtection)
    IMPORT_C voidSetSettingPageFlags(TInt)
    IMPORT_C TPtrCSettingName()
    IMPORT_C TIntSettingNumber()
    IMPORT_C TIntSettingPageFlags()
    virtual IMPORT_C const TDesC &SettingTextL()
    virtual IMPORT_C voidStoreL()
    virtual IMPORT_C voidUpdateListBoxTextL()
    IMPORT_C TIntVisibleIndex()
    Protected Member Functions
    IMPORT_C TIntAssociatedResourceId()
    virtual IMPORT_C voidCompleteConstructionL()
    virtual IMPORT_C CFbsBitmap *CreateBitmapL()
    TInt EditorControlType()
    IMPORT_C TDesC &EmptyItemText()
    IMPORT_C TBoolSetIconMask(CFbsBitmap *)
    CFbsBitmap *SetIconMaskAndReturnBitmap(CGulIcon *)
    IMPORT_C voidSetSettingPage(CAknSettingPage *)
    IMPORT_C voidSetUpStandardSettingPageL()
    IMPORT_C TIntSettingEditorResourceId()
    IMPORT_C CAknSettingPage *SettingPage()
    IMPORT_C TIntSettingPageResourceId()
    Inherited Functions
    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

    CAknSettingItem is the base class for all setting items. The abstracted functionality is implemented in this class if possible.

    All array of setting items is held in CAknSettingItemArray, which in turn is owned by CAknSettingItemList, a listbox type.

    Member Enumeration Documentation

    Enum TFlags

    EnumeratorValueDescription
    EIsHidden0x1
    EHasIcon0x2
    EIsNumberedStyle0x4
    ENoProtection0x8
    EViewOnly0x10
    EProtected0x20

    Enum TSettingItemProtection

    Constructor & Destructor Documentation

    CAknSettingItem ( TInt )

    IMPORT_CCAknSettingItem(TIntidentifier)

    Constructor

    ~CAknSettingItem ( )

    IMPORT_C~CAknSettingItem()

    Destructor

    Member Function Documentation

    AssociatedResourceId ( )

    IMPORT_C TIntAssociatedResourceId()const [protected]

    Returns the associate editor resource. This is an LLINK in the seting item resource that subclasses can use in CompleteContstructionL

    Returns: 0 or the extra resource id

    CompleteConstructionL ( )

    IMPORT_C voidCompleteConstructionL()[protected, virtual]

    Method called by framework to complete the construction. Extra allocations of memory or extra resource reading can happen here.

    ConstructL ( const TBool, const TInt, const TDesC &, CArrayPtr< CGulIcon > *, const TInt, const TInt, const TInt, const TInt )

    IMPORT_C voidConstructL(const TBoolaIsNumberedStyle,
    const TIntaOrdinal,
    const TDesC &aSettingTitle,
    CArrayPtr< CGulIcon > *aIconArray,
    const TIntaSettingPageResource,
    const TIntaEditorControlType,
    const TIntaSettingEditorResource = 0,
    const TIntaAssociatedResource = 0
    )

    2nd-stage constuctor. Resource for setting item is read externally in setting item list and the values are passed here.

    CreateBitmapL ( )

    IMPORT_C CFbsBitmap *CreateBitmapL()[protected, virtual]

    Method to obtain a new bitmap for the setting content

    This method is usually empty in setting items classes except for volume and slider. Any derived implementations of this method should call SetIconMask().

    EditItemL ( TBool )

    IMPORT_C voidEditItemL(TBoolaCalledFromMenu)[virtual]

    This launches the setting page

    ParameterDescription
    aCalledFromMenu- ignored in this class

    EditorControlType ( )

    TInt EditorControlType()const [protected]

    Returns: the control type of the settin page editor

    EmptyItemText ( )

    IMPORT_C TDesC &EmptyItemText()const [protected]

    Access to the empty text that has been set, or is default

    Returns: ref to empty text descriptor

    HandleSettingPageEventL ( CAknSettingPage *, TAknSettingPageEvent )

    IMPORT_C voidHandleSettingPageEventL(CAknSettingPage *aSettingPage,
    TAknSettingPageEventaEventType
    )[virtual]

    HasIcon ( )

    IMPORT_C TBoolHasIcon()const

    Checks if the setting item has a bitmap in its setting contents

    Returns: ETrue if it has a bitmap

    Identifier ( )

    IMPORT_C TIntIdentifier()const

    Access to the setting item's identifier. This is set in the setting item's constructor but usually comes via resource in the setting item list read of its resource structure

    Returns: The identifier of this setting item

    IsHidden ( )

    IMPORT_C TBoolIsHidden()const

    Access to the setting visibility

    Returns: ETrue if the setting item is hidden

    IsNumberedStyle ( )

    IMPORT_C TBoolIsNumberedStyle()const

    Access to the numbering style of the setting item

    Returns: ETrue if it is numbered

    ListBoxText ( )

    IMPORT_C HBufC *ListBoxText()

    This gives access to the listbox text content at this item (fully decorated)

    Returns: pointer to listboxtext. No allocation is performed and no change of ownership

    LoadL ( )

    IMPORT_C voidLoadL()[virtual]

    ProtectionState ( )

    IMPORT_C CAknSettingItem::TSettingItemProtectionProtectionState()

    Get the protection state

    See SetProtected for details for the different states.

    Since
    3.1

    Returns: Protection state of the setting item

    SetCompulsoryIndTextL ( const TDesC & )

    IMPORT_C voidSetCompulsoryIndTextL(const TDesC &aCompulsoryInd)

    SetEmptyItemTextL ( const TDesC & )

    IMPORT_C voidSetEmptyItemTextL(const TDesC &aEmptyItemText)

    This sets the text to display if the current setting is empty.

    SetHidden ( TBool )

    IMPORT_C voidSetHidden(TBoolaHidden)

    Set the visibility Note that the setting item array must have be notified of this by calling CAknSettingItemList::HandleChangeInItemArrayOrVisibility

    SetIconMask ( CFbsBitmap * )

    IMPORT_C TBoolSetIconMask(CFbsBitmap *aMask)[protected]

    This sets the mask of this setting item's icon array, if it exists. The normal usage of this routine is inside a re-implementation of CAknSettingItem::CreateBitmapL. It is used to set the mask of the setting item's setting icon as a side effect of a framework call to CreateBitmapL

    The return value may need to be looked at to decide how to dispose of, for example, an a CGulIcon that may be holding the mask.

    Since
    2.0
    ParameterDescription
    aMaskbitmap to set as a mask for the CGulIcon in the setting listbox's icon array

    Returns: TBool ETrue if the ownership of aMask has been passed

    SetIconMaskAndReturnBitmap ( CGulIcon * )

    CFbsBitmap *SetIconMaskAndReturnBitmap(CGulIcon *aIcon)[protected]

    This sets the mask of this setting item's icon array, if it exists, using the mask from the passed icon. It returns the bitmap from the aIcon. The method also takes ownership of aIcon and may delete it (but not its bitmap).

    Since
    2.0
    ParameterDescription
    aIconicon of which the mask is passed through to SetIconMask() and bitmap is returned

    Returns: CFbsBitmap* bitmap from aIcon. Ownership of the bitmap is transfered to the caller

    SetParentListBox ( const CEikFormattedCellListBox * )

    voidSetParentListBox(const CEikFormattedCellListBox *aListBox)

    Set the parent lisbox into the setting item

    Since
    2.0
    ParameterDescription
    aListBoxlistbox with which the setting item is associated.

    SetProtectionState ( CAknSettingItem::TSettingItemProtection )

    IMPORT_C voidSetProtectionState(CAknSettingItem::TSettingItemProtectionaProtected)

    Set the protection state of the setting item

    The protection state is for protecting selected settings from editing. The protection can be set to:
    • prohibit opening of the setting page

    • allow access to the setting page, but prohibit editing of it

    The protected item is indicated in the setting item list with a lock icon. If a user tries to open a protected setting item, a notification is shown to the user.

    The "view only" -mode is only possible for pop-up setting page.

    Since
    3.1
    ParameterDescription
    aProtectedSets the protection state of the setting item

    SetSettingPage ( CAknSettingPage * )

    IMPORT_C voidSetSettingPage(CAknSettingPage *aSettingPage)[protected]

    A setting page should know when it is "Editing". This is set in EditItemL and cleared to 0 when the dialog is finished.

    SetSettingPageFlags ( TInt )

    IMPORT_C voidSetSettingPageFlags(TIntaFlagPattern)

    Set the flags that are required for some of the setting page constructors

    ParameterDescription
    aFlagPatternFlag pattern to set

    SetUpStandardSettingPageL ( )

    IMPORT_C voidSetUpStandardSettingPageL()[protected]

    Performs standard setup on a setting page

    SettingEditorResourceId ( )

    IMPORT_C TIntSettingEditorResourceId()const [protected]

    Access to the setting page editor's resource id that might have been read by the setting item resource.

    Returns: 0 or the setting page editor's id

    SettingName ( )

    IMPORT_C TPtrCSettingName()

    Access to the setting Name .

    Returns: the setting name

    SettingNumber ( )

    IMPORT_C TIntSettingNumber()const

    Access to the setting number

    Returns: the setting number

    SettingPage ( )

    IMPORT_C CAknSettingPage *SettingPage()const [protected]

    SettingPageFlags ( )

    IMPORT_C TIntSettingPageFlags()const

    Access method for the setting page specific flags

    Returns: the flag pattern

    SettingPageResourceId ( )

    IMPORT_C TIntSettingPageResourceId()const [protected]

    Access to the setting page resource id that might have been read by the setting item resource.

    Returns: 0 or the setting page resource id

    SettingTextL ( )

    IMPORT_C const TDesC &SettingTextL()[virtual]

    StoreL ( )

    IMPORT_C voidStoreL()[virtual]

    This command externalizes the current setting. The displayed (internal) copy is transferred to the external copy (the one referenced in the constructor).

    This must be called by the client if he wants this to happen. Note that StoreAllL() on the setting item list will call this for each setting item.

    UpdateListBoxTextL ( )

    IMPORT_C voidUpdateListBoxTextL()[virtual]

    This method is called by framework in order to update the text in the setting item. It may be called by the client.

    VisibleIndex ( )

    IMPORT_C TIntVisibleIndex()

    Get the index at which this item appears in the listbox

    Returns: index in listbox