MAknQueryValue Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <aknqueryvalue.h>

Inherited by CAknQueryValue.


Detailed Description

Mixin class representing a value that is accessed as text.

The Value can be changed by creating an editor dialog, which may be either a query or a setting page or optionally by choosing an entry from an array of values. The array can be accessed as a descriptor array, and the value can be accessed as a descriptor.


Public Types

enum   TMode { EQueryMode, ESettingPageMode }
  Possible modes are query & setting page. More...

Public Member Functions

virtual  ~MAknQueryValue ()
virtual const MDesCArray *  MdcArray () const =0
  Returns the array as a descriptor array, ownership will be not passed.
virtual HBufC *  CurrentValueTextLC ()=0
  This should be implemented so that it returns the current value as text.
virtual TInt  CurrentValueIndex () const =0
  Returns the index in the array of the current value.
virtual void  SetCurrentValueIndex (const TInt aIndex)=0
  Changes the current value to correspond to a value in the array.
virtual TBool  CreateEditorL ()=0
  Creates an editor within context.
virtual void  SetQueryMode (MAknQueryValue::TMode aMode)=0
  Set QueryMode to be whether query or settingpage -mode.
virtual void  SetSettingPageResourceIds (TInt aSettingPageResourceId, TInt aSettingPageEditorResourceId)=0
  Override the default resource IDs used if a Setting Page mode query is put up.
virtual void  SetAutoAppend (TBool aAppend)=0
  Set the QueryValue to append a new user value, if distinct from former value.

Protected Types

enum   TFlagBits { ESettingPageModeBitIndex = 0, EAutoAppendBitIndex }
  If EAutoAppendBitIndex is set, the query value auto appends new values. More...

Protected Member Functions

virtual void  AppendValueIfNewL ()=0
  Method to add the current value to the QueryValueArray if it is new.

Member Enumeration Documentation

enum MAknQueryValue::TFlagBits [protected]
 

If EAutoAppendBitIndex is set, the query value auto appends new values.

Enumerator:
ESettingPageModeBitIndex 
EAutoAppendBitIndex 
enum MAknQueryValue::TMode
 

Possible modes are query & setting page.

Enumerator:
EQueryMode 
ESettingPageMode 

Constructor & Destructor Documentation

virtual MAknQueryValue::~MAknQueryValue  )  [inline, virtual]
 

Member Function Documentation

virtual void MAknQueryValue::AppendValueIfNewL  )  [protected, pure 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"

Implemented in CAknQueryValue, CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual TBool MAknQueryValue::CreateEditorL  )  [pure 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

Implemented in CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual TInt MAknQueryValue::CurrentValueIndex  )  const [pure virtual]
 

Returns the index in the array of the current value.

If no matches, returns zero

Implemented in CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual HBufC* MAknQueryValue::CurrentValueTextLC  )  [pure 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

Implemented in CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual const MDesCArray* MAknQueryValue::MdcArray  )  const [pure virtual]
 

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

Implemented in CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual void MAknQueryValue::SetAutoAppend TBool  aAppend  )  [pure virtual]
 

Set the QueryValue to append a new user value, if distinct from former value.

Parameters:
aAppend  set/unset flag EAutoAppendBitIndex

Implemented in CAknQueryValue.

virtual void MAknQueryValue::SetCurrentValueIndex const TInt  aIndex  )  [pure virtual]
 

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

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

Implemented in CAknQueryValueDate, CAknQueryValueDuration, CAknQueryValueNumber, CAknQueryValuePhone, CAknQueryValueText, and CAknQueryValueTime.

virtual void MAknQueryValue::SetQueryMode MAknQueryValue::TMode  aMode  )  [pure virtual]
 

Set QueryMode to be whether query or settingpage -mode.

Parameters:
aMode  value from
TMode

Implemented in CAknQueryValue.

virtual void MAknQueryValue::SetSettingPageResourceIds TInt  aSettingPageResourceId,
TInt  aSettingPageEditorResourceId
[pure virtual]
 

Override the default resource IDs used if a Setting Page mode query is put up.

All Queryvalue implementations should have default resource set up. Hence this need not be called unless non-default resource is required.

THE IMPLEMENTATION OF THESE RESOURCE OVERRIDES IS RESERVED FOR FUTURE VERSIONS OF SERIES 60. NOT CURRENTLY FUNCTIONAL. DO NOT USE.

The rules for usage of these ids is the same as that for the CAknSettingPage constructors that take both these resources Editor Resource Setting Page Resource present present Both are used (but text & number overridden) = 0 present Editor resource is used via SP resource present = 0 default SP resource for the query type is used + this editor resource

The type of the editor resource is fixed. If editor resource override is being used, then the resource must be for that control type of editor used in the CAknQueryValueXXXX class.

Parameters:
aSettingPageResourceId  AVKON_SETTING_PAGE resource ID to use
aSettingPageEditorResourceId  Editor resource ID to use (takes precedence)

Implemented in CAknQueryValue.


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

Copyright © Nokia Corporation 2001-2008
Back to top