class CPbkContactEditorDlg : public CAknForm |
A contact editing dialog implementation. This class can be used to construct an UI editor dialog that is specifically tailored to edit contacts in a similar fashion as in the platform contacts application.
Public Member Functions | |
---|---|
~CPbkContactEditorDlg() | |
IMPORT_C TContactItemId | ExecuteLD() |
IMPORT_C void | HideExitCommand() |
IMPORT_C CPbkContactEditorDlg * | NewL(CPbkContactEngine &, CPbkContactItem &, TBool, TInt, TBool) |
IMPORT_C void | ResetWhenDestroyed(CPbkContactEditorDlg **) |
IMPORT_C void | SetExitCallback(MPbkEditorOkToExitCallback *) |
IMPORT_C void | SetExitCommandId(TInt) |
IMPORT_C void | SetHelpContext(TCoeHelpContext) |
Protected Member Functions | |
---|---|
CPbkContactEditorDlg(CPbkContactEngine &, CPbkContactItem &, TInt) | |
void | BaseConstructL(TBool, TBool) |
TBool | CheckForDuplicateEntryL() |
void | CloseAllPopups() |
void | ConstructContextMenuL() |
void | ConstructNaviPaneL() |
TBool | ContactAlreadyExistsL() |
TBool | DuplicateNameMatchL(CContactIdArray *) |
TBool | IsNewContact() |
void | ReloadThumbnailL() |
void | StoreTitlePaneTextL() |
void | UpdateTitlePaneL() |
void | WriteContactToDbL() |
Private Member Functions | |
---|---|
void | CmdAddItemL() |
void | CmdDeleteItemL() |
void | CmdDoneL() |
void | CmdEditItemLabelL() |
void | CmdFetchThumbnailL() |
void | CmdRemoveThumbnailL() |
void | CmdSaveL() |
void | DynInitMenuPaneL(TInt, CEikMenuPane *) |
void | GetHelpContext(TCoeHelpContext &) |
void | HandleControlStateChangeL(TInt) |
TKeyResponse | OfferKeyEventL(const TKeyEvent &, TEventCode) |
TBool | OkToExitL(TInt) |
void | PostLayoutDynInitL() |
void | PreLayoutDynInitL() |
void | ProcessCommandL(TInt) |
void | SetInitialCurrentLine() |
Protected Member Enumerations | |
---|---|
enum | TStateFlag { EHideExit, EEscKeyReceived, EUnderDestruction } |
Inherited Enumerations | |
---|---|
CAknForm:TFlags | |
CCoeControl:TZoomType | |
CEikDialog:@117 |
Protected Attributes | |
---|---|
CPbkContactItem & | iContactItem |
CPbkContactEditorFieldArray * | iFieldManager |
Private Attributes | |
---|---|
CEikMenuBar * | iContextMenuBar |
CPbkContextPaneIcon * | iContextPaneIcon |
MPbkContactEditorStrategy * | iEditorStrategy |
CPbkContactEngine & | iEngine |
MPbkEditorOkToExitCallback * | iExitCallback |
TInt | iExitCommandId |
CExtension * | iExtension |
TInt | iFocusIndex |
TCoeHelpContext | iHelpContext |
CAknNavigationControlContainer * | iNaviContainer |
TContactItemId * | iSavedContactPtr |
CPbkContactEditorDlg ** | iSelfPtr |
TBitFlags | iStateFlags |
HBufC * | iStoredTitlePaneText |
CPbkThumbnailCmd * | iThumbnailCmd |
CPbkThumbnailPopup * | iThumbnailHandler |
CAknTitlePane * | iTitlePane |
Inherited Attributes | |
---|---|
CAknDialog::iMenuBar | |
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
CPbkContactEditorDlg | ( | CPbkContactEngine & | aEngine, |
CPbkContactItem & | aContactItem, | ||
TInt | aFocusIndex | ||
) | [protected] |
CPbkContactEngine & aEngine | |
CPbkContactItem & aContactItem | |
TInt aFocusIndex |
TBool | DuplicateNameMatchL | ( | CContactIdArray * | aIdArray | ) | [protected] |
CContactIdArray * aIdArray |
void | DynInitMenuPaneL | ( | TInt | aResourceId, |
CEikMenuPane * | aMenuPane | |||
) | [private, virtual] |
Function from MEikMenuObserver. The framework calls this function. It removes the unused default form options. If a leave occurs the framework generates a Symbian Leave code.
TInt aResourceId | The ID of the menu pane. |
CEikMenuPane * aMenuPane | The menu pane itself. |
IMPORT_C TContactItemId | ExecuteLD | ( | ) |
Runs the dialog. This object is destroyed when this function returns or leaves. NOTE: Current status pane layout is replaced with the Phonebook one. Restoring the original pane is left to be the responsibility of the caller.
void | GetHelpContext | ( | TCoeHelpContext & | aContext | ) | const [private, virtual] |
TCoeHelpContext & aContext |
void | HandleControlStateChangeL | ( | TInt | aControlId | ) | [private, virtual] |
Overridden, so that the form can tell if a line's state has changed. This is used to decide when to save changes. If a leave occurs the framework generates a Symbian Leave code.
TInt aControlId |
IMPORT_C void | HideExitCommand | ( | ) |
Hides the 'Exit' command from the options menu. This must be called before calling ExecuteLD.
IMPORT_C CPbkContactEditorDlg * | NewL | ( | CPbkContactEngine & | aEngine, |
CPbkContactItem & | aContactItem, | |||
TBool | aIsNewContact, | |||
TInt | aFocusIndex = -1, | |||
TBool | aEdited = EFalse | |||
) | [static] |
Creates an instance of an editor dialog for an aContactItem.
CPbkContactEngine & aEngine | Phonebook engine |
CPbkContactItem & aContactItem | Contact item to edit |
TBool aIsNewContact | Set to ETrue if aContactItem is a new contact (not yet in the database) |
TInt aFocusIndex = -1 | Optional index of field to focus initially, default behaviour is to focus the topmost field. |
TBool aEdited = EFalse | If ETrue sets the contact initially to the edited state. Use when some data is added to aContactItem that needs to be saved even if user edits nothing. Default behaviour is to set the contact to non-edited state. |
TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [private, virtual] |
From CCoeControl.
Handles key events.
If a control wishes to process key events, it should implement this function. The implementation must ensure that the function returns EKeyWasNotConsumed if it does not do anything in response to a key event, otherwise, other controls or dialogs may be prevented from receiving the key event. If it is able to process the event it should return EKeyWasConsumed.
When a key event occurs, the control framework calls this function for each control on the control stack, until one of them can process the key event (and returns EKeyWasConsumed).
Each keyboard key press results in three separate events: EEventKeyDown, EEventKey, and EEventKeyUp, in that order.
To receive key events, which can be processed by this function, the application should call CCoeAppUi::AddToStackL() to add the control to the stack. This only applies, however, to controls which are not components of a compound control. Compound controls should pass key events to their components as necessary: the components themselves do not go on the stack.
const TKeyEvent & aKeyEvent | The key event. |
TEventCode aType | The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. |
TBool | OkToExitL | ( | TInt | aButtonId | ) | [private, virtual] |
Function from CEikDialog. Called by framework when the softkey is pressed. Use this to pop up the options menu or close the dialog. Will call c@ SaveFormDataL() before closing if data has been edited. Will NOT permit exit if attempt to save data fails. If a leave occurs the framework generates a Symbian Leave code.
TInt aButtonId | Translates the button presses into commands ID. |
void | PostLayoutDynInitL | ( | ) | [private, virtual] |
Function from CEikdialog. This function is called by the EIKON dialog framework just before the dialog is activated, after it has called PreLayoutDynInitL() and the dialog has been sized. If a leave occurs the framework generates a Symbian Leave code.
void | PreLayoutDynInitL | ( | ) | [private, virtual] |
Initializes the dialog's controls before the dialog is sized and layed out. Empty by default.
void | ProcessCommandL | ( | TInt | aCommandId | ) | [private, virtual] |
Function from MEikCommandObserver. Handle user menu commands. If a leave occurs the framework generates a Symbian Leave code.
TInt aCommandId | The command identifier to process. |
IMPORT_C void | ResetWhenDestroyed | ( | CPbkContactEditorDlg ** | aSelfPtr | ) |
Sets aSelfPtr to NULL when this dialog is destroyed. Precondition: !aSelfPtr || *aSelfPtr==this
CPbkContactEditorDlg ** aSelfPtr |
IMPORT_C void | SetExitCallback | ( | MPbkEditorOkToExitCallback * | aCallback | ) |
Sets exit callback. The callback is called before exit happens. If the callback returns EFalse, the exit process is cancelled.
MPbkEditorOkToExitCallback * aCallback | Exit callback |
IMPORT_C void | SetExitCommandId | ( | TInt | aCommandId | ) |
Sets the exit command in the options menu to forward aCommandId to the application framework. Allows clients to process and capture the exit command in the application exit situation.
TInt aCommandId | Command id to send to the framework when the exit occurs. |
IMPORT_C void | SetHelpContext | ( | TCoeHelpContext | aContext | ) |
Sets help context. There are many applications using contact editor and they may have an own help topic to be shown, when editor's help is launched. With this command it's possible to define the used help content. If not called after, uses Phonebook's own help context as default.
TCoeHelpContext aContext | Help context to use |
void | SetInitialCurrentLine | ( | ) | [private, virtual] |
This is added, so that anyone adding lines either in PreLayoutDynInit() or SetInitialCurrentLine() should have the lines in a consistent state.
CAknNavigationControlContainer * | iNaviContainer | [private] |
CPbkContactEditorDlg ** | iSelfPtr | [private] |
Ref: self pointer for easier leave handling !iSelfPtr || *iSelfPtr==this
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.