CLmkEditorDlg Class Reference

API published in: S60 3rd Ed

Link against: lmkcommonui.lib

Capability Information

Required Capabilities

LocalServices Location NetworkServices ReadUserData WriteUserData

Exceptions

None

Other Information

None


#include <clmkeditordlg.h>

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.


Public Types

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 }

Public Member Functions

IMPORT_C  ~CLmkEditorDlg ()
  Destructor.
IMPORT_C void  SetMopParent (MObjectProvider *aParent)
  This method sets the context - that is, the enclosing parent control - for this control.
IMPORT_C void  SetHelpContext (TCoeHelpContext aContext)
  This method sets help context.
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.
IMPORT_C void  DisableMapAndNavigationMenuOptions ()
  This function, when invoked, disables the Map and Navigation related Menu Options This needs to be invoked before ExecuteLD().

Static Public Member Functions

static IMPORT_C CLmkEditorDlg NewL (CPosLandmarkDatabase &aDb, TPosLmItemId aLandmarkId, TLmkEditorParams &aParams)
  This is a static function, which creates and returns an instance of this class, based on landmark id, which exists in landmark database.
static IMPORT_C CLmkEditorDlg NewL (CPosLandmarkDatabase &aDb, CPosLandmark &aLandmark, TLmkEditorParams &aParams)
  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.

Data Structures

class   TLmkEditorParams
  This class is a wrapper, around the flags _TLmkEditorAttributes and _TLmkEditorMode. More...

Member Enumeration Documentation

enum CLmkEditorDlg::_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.

Enumerator:
ELmkOnlyName  This flag allows Name field of the landmark, to be shown.
ELmkCategory  This flag allows the Category/Categories field of the landmark , to be shown.
ELmkStreet  This flag allows the Street name field of the landmark,to be shown.
ELmkCity  This flag allows the City name field to be shown, where the landmark belongs.
ELmkStateProvince  This flag allows the State name field to be shown,where the landmark belongs.
ELmkCountry  This flag allows the Country name field to be shown, where landmark belongs.
ELmkPostalZIP  This flag allows the Postal Zip field of the landmark, to be shown.
ELmkLatitude  This flag allows the Latitude field of the landmark, to be shown.
ELmkLongitude  This flag allows the Longitude field of the landmark, to be shown.
ELmkPositionAccuracy  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  This flag allows the Altitude field of the landmark, to be shown.

It specifies the vertical position of the landmark.

ELmkAltitudeAccuracy  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  This flag allows All fields of the landmark, to be shown.
ELmkDescription  This flag allows the Description field of the landmark, to be shown.
ELmkPhoneNumber  This flag allows the Phone number field of the landmark, to be shown.
ELmkWebAddress  This flag allows the Web address field of the landmark, to be shown.
enum CLmkEditorDlg::_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.

Enumerator:
ELmkEditor  Landmark will be launched in editor mode.
ELmkViewer  Landmark will be launched in viewer mode.

Constructor & Destructor Documentation

IMPORT_C CLmkEditorDlg::~CLmkEditorDlg  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CLmkEditorDlg::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 CLmkEditorDlg::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.

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.
static IMPORT_C CLmkEditorDlg* 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.

Parameters:
[in]  aDb  reference to landmark database, where new landmark will be created, if launched in edit mode.
[in\out]  aLandmark pre-filled landmarks object. In case of edit mode, the passed aLandmark is updated with the information entered by the user along with the landmark id, which can be obtained by calling LandmarkId() method of CPosLandmark.
[in]  aParams  aParams attributes whether to launch landmark in viewer mode or editor mode.
Panic:
Panics with system-wide panic codes.
Leave:
Leaves with KErrNotSupported if framework functionality is not available.
Returns:
new instance of this class
static IMPORT_C CLmkEditorDlg* CLmkEditorDlg::NewL CPosLandmarkDatabase aDb,
TPosLmItemId  aLandmarkId,
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.

Parameters:
[in]  aDb  Reference to landmark database that includes this landmark.
[in]  aLandmark  Landmark id, which exists in Landmarks database.
[in]  aParams  Attribute, holds values for launching the landmark dialog in viewer or editor mode, and number of landmark fields to be displayed.
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.
Returns:
new instance of this class
IMPORT_C void CLmkEditorDlg::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.

Parameters:
[in]  aContext  help context to use
IMPORT_C void CLmkEditorDlg::SetMopParent MObjectProvider *  aParent  ) 
 

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

Parameters:
[in]  aParent  The parent object which is the context for the control.

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

Copyright © Nokia Corporation 2001-2008
Back to top