API published in: S60 3rd Ed FP 2
Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib
Required Capabilities
None
#include <aknlocationed.h>
Inherits CEikMfne.
There exists two ways to construct CAknLocationEditor:
CAknLocationEditor *editor = CAknLocationEditor::NewL(pos, context);
Using resources:
CAknLocationEditor *editor = new (ELeave) CAknLocationEditor TResourceReader reader; iCoeEnv->CreateResourceReaderLC(reader,R_RES_ID_FOR_EDITOR); editor->ConstructFromResourceL(reader); editor->Set(pos); CleanupStack::PopAndDestroy();
Resource file format is as follows:
LATITUDE_EDITOR { flags = ELocationEdFlagLatitude; latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE; };
LONGITUDE_EDITOR { flags = ELocationEdFlagLongitude; latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE; };
Public Types |
|
enum | TLocationContext { ELongitudeOnly = 0x1, ELatitudeOnly = 0x2 } |
TLocationContext determines what part of TPosition class is used for this editor. More... |
|
Public Member Functions |
|
IMPORT_C | CAknLocationEditor () |
Constructor. |
|
IMPORT_C | ~CAknLocationEditor () |
Destructor. |
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aResourceReader) |
ConstructFromResourceL Constructs location editor using information from resource files. |
|
virtual IMPORT_C void | PrepareForFocusLossL () |
PrepareForFocusLossL() detects focus changes to validate editor contents. |
|
IMPORT_C void | Set (const TPosition &aValue) |
Set() Sets either longitude or latitude values of aValue. |
|
IMPORT_C void | Get (TPosition &aValue) const |
Get() Gets either longitude or latitude values of aValue. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
OfferKeyEventL() key event handling of location editor. |
|
void | HandleCenRepChangedL (TUint32 aKey, TInt aValue) |
void | CreateMfneFieldsL (const TPosition &aValue) |
Static Public Member Functions |
|
static IMPORT_C CAknLocationEditor * | NewL (TPosition &aValue, TLocationContext aContext) |
NewL() Creates location editor and initializes it's value to value determined by the aValue parameter. |
|
static IMPORT_C HBufC * | DisplayableLocationL (const TPosition &aValue, TLocationContext aContext) |
DisplayableLocationL() Converts TPosition into displayable descriptor usable for listboxes. |
|
Protected Member Functions |
|
virtual IMPORT_C void * | CAknLocationEditor_ExtensionInterface (TUid aInterface) |
|
TLocationContext determines what part of TPosition class is used for this editor. ELongitudeOnly means only longitude part of TPosition is used. ELatitudeOnly means only latitude part of TPosition is used. |
|
Constructor. |
|
Destructor. |
|
|
ConstructFromResourceL Constructs location editor using information from resource files.
|
|
|
DisplayableLocationL() Converts TPosition into displayable descriptor usable for listboxes.
|
|
Get() Gets either longitude or latitude values of aValue.
|
|
|
NewL() Creates location editor and initializes it's value to value determined by the aValue parameter.
|
|
OfferKeyEventL() key event handling of location editor. Reimplemented from CEikMfne. |
|
PrepareForFocusLossL() detects focus changes to validate editor contents. Reimplemented from CEikMfne. |
|
Set() Sets either longitude or latitude values of aValue.
|