CAknQueryValuePhone Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <aknqueryvaluephone.h>

Inherits CAknQueryValue.


Detailed Description

Encapsulates a string.

Provides an interface to create a dialog containing a phone number query control, which will edit the value. Optionally allows the value to be changed by selecting from a list of values.


Public Member Functions

virtual IMPORT_C  ~CAknQueryValuePhone ()
IMPORT_C void  SetArrayL (const CAknQueryValuePhoneArray *aArray)
  Set the array.
IMPORT_C void  SetQueryCaption (TInt aResourceId)
  Set the string used for the query caption to be a string other than the default.
IMPORT_C HBufC *  Value () const
  Return the current value, which may have been set by the user.
virtual IMPORT_C const MDesCArray *  MdcArray () const
  Returns the array as a descriptor array, ownership will be not passed.
virtual IMPORT_C HBufC *  CurrentValueTextLC ()
  This should be implemented so that it returns the current value as text.
virtual IMPORT_C TInt  CurrentValueIndex () const
  Returns the index in the array of the current value.
virtual IMPORT_C void  SetCurrentValueIndex (const TInt aIndex)
  Changes the current value to correspond to a value in the array.
virtual IMPORT_C TBool  CreateEditorL ()
  Creates an editor within context.

Static Public Member Functions

static IMPORT_C CAknQueryValuePhone NewL ()
  First stage of two stage construction.
static IMPORT_C CAknQueryValuePhone NewLC ()
  First stage of two stage construction.

Protected Member Functions

  CAknQueryValuePhone ()
void  ConstructL ()
  Two stage construction.
void  CalculateCurrentIndex ()
  Search for the current value in the list, and set the curent index to be the found index.
virtual void  AppendValueIfNewL ()
  Method to add the current value to the QueryValueArray if it is new.

Constructor & Destructor Documentation

virtual IMPORT_C CAknQueryValuePhone::~CAknQueryValuePhone  )  [virtual]
 
CAknQueryValuePhone::CAknQueryValuePhone  )  [protected]
 

Member Function Documentation

virtual void CAknQueryValuePhone::AppendValueIfNewL  )  [protected, virtual]
 

Method to add the current value to the QueryValueArray if it is new.

The new value is not owned by QueryValue object, but is "given away"

Reimplemented from CAknQueryValue.

void CAknQueryValuePhone::CalculateCurrentIndex  )  [protected]
 

Search for the current value in the list, and set the curent index to be the found index.

If not found, set current index to 1 after the size of the array.

void CAknQueryValuePhone::ConstructL  )  [protected]
 

Two stage construction.

virtual IMPORT_C TBool CAknQueryValuePhone::CreateEditorL  )  [virtual]
 

Creates an editor within context.

If the value is edited and OK'd, the new value will be set as the current value. Otherwise the current value remains unchanged.

Returns:
ETrue if current value was altered; EFalse otherwise

Implements MAknQueryValue.

virtual IMPORT_C TInt CAknQueryValuePhone::CurrentValueIndex  )  const [virtual]
 

Returns the index in the array of the current value.

If no matches, returns zero

Implements MAknQueryValue.

virtual IMPORT_C HBufC* CAknQueryValuePhone::CurrentValueTextLC  )  [virtual]
 

This should be implemented so that it returns the current value as text.

Returns:
descriptor representing current value, new descriptor is created and left on cleanup stack, ownership passed back to client

Implements MAknQueryValue.

virtual IMPORT_C const MDesCArray* CAknQueryValuePhone::MdcArray  )  const [virtual]
 

Returns the array as a descriptor array, ownership will be not passed.

Implements MAknQueryValue.

static IMPORT_C CAknQueryValuePhone* CAknQueryValuePhone::NewL  )  [static]
 

First stage of two stage construction.

static IMPORT_C CAknQueryValuePhone* CAknQueryValuePhone::NewLC  )  [static]
 

First stage of two stage construction.

IMPORT_C void CAknQueryValuePhone::SetArrayL const CAknQueryValuePhoneArray aArray  ) 
 

Set the array.

Parameters:
aArray  pointer to array, ownership is not passed
virtual IMPORT_C void CAknQueryValuePhone::SetCurrentValueIndex const TInt  aIndex  )  [virtual]
 

Changes the current value to correspond to a value in the array.

Parameters:
aIndex  index in array of value to set as current

Implements MAknQueryValue.

IMPORT_C void CAknQueryValuePhone::SetQueryCaption TInt  aResourceId  ) 
 

Set the string used for the query caption to be a string other than the default.

Parameters:
aResourceId  resource id of string to use for caption.
IMPORT_C HBufC* CAknQueryValuePhone::Value  )  const
 

Return the current value, which may have been set by the user.

Returns:
The current value, ownership is not passed

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

Copyright © Nokia Corporation 2001-2008
Back to top