API published in: S60 1st Ed
Link against: avkon.lib
Required Capabilities
None
#include <aknquerycontrol.h>
Inherits CAknControl, MEikEdwinObserver, and MEikEdwinSizeObserver.
Inherited by CAknExtQueryControl, and CAknMultilineQueryControl.
Manage layout of elements in a query dialog:- the text, the image and the editors.
Public Types |
|
enum | TLayoutMethod { EConfQueryLayoutM, EDataQueryLayoutM, ECodeQueryLayoutM, ETimeQueryLayoutM, EDateQueryLayoutM, ECombinedCodeDataQueryLayoutM } |
Layout for queries can be done using the following methods. More... |
|
Public Member Functions |
|
DECLARE_TYPE_ID (0x10283143) public | |
Enumeration for indexing into control flags, which determine the control behaviour relative to a number of things, e.g. |
|
IMPORT_C | CAknQueryControl () |
C++ Constructor. |
|
virtual IMPORT_C | ~CAknQueryControl () |
C++ Destructor. |
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aRes) |
Second phase constructor: loads contents of array from resources. |
|
IMPORT_C void | SetQueryControlObserver (MAknQueryControlObserver *aQueryControlObserver) |
Set observer for query control. |
|
virtual IMPORT_C void | ReadPromptL (TResourceReader &aRes) |
Read prompt text from resource and call SetPrompt if there was text for prompt. |
|
virtual IMPORT_C void | SetPromptL (const TDesC &aDesC) |
Set prompt text for query. |
|
IMPORT_C void | GetText (TDes &aDes) const |
Get text from text, secret text, numeric secret text snd phonenumber editor. |
|
IMPORT_C TTime | GetTime () const |
Get time from date or time editors. |
|
IMPORT_C TInt | GetNumber () const |
Get number from number editor. |
|
IMPORT_C TReal | GetFloatingPointNumberL () const |
Get number from floating point editor. |
|
IMPORT_C TTimeIntervalSeconds | GetDuration () const |
Get duration from duration editor. |
|
IMPORT_C void | GetLocation (TPosition &aLocation) const |
Get location from location editor. |
|
IMPORT_C void | SetTextL (const TDesC &aDesC) |
Set text to text and phonenumber editor. |
|
IMPORT_C void | SetTime (TTime &aTime) |
Set date of time to editor. |
|
IMPORT_C void | SetDuration (TTimeIntervalSeconds &aDuration) |
Set duration to duration editor. |
|
IMPORT_C void | SetNumberL (TInt aNumber) |
Set number to number editor. |
|
IMPORT_C void | SetFloatingPointNumberL (const TReal *aNumber) |
Set number to floating point editor. |
|
IMPORT_C void | SetLocation (const TPosition &aLocation) |
Set location to location editor. |
|
IMPORT_C void | SetTextEntryLength (TInt aLength) |
Set max length of text to text editor. |
|
IMPORT_C TInt | GetTextEntryLength () const |
Return the max length of the text in the text editor. |
|
IMPORT_C void | SetMinimumAndMaximum (const TTime &aMinimum, const TTime &aMaximum) |
Set minimum and maximum time or date to editor. |
|
IMPORT_C void | SetMinimumAndMaximum (const TTimeIntervalSeconds &aMinimumDuration, const TTimeIntervalSeconds &aMaximumDuration) |
Set minimum and maximum duration to editor. |
|
IMPORT_C void | SetMinimumAndMaximum (TInt aMinimumValue, TInt aMaximumValue) |
Set minimum and maximum number to editor. |
|
IMPORT_C TBool | CheckNumber () |
Checks if the given number in the editor is within the maximum and minimum values. |
|
IMPORT_C void | SetNumberOfEditorLines (TInt aNum) |
Set the number of lines in the editor. |
|
IMPORT_C void | SetMinimumAndMaximum (const TReal &aMinimumValue, const TReal &aMaximumValue) |
Set minimum and maximum number to floating point editor. |
|
IMPORT_C TInt | GetTextLength () const |
Get text length from editor. |
|
IMPORT_C TInt | NbrOfEditorLines () const |
Return number of editor lines. |
|
IMPORT_C TInt | NbrOfPromptLines () const |
Return number of prompt lines. |
|
virtual IMPORT_C CCoeControl * | ControlByLayoutOrNull (TInt aLayout) |
Get pointer to query controls control (editor). |
|
IMPORT_C void | SetImageL (CEikImage *aImage) |
Sets and overrides other image or animation Takes ownership of aImage. |
|
IMPORT_C void | SetImageL (const TDesC &aImageFile, TInt aBmpId, TInt aBmpMaskId) |
Sets and overrides other image or animation. |
|
IMPORT_C void | SetAnimationL (TInt aResource) |
Sets and overrides other animation. |
|
IMPORT_C void | StartAnimationL () |
starts animation if one present |
|
IMPORT_C TInt | CancelAnimation () |
stops animation if one present |
|
void | CancelQueryL () |
This cancels the query. |
|
TBool | EditorContentIsValidL () const |
void | SetAndUseFlagsL (TBitFlags16 aFlags) |
This transfers CAknQueryControl's flags set by the dialog and then uses them. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
From CCoeControl Handle key events. |
|
IMPORT_C TSize | MinimumSize () |
From CCoeControl Give the control a mimimum size. |
|
void | PrepareForFocusLossL () |
From CCoeControl Added to pass-through focus-loss warnings. |
|
void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl Added to pass-through focus-loss warnings. |
|
IMPORT_C void | HandleEdwinEventL (CEikEdwin *aEdwin, TEdwinEvent aEventType) |
From MEikEdwinObserver. |
|
IMPORT_C TBool | HandleEdwinSizeEventL (CEikEdwin *aEdwin, TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize) |
From MEikEdwinObserver. |
|
IMPORT_C void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
From MCoeControlObserver. |
|
TInt | QueryType () const |
virtual void | WindowLayout (TAknWindowLineLayout &aLayout) const |
Return window layout depending on Layout Window layout is done by the dialog. |
|
TInt | CountComponentControls () const |
From CCoeControl Count number of controls contained in a compound control. |
|
CCoeControl * | ComponentControl (TInt anIndex) const |
From CCoeControl Get the components of a compound control. |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl. |
|
IMPORT_C void | HandleResourceChange (TInt aType) |
Protected Member Functions |
|
void | SizeChanged () |
From CCoeControl Respond to size changed. |
|
void | Draw (const TRect &aRect) const |
From CCoeControl Draw a control. |
|
TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
From MObjectProvider. |
|
void | Layout () |
Perform layout by calling SizeChanged. |
|
virtual void | SetLineWidthsL () |
Determine the line widths for the prompt, depends on layout. |
|
virtual void | ConstructQueryL (TResourceReader &aRes) |
After having read the query type from resource. |
|
virtual TRect | LayoutRect () |
Layout rectangle (shift up and left by margins). |
|
TRect | DialogRect () const |
Return the rect that is used by the dialog for layout This can be determined using LAF values and is equal to TPoint(0,0)
plus the control size plus the margins. |
|
TSize | DialogSize () const |
Return the size of the dialog. |
|
void | DialogSizeChanged () |
Calculates the size of the dialog. |
|
virtual void | LayoutPrompt (const TLayoutMethod &aLayoutM) |
Layout the query prompt. |
|
virtual void | LayoutImageOrAnim (const TLayoutMethod &aLayoutM) |
Layout the image or the animation. |
|
virtual void | LayoutEditor (const TLayoutMethod &aLayoutM) |
Layout the text editor. |
|
virtual void | LayoutEditorFrame (const TLayoutMethod &aLayoutM) |
Layout the editor frame. |
|
virtual void | LayoutEditorIndicator (const TLayoutMethod &aLayoutM) |
Layout the editor state indicator icons. |
|
CAknQueryExtension * | QueryExtension () const |
Get the extension object instance, if any exists. |
|
void | DrawEditorFrame (CWindowGc &aGc, TRect &aRect) const |
Draw editor frame and shadows. |
|
CAknLocationEditor *& | LocationEd () |
CAknLocationEditor * | LocationEd () const |
Protected Attributes |
|
CAknTextControl * | iPrompt |
Control for prompt text. |
|
CAknQueryEditIndicator * | iEditIndicator |
Editor indicator icons. |
|
CEikEdwin * | iEdwin |
Edwin editor. |
|
CEikDateEditor * | iDateEdwin |
Date editor. |
|
CEikTimeEditor * | iTimeEdwin |
Time editor. |
|
CEikDurationEditor * | iDurationEdwin |
Duration editor. |
|
CEikSecretEditor * | iSecretEd |
Secret editor. |
|
CAknIntegerEdwin * | iNumberEdwin |
Integer editor. |
|
CAknNumericSecretEditor * | iPinEdwin |
Numeric secret editor. |
|
CEikFloatingPointEditor * | iFloatingPointEditor |
CEikImage * | iImage |
TInt | iControl |
Control id. |
|
TAknLayoutRect | iLayoutMfne |
CAknEcsDetector * | iEcsDetector |
TAknQueryEcsObserver * | iEcsObserver |
TBitFlags16 | iFlags |
TUint16 | iSpare_1 |
CAknBitmapAnimation * | iAnimation |
MAknQueryControlObserver * | iQueryControlObserver |
TInt | iQueryType |
TAknLayoutRect | iEditorVerShadow |
TAknLayoutRect | iEditorHorShadow |
TAknLayoutRect | iEditorFrame |
TInt | iNumberOfEditorLines |
TBool | iHasEditor |
Maximum number of lines in the editor. |
|
CArrayFixFlat< TInt > * | iLineWidths |
CAknButton * | iIncreaseValueButton |
Widths of prompt lines (in pixels). |
|
CAknButton * | iDecreaseValueButton |
TSize | iDialogSize |
Data Structures |
|
class | TIndex |
Manage indexes into LAF tables. More... |
|
|
C++ Constructor. |
|
C++ Destructor. |
|
stops animation if one present
|
|
This cancels the query. Used when the query control has to get abandon the query for some reason |
|
Checks if the given number in the editor is within the maximum and minimum values. |
|
From CCoeControl Get the components of a compound control. It returns one of the control's component controls, identified by aIndex.
Reimplemented in CAknExtQueryControl. |
|
Second phase constructor: loads contents of array from resources.
|
|
After having read the query type from resource. This method is called in CostructFromResourceL()
Reimplemented in CAknMultilineQueryControl, CAknExtMultilineQueryControl, and CAknExtQueryControl. |
|
Get pointer to query controls control (editor).
Reimplemented in CAknMultilineQueryControl, CAknExtMultilineQueryControl, and CAknExtQueryControl. |
|
From CCoeControl Count number of controls contained in a compound control.
Reimplemented in CAknExtQueryControl. |
|
Enumeration for indexing into control flags, which determine the control behaviour relative to a number of things, e.g. emergency control handling, displaying of edit indicator, enabling of predictive text, etc |
|
Return the rect that is used by the dialog for layout This can be determined using LAF values and is equal to TPoint(0,0) plus the control size plus the margins. |
|
Return the size of the dialog. This equals to the control size plus the margins. |
|
Calculates the size of the dialog. This can be determined using LAF values and is equal to the control size plus the margins. |
|
From CCoeControl Draw a control.
|
|
Draw editor frame and shadows. |
|
Reimplemented in CAknExtQueryControl. |
|
From CCoeControl Added to pass-through focus-loss warnings. if not ready, this will leave.
Reimplemented in CAknExtQueryControl. |
|
Get duration from duration editor.
|
|
Get number from floating point editor.
|
|
Get location from location editor. Modifies aLocation in such way that either longitude or latitude will change. |
|
Get number from number editor.
|
|
Get text from text, secret text, numeric secret text snd phonenumber editor.
|
|
Return the max length of the text in the text editor.
|
|
Get text length from editor.
|
|
Get time from date or time editors.
|
|
From MCoeControlObserver.
Reimplemented in CAknExtQueryControl. |
|
From MEikEdwinObserver.
|
|
From MEikEdwinObserver.
|
|
From CCoeControl. Handles pointer events Reimplemented in CAknMultilineQueryControl, CAknExtMultilineQueryControl, and CAknExtQueryControl. |
|
Reimplemented in CAknMultilineQueryControl, and CAknExtMultilineQueryControl. |
|
Perform layout by calling SizeChanged. |
|
Layout the text editor. |
|
Layout the editor frame. |
|
Layout the editor state indicator icons. |
|
Layout the image or the animation. |
|
Layout the query prompt. |
|
Layout rectangle (shift up and left by margins). Reimplemented in CAknMultilineQueryControl, and CAknExtMultilineQueryControl. |
|
|
|
From CCoeControl Give the control a mimimum size.
Reimplemented in CAknMultilineQueryControl, and CAknExtMultilineQueryControl. |
|
From MObjectProvider. |
|
Return number of editor lines.
|
|
Return number of prompt lines.
|
|
From CCoeControl Handle key events. When a key event occurs, CONE calls this function for each control on the control stack, until one of them returns EKeyWasConsumed to indicate that it processed the key event.
|
|
From CCoeControl Added to pass-through focus-loss warnings. if not ready, this will leave.
Reimplemented in CAknExtQueryControl. |
|
Get the extension object instance, if any exists. |
|
|
|
Read prompt text from resource and call SetPrompt if there was text for prompt.
|
|
This transfers CAknQueryControl's flags set by the dialog and then uses them. The method must be called after all the contained controls are constructed; Inside PreLayoutDynamicInitL is recommended.
Reimplemented in CAknExtQueryControl. |
|
Sets and overrides other animation. |
|
Set duration to duration editor.
|
|
Set number to floating point editor.
|
|
Sets and overrides other image or animation. |
|
Sets and overrides other image or animation Takes ownership of aImage. |
|
Determine the line widths for the prompt, depends on layout. Reimplemented in CAknMultilineQueryControl, and CAknExtMultilineQueryControl. |
|
Set location to location editor. Modifies editor in such way that it'll start showing either longitude or latitude from the given location. It depends on resource file flags of the location editor which is used.
|
|
Set minimum and maximum number to floating point editor.
|
|
Set minimum and maximum number to editor.
Reimplemented in CAknExtQueryControl. |
|
Set minimum and maximum duration to editor.
|
|
Set minimum and maximum time or date to editor.
|
|
Set number to number editor.
|
|
Set the number of lines in the editor.
|
|
Set prompt text for query. This call WrapToStringL.
|
|
Set observer for query control.
|
|
Set max length of text to text editor. This will override length from resource
|
|
Set text to text and phonenumber editor.
|
|
Set date of time to editor.
|
|
From CCoeControl Respond to size changed. This function is called by CONE whenever SetExtentL(), SetSizeL(), SetRectL(), SetCornerAndSizeL(), or SetExtentToWholeScreenL() are called on the control. |
|
starts animation if one present |
|
Return window layout depending on Layout Window layout is done by the dialog. |
|
|
Control id. |
|
Date editor. |
|
|
|
Duration editor. |
|
|
|
Editor indicator icons. |
|
|
|
|
Edwin editor. |
|
|
|
Maximum number of lines in the editor. |
|
|
Widths of prompt lines (in pixels). |
|
|
|
Integer editor. |
|
|
Numeric secret editor. |
|
Control for prompt text. |
|
|
|
Secret editor. |
|
|
Time editor. |