CPbkContactEditorDlg Class Reference

API published in: S60 1st Ed
API deprecated in: S60 5th Ed

Link against: pbkview.lib

Capability Information

Required Capabilities

ReadUserData WriteUserData


#include <cpbkcontacteditordlg.h>

Inherits CAknForm.


Detailed Description

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 ()
  Destructor.
IMPORT_C void  ResetWhenDestroyed (CPbkContactEditorDlg **aSelfPtr)
  Sets aSelfPtr to NULL when this dialog is destroyed.
IMPORT_C TContactItemId  ExecuteLD ()
  Runs the dialog.
IMPORT_C void  HideExitCommand ()
  Hides the 'Exit' command from the options menu.
IMPORT_C void  SetHelpContext (TCoeHelpContext aContext)
  Sets help context.
IMPORT_C void  SetExitCallback (MPbkEditorOkToExitCallback *aCallback)
  Sets exit callback.
IMPORT_C void  SetExitCommandId (TInt aCommandId)
  Sets the exit command in the options menu to forward aCommandId to the application framework.

Static Public Member Functions

static IMPORT_C CPbkContactEditorDlg NewL (CPbkContactEngine &aEngine, CPbkContactItem &aContactItem, TBool aIsNewContact, TInt aFocusIndex=-1, TBool aEdited=EFalse)
  Creates an instance of an editor dialog for an aContactItem.

Protected Types

enum   TStateFlag { EHideExit, EEscKeyReceived, EUnderDestruction }
  State flag values for CPbkContactEditorDlg. More...

Protected Member Functions

  CPbkContactEditorDlg (CPbkContactEngine &aEngine, CPbkContactItem &aContactItem, TInt aFocusIndex)
void  BaseConstructL (TBool aIsNewContact, TBool aEdited)
void  StoreTitlePaneTextL ()
void  ConstructContextMenuL ()
void  ConstructNaviPaneL ()
TBool  IsNewContact () const
void  UpdateTitlePaneL ()
void  CloseAllPopups ()
TBool  ContactAlreadyExistsL ()
TBool  DuplicateNameMatchL (CContactIdArray *aIdArray)
TBool  CheckForDuplicateEntryL ()
void  ReloadThumbnailL ()
void  WriteContactToDbL ()

Protected Attributes

CPbkContactItem iContactItem
  Ref: Contact item under editing.
CPbkContactEditorFieldArray *  iFieldManager
  Own: Contact editor field manager.

Friends

class  CExtension

Member Enumeration Documentation

enum CPbkContactEditorDlg::TStateFlag [protected]
 

State flag values for CPbkContactEditorDlg.

Enumerator:
EHideExit 
EEscKeyReceived 
EUnderDestruction  Espace key received.

Constructor & Destructor Documentation

CPbkContactEditorDlg::~CPbkContactEditorDlg  ) 
 

Destructor.

CPbkContactEditorDlg::CPbkContactEditorDlg CPbkContactEngine aEngine,
CPbkContactItem aContactItem,
TInt  aFocusIndex
[protected]
 

Member Function Documentation

void CPbkContactEditorDlg::BaseConstructL TBool  aIsNewContact,
TBool  aEdited
[protected]
 
TBool CPbkContactEditorDlg::CheckForDuplicateEntryL  )  [protected]
 
void CPbkContactEditorDlg::CloseAllPopups  )  [protected]
 
void CPbkContactEditorDlg::ConstructContextMenuL  )  [protected]
 
void CPbkContactEditorDlg::ConstructNaviPaneL  )  [protected]
 
TBool CPbkContactEditorDlg::ContactAlreadyExistsL  )  [protected]
 
TBool CPbkContactEditorDlg::DuplicateNameMatchL CContactIdArray *  aIdArray  )  [protected]
 
IMPORT_C TContactItemId CPbkContactEditorDlg::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.

Returns:
The id of the saved contact. KNullContactId if not saved. Please note that the contact item (aContactItem passed to NewL) might be modified even if it is not saved to the database.
IMPORT_C void CPbkContactEditorDlg::HideExitCommand  ) 
 

Hides the 'Exit' command from the options menu.

This must be called before calling ExecuteLD.

TBool CPbkContactEditorDlg::IsNewContact  )  const [protected]
 
static IMPORT_C CPbkContactEditorDlg* 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.

Parameters:
aEngine  Phonebook engine
aContactItem  Contact item to edit
aIsNewContact  Set to ETrue if aContactItem is a new contact (not yet in the database)
aFocusIndex  Optional index of field to focus initially, default behaviour is to focus the topmost field.
aEdited  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.
Returns:
A new dialog object.
void CPbkContactEditorDlg::ReloadThumbnailL  )  [protected]
 
IMPORT_C void CPbkContactEditorDlg::ResetWhenDestroyed CPbkContactEditorDlg **  aSelfPtr  ) 
 

Sets aSelfPtr to NULL when this dialog is destroyed.

Precondition: !aSelfPtr || *aSelfPtr==this

IMPORT_C void CPbkContactEditorDlg::SetExitCallback MPbkEditorOkToExitCallback aCallback  ) 
 

Sets exit callback.

The callback is called before exit happens. If the callback returns EFalse, the exit process is cancelled.

Parameters:
aCallback  Exit callback
IMPORT_C void CPbkContactEditorDlg::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.

Parameters:
aCommandId  Command id to send to the framework when the exit occurs.
IMPORT_C void CPbkContactEditorDlg::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.

Parameters:
aContext  Help context to use
void CPbkContactEditorDlg::StoreTitlePaneTextL  )  [protected]
 
void CPbkContactEditorDlg::UpdateTitlePaneL  )  [protected]
 
void CPbkContactEditorDlg::WriteContactToDbL  )  [protected]
 

Friends And Related Function Documentation

friend class CExtension [friend]
 

Field Documentation

CPbkContactItem& CPbkContactEditorDlg::iContactItem [protected]
 

Ref: Contact item under editing.

CPbkContactEditorFieldArray* CPbkContactEditorDlg::iFieldManager [protected]
 

Own: Contact editor field manager.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top