CLmkDlgSelectorImplBase Class Reference

class CLmkDlgSelectorImplBase : public CLmkSelectorImplBase

Base class for common ui selectors (dialog-based). During implementation it was noticed that pre-selection indexes cause difficulties and some refactoring could be done to make the code easier to read and maintain.

Inherits from

Public Member Functions
~CLmkDlgSelectorImplBase()
TInt ExecuteL(TPosLmItemId &, TBool)
TInt ExecuteL(RArray< TPosLmItemId > &, TBool)
TInt ExecuteL(TInt &)
TInt ExecuteL(CArrayFix< TInt > &)
TInt ExecuteL(CArrayFix< TInt > &, TPtrC)
voidGetDlgResources(TBool, TInt &, TInt &, TInt &)
TCoeHelpContext HelpContext()
TInt ListMarkedItemCountL()
TInt ListVisibleItemCount()
MLmkListMemento *MementoL()
voidSetDialogTitleL(const TDesC &)
voidSetEmptyDlgLabel(TInt, TInt)
IMPORT_C voidSetMopParent(MObjectProvider *)
voidSetSelectorImplParent(CLmkDlgSelectorImplBase *)
voidStopExecutionL()
Protected Member Functions
CLmkDlgSelectorImplBase(CPosLandmarkDatabase &)
voidBaseConstructL()
voidCheckHideCoordinateL()
voidDynInitDlgMenuPaneL(TInt, CEikMenuPane *)
voidHandleClosingEventL()
voidHandleLaunchingEventL()
voidHandleListProviderError(TInt)
voidHandleListProviderEvent(TLmkListProviderEventType)
TKeyResponse HandleNavigationEventL(const TKeyEvent &)
voidProcessCommandL(TInt)
Private Member Functions
voidRetrySetPreSelectedL()
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()
CLmkSelectorImplBase::CLmkSelectorImplBase(CPosLandmarkDatabase &)
CLmkSelectorImplBase::ListProvider()const
CLmkSelectorImplBase::Restore(const CEikListBox &,const CLmkListProviderBase &,TBool)
CLmkSelectorImplBase::SetMemento(MLmkListMemento &)
CLmkSelectorImplBase::SetupIconMgrLC()
CLmkSelectorImplBase::SetupListProviderL()
CLmkSelectorImplBase::Store(const CEikListBox &,const CLmkListProviderBase &,TBool)
CLmkSelectorImplBase::~CLmkSelectorImplBase()
Protected Attributes
TInt iCurrentLabelPrimResource
TInt iCurrentLabelSecResource
CLmkSelectorDialog *iDialog
TBool iIsHideHelp
MObjectProvider *iMopParent
CLmkDlgSelectorImplBase *iSelectorImplParent
Private Attributes
TLmkListProviderEventType iDlgSelectorImplBaseLatestListEvent
const RArray< TPosLmItemId > *iInputSelectedItems
HBufC *iTitle
Inherited Attributes
CLmkSelectorImplBase::iDb
CLmkSelectorImplBase::iEnv
CLmkSelectorImplBase::iIconMgr
CLmkSelectorImplBase::iListProvider
CLmkSelectorImplBase::iLmkUiUtils
CLmkSelectorImplBase::iMemento

Constructor & Destructor Documentation

CLmkDlgSelectorImplBase(CPosLandmarkDatabase &)

CLmkDlgSelectorImplBase(CPosLandmarkDatabase &aDb)[protected]

C++ default constructor.

Parameters

CPosLandmarkDatabase & aDb

~CLmkDlgSelectorImplBase()

~CLmkDlgSelectorImplBase()

Destructor.

Member Functions Documentation

BaseConstructL()

voidBaseConstructL()[protected]

By default Symbian 2nd phase constructor is private.

CheckHideCoordinateL()

voidCheckHideCoordinateL()[protected]

Check whether Coordinates has to be hidden.

DynInitDlgMenuPaneL(TInt, CEikMenuPane *)

voidDynInitDlgMenuPaneL(TIntaResourceId,
CEikMenuPane *aMenuPane
)[protected]

Parameters

TInt aResourceId
CEikMenuPane * aMenuPane

ExecuteL(TPosLmItemId &, TBool)

TInt ExecuteL(TPosLmItemId &aOpenedItem,
TBoolaAlwaysModifyOpened = EFalse
)[virtual]

Runs single item selection dialog.

Parameters

TPosLmItemId & aOpenedItemcontains output selection id
TBool aAlwaysModifyOpened = EFalseif ETrue then highlighted item is set to aOpenedItem even if dialog was cancelled

ExecuteL(RArray< TPosLmItemId > &, TBool)

TInt ExecuteL(RArray< TPosLmItemId > &aSelectedItems,
TBoolaAlwaysModifySelected = EFalse
)[virtual]

