#include <mw/aknQueryControl.h>
| class CAknQueryControl : public CAknControl |
| Protected Attributes | |
|---|---|
| CAknBitmapAnimation * | iAnimation |
| TInt | iControl |
| CEikDateEditor * | iDateEdwin |
| CAknButton * | iDecreaseValueButton |
| TSize | iDialogSize |
| CEikDurationEditor * | iDurationEdwin |
| CAknEcsDetector * | iEcsDetector |
| TAknQueryEcsObserver * | iEcsObserver |
| CAknQueryEditIndicator * | iEditIndicator |
| TAknLayoutRect | iEditorFrame |
| TAknLayoutRect | iEditorHorShadow |
| TAknLayoutRect | iEditorVerShadow |
| CEikEdwin * | iEdwin |
| TBitFlags16 | iFlags |
| CEikFloatingPointEditor * | iFloatingPointEditor |
| TBool | iHasEditor |
| CEikImage * | iImage |
| CAknButton * | iIncreaseValueButton |
| TAknLayoutRect | iLayoutMfne |
| CArrayFixFlat< TInt > * | iLineWidths |
| CAknIntegerEdwin * | iNumberEdwin |
| TInt | iNumberOfEditorLines |
| CAknNumericSecretEditor * | iPinEdwin |
| CAknTextControl * | iPrompt |
| MAknQueryControlObserver * | iQueryControlObserver |
| TInt | iQueryType |
| CEikSecretEditor * | iSecretEd |
| TUint16 | iSpare_1 |
| CEikTimeEditor * | iTimeEdwin |
| Public Member Enumerations | |
|---|---|
| enum | anonymous { ETypeId } |
| enum | TLayoutMethod { EConfQueryLayoutM, EDataQueryLayoutM, ECodeQueryLayoutM, ETimeQueryLayoutM, ..., ECombinedCodeDataQueryLayoutM } |
| enum | TQueryControlFlagBitIndices { EEmergencyCallsEnabledByAPI, EEmergencyCallsDisabledByAPI, EPredictiveTextEntryPermitted, EEditorIndicatorOff, EEmergencyCallsCBASupport } |
| Protected Member Functions | |
|---|---|
| virtual void | ConstructQueryL(TResourceReader &) |
| TRect | DialogRect() |
| TSize | DialogSize() |
| void | DialogSizeChanged() |
| virtual void | Draw(const TRect &) |
| void | DrawEditorFrame(CWindowGc &, TRect &) |
| void | Layout() |
| virtual void | LayoutEditor(const TLayoutMethod &) |
| virtual void | LayoutEditorFrame(const TLayoutMethod &) |
| virtual void | LayoutEditorIndicator(const TLayoutMethod &) |
| virtual void | LayoutImageOrAnim(const TLayoutMethod &) |
| virtual void | LayoutPrompt(const TLayoutMethod &) |
| virtual TRect | LayoutRect() |
| CAknLocationEditor *& | LocationEd() |
| CAknLocationEditor * | LocationEd() |
| TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
| CAknQueryExtension * | QueryExtension() |
| virtual void | SetLineWidthsL() |
| virtual void | SizeChanged() |
| Inherited Attributes | |
|---|---|
| CCoeControl::iCoeEnv | |
| CCoeControl::iContext | |
| CCoeControl::iPosition | |
| CCoeControl::iSize | |
| Inherited Enumerations | |
|---|---|
| CCoeControl:TZoomType | |
The control for a query dialog.
Manage layout of elements in a query dialog:- the text, the image and the editors.
See also: CAknQueryDialog, CAknText
Layout for queries can be done using the following methods. Each method is specified in a LAF section
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
| void | AttemptEmergencyCallL | ( | ) |
Attempts to make an emergency call if a valid emergency number has been entered to the query.
| void | CancelQueryL | ( | ) |
This cancels the query. Used when the query control has to get abandon the query for some reason
| IMPORT_C TBool | CheckNumber | ( | ) |
Checks if the given number in the editor is within the maximum and minimum values.
| CCoeControl * | ComponentControl | ( | TInt | anIndex | ) | const [virtual] |
Reimplemented from CCoeControl::ComponentControl(TInt)const
From CCoeControl Get the components of a compound control. It returns one of the control's component controls, identified by aIndex.
| Parameter | Description |
|---|---|
| anIndex | The index of the control to get. |
Returns: The component control with an index of aIndex.
| IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aRes | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Second phase constructor: loads contents of array from resources.
| void | ConstructQueryL | ( | TResourceReader & | aRes | ) | [protected, virtual] |
After having read the query type from resource. This method is called in CostructFromResourceL()
See also: ConstructFromResourceL()
| IMPORT_C CCoeControl * | ControlByLayoutOrNull | ( | TInt | aLayout | ) | [virtual] |
Get pointer to query controls control (editor)
| Parameter | Description |
|---|---|
| aLayout | Controls layout (for one line queries use EDataLayout, ECodeLayout... and for multiline queries use EMultiDataFirstEdwin, EMultiDataSecondEdwin...) |
Returns: Pointer to control, NULL if not found
| TInt | CountComponentControls | ( | ) | const [virtual] |
Reimplemented from CCoeControl::CountComponentControls()const
From CCoeControl Count number of controls contained in a compound control.
Returns: The number of component controls contained by this control.
| TRect | DialogRect | ( | ) | const [protected] |
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 [protected] |
Return the size of the dialog. This equals to the control size plus the margins.
| void | DialogSizeChanged | ( | ) | [protected] |
Calculates the size of the dialog. This can be determined using LAF values and is equal to the control size plus the margins.
| void | Draw | ( | const TRect & | aRect | ) | const [protected, virtual] |
Reimplemented from CCoeControl::Draw(const TRect &)const
From CCoeControl Draw a control.
| Parameter | Description |
|---|---|
| aRect | The region of the control to be redrawn. |
| TBool | EditorContentIsValidL | ( | ) | const |
Returns: true if the content of the editor is valid, false otherwise
| void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
Reimplemented from CCoeControl::FocusChanged(TDrawNow)
From CCoeControl Added to pass-through focus-loss warnings. if not ready, this will leave.
Returns: Indicates whether or not the key event was used by this control.
| void | GetCaption | ( | TDes & | aCaption | ) | const |
Return prompt needed by FEP to query dialog
| IMPORT_C TTimeIntervalSeconds | GetDuration | ( | ) | const |
Get duration from duration editor
Returns: Return duration from editor.
| IMPORT_C TReal | GetFloatingPointNumberL | ( | ) | const |
Get number from floating point editor.
Returns: Returns number from editor
| IMPORT_C void | GetLocation | ( | TPosition & | aLocation | ) | const |
Get location from location editor
Modifies aLocation in such way that either longitude or latitude will change.
| IMPORT_C void | GetText | ( | TDes & | aDes | ) | const |
Get text from text, secret text, numeric secret text snd phonenumber editor.
| Parameter | Description |
|---|---|
| aDes | Address of variable where text returned. |
| IMPORT_C TInt | GetTextEntryLength | ( | ) | const |
Return the max length of the text in the text editor
Returns: max text length
| IMPORT_C void | HandleControlEventL | ( | CCoeControl * | aControl, |
| TCoeEvent | aEventType | |||
| ) | ||||
From MCoeControlObserver
| Parameter | Description |
|---|---|
| aControl | Control who caused the event |
| aEventType | Type of the event |
| IMPORT_C void | HandleEdwinEventL | ( | CEikEdwin * | aEdwin, |
| TEdwinEvent | aEventType | |||
| ) | ||||
From MEikEdwinObserver
| Parameter | Description |
|---|---|
| aEdwin | Editor who sent the event |
| aEventType | Type of the event |
| IMPORT_C TBool | HandleEdwinSizeEventL | ( | CEikEdwin * | aEdwin, |
| TEdwinSizeEvent | aEventType, | |||
| TSize | aDesirableEdwinSize | |||
| ) | ||||
From MEikEdwinObserver
| Parameter | Description |
|---|---|
| aEdwin | Editor who's size has changed |
| aEventType | Type of the size event |
| aDesirableEdwinSize | Desirable size of the edwin |
| IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CCoeControl::HandlePointerEventL(const TPointerEvent &)
From CCoeControl. Handles pointer events
| IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CCoeControl::HandleResourceChange(TInt)
| void | LayoutEditor | ( | const TLayoutMethod & | aLayoutM | ) | [protected, virtual] |
Layout the text editor
| void | LayoutEditorFrame | ( | const TLayoutMethod & | aLayoutM | ) | [protected, virtual] |
Layout the editor frame
| void | LayoutEditorIndicator | ( | const TLayoutMethod & | aLayoutM | ) | [protected, virtual] |
Layout the editor state indicator icons
| void | LayoutImageOrAnim | ( | const TLayoutMethod & | aLayoutM | ) | [protected, virtual] |
Layout the image or the animation
| void | LayoutPrompt | ( | const TLayoutMethod & | aLayoutM | ) | [protected, virtual] |
Layout the query prompt
| TRect | LayoutRect | ( | ) | [protected, virtual] |
Layout rectangle (shift up and left by margins)
| IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
From CCoeControl Give the control a mimimum size.
Returns: The minimum size required by the control.
| TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
Reimplemented from CCoeControl::MopSupplyObject(TTypeUid)
From MObjectProvider
| IMPORT_C TInt | NbrOfEditorLines | ( | ) | const |
Return number of editor lines
Returns: Number lines in the editor
| IMPORT_C TInt | NbrOfPromptLines | ( | ) | const |
Return number of prompt lines
Returns: Number of lines in the prompt
| IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
| TEventCode | aType | |||
| ) | [virtual] | |||
Reimplemented from CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
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.
| Parameter | Description |
|---|---|
| aKeyEvent | The key event. |
| aType | The type of the event: EEventKey, EEventKeyUp or EEventKeyDown. |
Returns: Indicates whether or not the key event was used by this control.
| void | PrepareForFocusLossL | ( | ) | [virtual] |
Reimplemented from CCoeControl::PrepareForFocusLossL()
From CCoeControl Added to pass-through focus-loss warnings. if not ready, this will leave.
Returns: Indicates whether or not the key event was used by this control.
| CAknQueryExtension * | QueryExtension | ( | ) | const [protected] |
Get the extension object instance, if any exists.
| TInt | QueryType | ( | ) | const [inline] |
At the moment the layout is a good indication of the query type (PIN,number,etc) The query dialog uses this information to determine query type in order to process key events in a way dependent on the query type. These key events can't be processes by the control directly because they involve actions only the dialog can perform
Returns: Layout indication
| IMPORT_C void | ReadPromptL | ( | TResourceReader & | aRes | ) | [virtual] |
Read prompt text from resource and call SetPrompt if there was text for prompt.
| Parameter | Description |
|---|---|
| aRes | resource reader pointed to a query resource |
| void | SetAndUseFlagsL | ( | TBitFlags16 | aFlags | ) |
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.
| IMPORT_C void | SetDuration | ( | TTimeIntervalSeconds & | aDuration | ) |
Set duration to duration editor
| Parameter | Description |
|---|---|
| aDuration | Duration to editor |
| void | SetEcsCbaVisibleL | ( | TBool | aVisible | ) |
Sets the ECS CBA visibility in the query.
TBool aVisible ETrue if an ECS number is entered to the query, EFalse otherwise.
| IMPORT_C void | SetFloatingPointNumberL | ( | const TReal * | aNumber | ) |
Set number to floating point editor
| Parameter | Description |
|---|---|
| aNumber | Number to editor |
| IMPORT_C void | SetImageL | ( | CEikImage * | aImage | ) |
Sets and overrides other image or animation Takes ownership of aImage
| void | SetLineWidthsL | ( | ) | [protected, virtual] |
Determine the line widths for the prompt, depends on layout
| IMPORT_C void | SetLocation | ( | const TPosition & | aLocation | ) |
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.
| Parameter | Description |
|---|---|
| aLocation | Location to editor |
| IMPORT_C void | SetMinimumAndMaximum | ( | const TTimeIntervalSeconds & | aMinimumDuration, |
| const TTimeIntervalSeconds & | aMaximumDuration | |||
| ) | ||||
Set minimum and maximum duration to editor
| Parameter | Description |
|---|---|
| aMinimumDuration | Minimum value |
| aMaximumDuration | Maximum value |
| IMPORT_C void | SetNumberL | ( | TInt | aNumber | ) |
Set number to number editor
| Parameter | Description |
|---|---|
| aNumber | Number to editor |
| IMPORT_C void | SetNumberOfEditorLines | ( | TInt | aNum | ) |
Set the number of lines in the editor.
| Parameter | Description |
|---|---|
| aNum | Number of lines in the editor |
| IMPORT_C void | SetPromptL | ( | const TDesC & | aDesC | ) | [virtual] |
Set prompt text for query. This call WrapToStringL.
| Parameter | Description |
|---|---|
| aDesC | Text for prompt |
| IMPORT_C void | SetQueryControlObserver | ( | MAknQueryControlObserver * | aQueryControlObserver | ) |
Set observer for query control.
| Parameter | Description |
|---|---|
| aQueryControlObserver | Pointer to oberver class |
| IMPORT_C void | SetTextEntryLength | ( | TInt | aLength | ) |
Set max length of text to text editor. This will override length from resource
| Parameter | Description |
|---|---|
| aLength | Max length of text in editor |
| IMPORT_C void | SetTextL | ( | const TDesC & | aDesC | ) |
Set text to text and phonenumber editor.
| Parameter | Description |
|---|---|
| aDesC | Text for editor |
| IMPORT_C void | SetTime | ( | TTime & | aTime | ) |
Set date of time to editor
| Parameter | Description |
|---|---|
| aTime | Time or date to editor. |
| void | SizeChanged | ( | ) | [protected, virtual] |
Reimplemented from CCoeControl::SizeChanged()
From CCoeControl Respond to size changed. This function is called by CONE whenever SetExtentL(), SetSizeL(), SetRectL(), SetCornerAndSizeL(), or SetExtentToWholeScreenL() are called on the control.
| void | WindowLayout | ( | TAknWindowLineLayout & | aLayout | ) | const [virtual] |
Return window layout depending on Layout Window layout is done by the dialog