CAknLocationEditor Class Reference

API published in: S60 3rd Ed FP 2

Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib

Capability Information

Required Capabilities

None


#include <aknlocationed.h>

Inherits CEikMfne.


Detailed Description

Editor for TPosition type; latitude and longitude editor.

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;
        };
or:
      LONGITUDE_EDITOR
        {
                  flags = ELocationEdFlagLongitude;
                  latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
        };
See also:
TPosition

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)

Member Enumeration Documentation

enum CAknLocationEditor::TLocationContext
 

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.

Enumerator:
ELongitudeOnly 
ELatitudeOnly 

Constructor & Destructor Documentation

IMPORT_C CAknLocationEditor::CAknLocationEditor  ) 
 

Constructor.

IMPORT_C CAknLocationEditor::~CAknLocationEditor  ) 
 

Destructor.


Member Function Documentation

virtual IMPORT_C void* CAknLocationEditor::CAknLocationEditor_ExtensionInterface TUid  aInterface  )  [protected, virtual]
 
IMPORT_C void CAknLocationEditor::ConstructFromResourceL TResourceReader &  aResourceReader  ) 
 

ConstructFromResourceL Constructs location editor using information from resource files.

Parameters:
aResourceReader  resource reader
void CAknLocationEditor::CreateMfneFieldsL const TPosition aValue  ) 
 
static IMPORT_C HBufC* CAknLocationEditor::DisplayableLocationL const TPosition aValue,
TLocationContext  aContext
[static]
 

DisplayableLocationL() Converts TPosition into displayable descriptor usable for listboxes.

Parameters:
aValue  value of the location
aContext  which part of the TPosition is used
IMPORT_C void CAknLocationEditor::Get TPosition aValue  )  const
 

Get() Gets either longitude or latitude values of aValue.

Parameters:
aValue  TPosition object that will be modified
void CAknLocationEditor::HandleCenRepChangedL TUint32  aKey,
TInt  aValue
 
static IMPORT_C CAknLocationEditor* CAknLocationEditor::NewL TPosition aValue,
TLocationContext  aContext
[static]
 

NewL() Creates location editor and initializes it's value to value determined by the aValue parameter.

Parameters:
aValue  Initial value for location editor.
aContext  Which part of the TPosition is used for this location editor
IMPORT_C TKeyResponse CAknLocationEditor::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[virtual]
 

OfferKeyEventL() key event handling of location editor.

Reimplemented from CEikMfne.

virtual IMPORT_C void CAknLocationEditor::PrepareForFocusLossL  )  [virtual]
 

PrepareForFocusLossL() detects focus changes to validate editor contents.

Reimplemented from CEikMfne.

IMPORT_C void CAknLocationEditor::Set const TPosition aValue  ) 
 

Set() Sets either longitude or latitude values of aValue.

Parameters:
aValue  new value for the editor

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

Copyright © Nokia Corporation 2001-2008
Back to top