Runs multiple item selection dialog. aSelectedItems is used as both input and output parameter (i.e. if a non-empty array is given then those items are marked selected by default.

Parameters

RArray< TPosLmItemId > & aSelectedItemscontains input/output selection id(s)
TBool aAlwaysModifySelected = EFalseif ETrue then selected items are set to aSelectedItems even if dialog was cancelled

ExecuteL(TInt &)

TInt ExecuteL(TInt &aOpenedItem)[virtual]

Runs single item selection dialog. This method is mainly targeted for internal use within LmkUi component.

Parameters

TInt & aOpenedItemcontains output selection index

ExecuteL(CArrayFix< TInt > &)

TInt ExecuteL(CArrayFix< TInt > &aSelectedItems)[virtual]

Runs multiple item selection dialog. This method is mainly targeted for internal use within LmkUi component. aSelectedItems is used as both input and output parameter (i.e. if a non-empty array is given then those items are marked selected by default.

Parameters

CArrayFix< TInt > & aSelectedItemscontains input/output selection indexes

ExecuteL(CArrayFix< TInt > &, TPtrC)

TInt ExecuteL(CArrayFix< TInt > &aSelectedItems,
TPtrCaTitlePaneText
)[virtual]

Parameters

CArrayFix< TInt > & aSelectedItems
TPtrC aTitlePaneText

GetDlgResources(TBool, TInt &, TInt &, TInt &)

voidGetDlgResources(TBoolaIsSingleSelector,
TInt &aTitlePaneResource,
TInt &aMenuBarResource,
TInt &aDialogResource
)const [pure virtual]

Template method implemented by the subclass and called by the base class.

Parameters

TBool aIsSingleSelector
TInt & aTitlePaneResource
TInt & aMenuBarResource
TInt & aDialogResource

HandleClosingEventL()

voidHandleClosingEventL()[protected]

HandleLaunchingEventL()

voidHandleLaunchingEventL()[protected]

HandleListProviderError(TInt)

voidHandleListProviderError(TIntaError)[protected]

Parameters

TInt aError

HandleListProviderEvent(TLmkListProviderEventType)

voidHandleListProviderEvent(TLmkListProviderEventTypeaEvent)[protected]

Parameters

TLmkListProviderEventType aEvent

HandleNavigationEventL(const TKeyEvent &)

TKeyResponse HandleNavigationEventL(const TKeyEvent &aKeyEvent)[protected]

Parameters

const TKeyEvent & aKeyEvent

HelpContext()

TCoeHelpContext HelpContext()const [virtual]

Template method called by the base class, implemented by the subclass if dialog has a help. Base class implementation returns null help context.

ListMarkedItemCountL()

TInt ListMarkedItemCountL()[virtual]

Return number of marked items

ListVisibleItemCount()

TInt ListVisibleItemCount()[virtual]

Return number of visible items

MementoL()

MLmkListMemento *MementoL()[virtual]

Creates a memento (but does not set it with SetMemento()).

ProcessCommandL(TInt)

voidProcessCommandL(TIntaCommandId)[protected]

Parameters

TInt aCommandId

RetrySetPreSelectedL()

voidRetrySetPreSelectedL()[private]

Internal helper function which attempts to read indexes corresponding to stored lm item ids and to set them as selected in the listbox.

SetDialogTitleL(const TDesC &)

voidSetDialogTitleL(const TDesC &aTitle)[virtual]

Parameters

const TDesC & aTitle

SetEmptyDlgLabel(TInt, TInt)

voidSetEmptyDlgLabel(TIntaLabelPrimRes,
TIntaLabelSecRes
)[virtual]

Stores the empty dialog label

Parameters

TInt aLabelPrimRes
TInt aLabelSecRes

SetMopParent(MObjectProvider *)

IMPORT_C voidSetMopParent(MObjectProvider *aParent)

Object provider mechanism.

Parameters

MObjectProvider * aParentparent object

SetSelectorImplParent(CLmkDlgSelectorImplBase *)

voidSetSelectorImplParent(CLmkDlgSelectorImplBase *aParent)

Selector implementation parent receives observed events when any of the base class's observation methods is executed.

Parameters

CLmkDlgSelectorImplBase * aParentparent of this selector implementor

StopExecutionL()

voidStopExecutionL()[virtual]

Member Data Documentation

TInt iCurrentLabelPrimResource

TInt iCurrentLabelPrimResource[protected]

TInt iCurrentLabelSecResource

TInt iCurrentLabelSecResource[protected]

CLmkSelectorDialog * iDialog

CLmkSelectorDialog *iDialog[protected]

Own: Note that iDialog is a dynamic object which can be accessed between HandleLaunchingEventL() & HandleClosingEventL().

TLmkListProviderEventType iDlgSelectorImplBaseLatestListEvent

TLmkListProviderEventType iDlgSelectorImplBaseLatestListEvent[private]

const RArray< TPosLmItemId > * iInputSelectedItems

const RArray< TPosLmItemId > *iInputSelectedItems[private]

Ref: items to be set marked when provider gets ready if it wasn't ready when ExecuteL() was called

TBool iIsHideHelp

TBool iIsHideHelp[protected]

MObjectProvider * iMopParent

MObjectProvider *iMopParent[protected]

CLmkDlgSelectorImplBase * iSelectorImplParent

CLmkDlgSelectorImplBase *iSelectorImplParent[protected]

HBufC * iTitle

HBufC *iTitle[private]