class CLmkEditorDlg : public CBase |
This is a dialog class, which is used to launch landmark viewer/editor. It provides functionality for viewing and editing landmark data. By default all the fields are shown, but user can customize the total number of displayable fields. It also supports mechanism to disable map and navigation related menu option.
Public Member Functions | |
---|---|
~CLmkEditorDlg() | |
IMPORT_C void | DisableMapAndNavigationMenuOptions() |
IMPORT_C TInt | ExecuteLD() |
IMPORT_C CLmkEditorDlg * | NewL(CPosLandmarkDatabase &, TPosLmItemId, TLmkEditorParams &) |
IMPORT_C CLmkEditorDlg * | NewL(CPosLandmarkDatabase &, CPosLandmark &, TLmkEditorParams &) |
IMPORT_C void | SetHelpContext(TCoeHelpContext) |
IMPORT_C void | SetMopParent(MObjectProvider *) |
Private Member Functions | |
---|---|
CLmkEditorDlg() | |
void | ConstructL(CPosLandmarkDatabase &, TLmkEditorParams &, TPosLmItemId, CPosLandmark *) |
Public Member Enumerations | |
---|---|
enum | _TLmkEditorAttributes { ELmkOnlyName = 0x0000, ELmkCategory = 0x0001, ELmkStreet = 0x0002, ELmkCity = 0x0004, ELmkStateProvince = 0x0008, ELmkCountry = 0x0010, ELmkPostalZIP = 0x0020, ELmkLatitude = 0x0040, ELmkLongitude = 0x0080, ELmkPositionAccuracy = 0x0100, ELmkAltitude = 0x0200, ELmkAltitudeAccuracy = 0x0400, ELmkAll = 0xFFFF, ELmkDescription = 0x0800, ELmkPhoneNumber = 0x1000, ELmkWebAddress = 0x2000 } |
enum | _TLmkEditorMode { ELmkEditor, ELmkViewer } |
Private Attributes | |
---|---|
TBool * | iDestroyedPtr |
CLmkEditorImpl * | iEditorImpl |
CLmkSender * | iSender |
void | ConstructL | ( | CPosLandmarkDatabase & | aDb, |
TLmkEditorParams & | aParams, | |||
TPosLmItemId | aLandmarkId, | |||
CPosLandmark * | aLandmark | |||
) | [private] |
By default Symbian 2nd phase constructor is private.
CPosLandmarkDatabase & aDb | |
TLmkEditorParams & aParams | |
TPosLmItemId aLandmarkId | |
CPosLandmark * aLandmark |
IMPORT_C void | DisableMapAndNavigationMenuOptions | ( | ) |
This function, when invoked, disables the Map and Navigation related Menu Options This needs to be invoked before ExecuteLD(). By default, the Map and Navigation menu options are enabled and are shown.
IMPORT_C TInt | ExecuteLD | ( | ) |
This function launches the landmark dialog.It launches the dialog either in viewer or editor mode , depending upon the flag set.
Editor mode: When the dialog is launched in edit mode, the user can edit the landmark fields (some or all) and can save the Landmark. On closing the dialog, the landmark is saved to the landmark database. If saving a landmark fails due to less memory, the user is notified with an information note. If any of the landmark fields are filled and landmark name is not provided, user is asked to provide the landmark name, else if nothing is entered the dialog will close without saving the landmark. In case of new landmark creation, once the dialog is closed and the application returns from ExecuteLD() method, client applications can obtain the landmark id of the newly created landmark by calling LandmarkId() method from CPosLandmark class.
IMPORT_C CLmkEditorDlg * | NewL | ( | CPosLandmarkDatabase & | aDb, |
TPosLmItemId | aLandmarkId, | |||
TLmkEditorParams & | aParams | |||
) | [static] |
CPosLandmarkDatabase & aDb | Reference to landmark database that includes this landmark. |
TPosLmItemId aLandmarkId | |
TLmkEditorParams & aParams | Attribute, holds values for launching the landmark dialog in viewer or editor mode, and number of landmark fields to be displayed. |
IMPORT_C CLmkEditorDlg * | NewL | ( | CPosLandmarkDatabase & | aDb, |
CPosLandmark & | aLandmark, | |||
TLmkEditorParams & | aParams | |||
) | [static] |
CPosLandmarkDatabase & aDb | reference to landmark database, where new landmark will be created, if launched in edit mode. |
CPosLandmark & aLandmark | |
TLmkEditorParams & aParams | aParams attributes whether to launch landmark in viewer mode or editor mode. |
IMPORT_C void | SetHelpContext | ( | TCoeHelpContext | aContext | ) |
This method sets help context. There are many applications using landmark editor and they may have an own help topic to be shown, when editor's help is launched. With this command it is possible to define the used help content. Landmark's own help context is used as default.
TCoeHelpContext aContext | help context to use |
IMPORT_C void | SetMopParent | ( | MObjectProvider * | aParent | ) |
This method sets the context - that is, the enclosing parent control - for this control.
MObjectProvider * aParent | The parent object which is the context for the control. |
Defines the flag for displaying landmark fields on the viewer/editor dialog. Any combination of these flags,will display those fields,when viewer/editor is launched. By default the flag is set as ELmkAll.This flag is set in class TLmkEditorParams.
ELmkOnlyName = 0x0000 |
This flag allows Name field of the landmark, to be shown. |
ELmkCategory = 0x0001 |
This flag allows the Category/Categories field of the landmark , to be shown |
ELmkStreet = 0x0002 |
This flag allows the Street name field of the landmark,to be shown. |
ELmkCity = 0x0004 |
This flag allows the City name field to be shown, where the landmark belongs. |
ELmkStateProvince = 0x0008 |
This flag allows the State name field to be shown,where the landmark belongs. |
ELmkCountry = 0x0010 |
This flag allows the Country name field to be shown, where landmark belongs. |
ELmkPostalZIP = 0x0020 |
This flag allows the Postal Zip field of the landmark, to be shown. |
ELmkLatitude = 0x0040 |
This flag allows the Latitude field of the landmark, to be shown. |
ELmkLongitude = 0x0080 |
This flag allows the Longitude field of the landmark, to be shown. |
ELmkPositionAccuracy = 0x0100 |
This flag allows the Position accuracy field of the landmark, to be shown.It specifies the horizontal accuracy of the landmark related to Longitude and Latitude values. |
ELmkAltitude = 0x0200 |
This flag allows the Altitude field of the landmark, to be shown. It specifies the vertical position of the landmark. |
ELmkAltitudeAccuracy = 0x0400 |
This flag allows the Altitude accuracy field of the landmark, to be shown.It specifies the vertical accuracy of the landmark related to Landmark's Altitude value. |
ELmkAll = 0xFFFF |
This flag allows All fields of the landmark, to be shown. |
ELmkDescription = 0x0800 |
This flag allows the Description field of the landmark, to be shown. |
ELmkPhoneNumber = 0x1000 |
This flag allows the Phone number field of the landmark, to be shown. |
ELmkWebAddress = 0x2000 |
This flag allows the Web address field of the landmark, to be shown. |
Defines flag, that decides the mode in which the landmark dialog is launched(viewer or editor). By default, the flag is set as ELmkEditor.This flag is set in class TLmkEditorParams.
ELmkEditor |
Landmark will be launched in editor mode. |
ELmkViewer |
Landmark will be launched in viewer mode. |
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.