CLmkEditorDlg Class Reference

#include <app/CLmkEditorDlg.h>

Link against: LmkCommonUiStub.lib

class CLmkEditorDlg : public CBase

Inherits from

  • CLmkEditorDlg

    Nested Classes and Structures

    Detailed Description

    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.

    Member Enumeration Documentation

    Enum _TLmkEditorAttributes

    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.

    EnumeratorValueDescription
    ELmkOnlyName0x0000

    This flag allows Name field of the landmark, to be shown.

    ELmkCategory0x0001

    This flag allows the Category/Categories field of the landmark , to be shown

    ELmkStreet0x0002

    This flag allows the Street name field of the landmark,to be shown.

    ELmkCity0x0004

    This flag allows the City name field to be shown, where the landmark belongs.

    ELmkStateProvince0x0008

    This flag allows the State name field to be shown,where the landmark belongs.

    ELmkCountry0x0010

    This flag allows the Country name field to be shown, where landmark belongs.

    ELmkPostalZIP0x0020

    This flag allows the Postal Zip field of the landmark, to be shown.

    ELmkLatitude0x0040

    This flag allows the Latitude field of the landmark, to be shown.

    ELmkLongitude0x0080

    This flag allows the Longitude field of the landmark, to be shown.

    ELmkPositionAccuracy0x0100

    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.

    ELmkAltitude0x0200

    This flag allows the Altitude field of the landmark, to be shown. It specifies the vertical position of the landmark.

    ELmkAltitudeAccuracy0x0400

    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.

    ELmkAll0xFFFF

    This flag allows All fields of the landmark, to be shown.

    ELmkDescription0x0800

    This flag allows the Description field of the landmark, to be shown.

    ELmkPhoneNumber0x1000

    This flag allows the Phone number field of the landmark, to be shown.

    ELmkWebAddress0x2000

    This flag allows the Web address field of the landmark, to be shown.

    Enum _TLmkEditorMode

    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.

    EnumeratorValueDescription
    ELmkEditor

    Landmark will be launched in editor mode.

    ELmkViewer

    Landmark will be launched in viewer mode.

    Constructor & Destructor Documentation

    ~CLmkEditorDlg ( )

    IMPORT_C~CLmkEditorDlg()

    Destructor.

    Member Function Documentation

    DisableMapAndNavigationMenuOptions ( )

    IMPORT_C voidDisableMapAndNavigationMenuOptions()

    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.

    ExecuteLD ( )

    IMPORT_C TIntExecuteLD()

    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.

    Viewer mode: The user can view the Landmark contents by accepting the dialog Canelling the dialog will close the dialog
    panic
    Panics with system-wide, panic codes.
    leave
    Leaves with KErrNotSupported if framework functionality is not available.

    Returns: Returns non-zero if accepted & saved in edit mode. Returns zero if fails due to less memory or any other error in edit mode.It always returns zero in view mode.

    NewL ( CPosLandmarkDatabase &, TPosLmItemId, TLmkEditorParams & )

    IMPORT_C CLmkEditorDlg *NewL(CPosLandmarkDatabase &aDb,
    TPosLmItemIdaLandmarkId,
    TLmkEditorParams &aParams
    )[static]
    This is a static function, which creates and returns an instance of this class, based on landmark id, which exists in landmark database.
    panic
    Panics with system-wide panic codes.
    leave
    Leaves with KErrNotFound,If the landmark does not exist in the database Leaves with KErrNotSupported if framework functionality is not available.
    ParameterDescription
    aDbReference to landmark database that includes this landmark.
    aParamsAttribute, holds values for launching the landmark dialog in viewer or editor mode, and number of landmark fields to be displayed.

    Returns: new instance of this class

    NewL ( CPosLandmarkDatabase &, CPosLandmark &, TLmkEditorParams & )

    IMPORT_C CLmkEditorDlg *NewL(CPosLandmarkDatabase &aDb,
    CPosLandmark &aLandmark,
    TLmkEditorParams &aParams
    )[static]
    This is a static function, which creates and returns an instance of this class, based on landmark object, which does not exist in landmark database.
    panic
    Panics with system-wide panic codes.
    leave
    Leaves with KErrNotSupported if framework functionality is not available.
    ParameterDescription
    aDbreference to landmark database, where new landmark will be created, if launched in edit mode.
    aParamsaParams attributes whether to launch landmark in viewer mode or editor mode.

    Returns: new instance of this class

    SetHelpContext ( TCoeHelpContext )

    IMPORT_C voidSetHelpContext(TCoeHelpContextaContext)

    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.

    ParameterDescription
    aContexthelp context to use

    SetMopParent ( MObjectProvider * )

    IMPORT_C voidSetMopParent(MObjectProvider *aParent)

    This method sets the context - that is, the enclosing parent control - for this control.

    ParameterDescription
    aParentThe parent object which is the context for the control.