#include <mw/AknQueryDialog.h>
class CAknQueryDialog : public CAknDialog |
Protected Attributes | |
---|---|
CAknQueryDialogExtension * | iExtension |
TBitFlags16 | iFlags |
TDesC * | iPrompt |
CAknKeySoundSystem * | iSoundSystem |
TInt | iSpare_1 |
TTone | iTone |
Public Member Enumerations | |
---|---|
enum | TTone { ENoTone, EConfirmationTone, EWarningTone, EErrorTone } |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | DoSetPromptL() |
CCoeControl * | FindControlOnAnyPageWithControlType(TInt, TInt *, TInt *) |
TBitFlags16 & | Flags() |
const TBitFlags16 & | Flags() |
TInt | GetLeftCBAShortKeyPress() |
TInt | GetRightCBAShortKeyPress() |
TBool | IsLeftSoftkeyVisible() |
void | LayoutAndDraw() |
virtual IMPORT_C TBool | OkToExitL(TInt) |
void | PlayTone() |
virtual IMPORT_C void | PostLayoutDynInitL() |
virtual IMPORT_C void | PreLayoutDynInitL(void) |
IMPORT_C TPtrC | Prompt() |
virtual IMPORT_C CAknQueryControl * | QueryControl() |
void | ReportUserActivity() |
virtual IMPORT_C void | SetSizeAndPosition(const TSize &) |
CAknKeySoundSystem * | SoundSystem() |
TTone & | Tone() |
const TTone & | Tone() |
virtual IMPORT_C void | UpdateLeftSoftKeyL() |
Inherited Attributes | |
---|---|
CAknDialog::iMenuBar | |
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikDialog:@129 |
General query dialog
Use for confirmation queries
TBitFlags16 | iFlags | [protected] |
Flags for emergency call support Need these at least to store the ECS state until the control exists
TTone | iTone | [protected] |
Tone which is played when the query is executed These will be made private, use protected methods
Enumeration for tones.
The tone played before the dialog is shown. Application specific tones may be played by casting the application defined Sound ID (SID), to TTone
IMPORT_C | CAknQueryDialog | ( | const TTone & | aTone | ) |
Construction
Deprecated: will be made protected - use NewL
IMPORT_C void | DismissQueryL | ( | ) | [virtual] |
Called by NeedToDismissQueryL(), gives a change to either accept or reject the query. Default implementation is to accept the query if the Left soft key is displayed and reject it otherwise. Left softkey is only displayed if the query has valid data into it.
IMPORT_C void | DoSetPromptL | ( | ) | [protected, virtual] |
Set the prompt inside the query control. If dialog is active redo layout and draw.
Reimplemented from CAknDialog::ExecuteLD(TInt)
Call PrepareLC and display dialog.
Identical to version in CEikDialog but need to override this because of version with prompt, compiler will complain if this is not implemented in derived class as well
Parameter | Description |
---|---|
aResourceId | resource for query |
CCoeControl * | FindControlOnAnyPageWithControlType | ( | TInt | aControlType, |
TInt * | aLineIndex = 0, | |||
TInt * | aPageIndex = 0 | |||
) | const [protected] |
To be used to go through every control in the dialog, on every page, in Dialog-internal storage order, until a control with that type is found. If such a control is not found, a null pointer will be returned.
Parameter | Description |
---|---|
aControlType | - Enum used to identify the control type on that CEikCaptionedControl Line |
aLineIndex | - Optional argument, if used contains reference to an int which holds the initial line to start searching on, and on finding a control of that type, is assigned the next position to start searching. |
aPageIndex | - Optional argument, if used contains reference to an int which holds the initial dialog page to start searching on, and on finding a control of that type, is assigned the page that the control was found on. |
TInt | GetLeftCBAShortKeyPress | ( | ) | [protected] |
Returns left CBA short key press
Returns: Id of the left CBA
TInt | GetRightCBAShortKeyPress | ( | ) | [protected] |
Returns right CBA short key press
Returns: Id of the right CBA
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CAknDialog::HandlePointerEventL(const TPointerEvent &)
Handles pointer events
IMPORT_C TBool | HandleQueryEditorSizeEventL | ( | CAknQueryControl * | aQueryControl, |
TQueryControlEvent | aEventType | |||
) |
Gets called when editor sends size event.
Parameter | Description |
---|---|
aQueryControl | Pointer to query control which sent the event |
aEventType | Type of the event |
IMPORT_C TBool | HandleQueryEditorStateEventL | ( | CAknQueryControl * | aQueryControl, |
TQueryControlEvent | aEventType, | |||
TQueryValidationStatus | aStatus | |||
) |
Gets called when editor sends state event
Parameter | Description |
---|---|
aQueryControl | Pointer to query control which sent the event |
aEventType | Type of the event |
aStatus | Editor validation status |
IMPORT_C CAknPopupHeadingPane * | Heading | ( | ) | const |
Deprecated method to return pointer to query heading or NULL (use QueryHeading())
will be removed (use QueryHeading() method instead)
IMPORT_C TCoeInputCapabilities | InputCapabilities | ( | ) | const [virtual] |
Reimplemented from CEikDialog::InputCapabilities()const
From CCoeControl. Gets the control's input capabilities.
Returns: The control's input capabilities.
TBool | IsLeftSoftkeyVisible | ( | ) | [protected] |
Returns whether the left softkey is visible
Returns: ETrue is the left softkey is visible
IMPORT_C void | MakeLeftSoftkeyVisible | ( | TBool | aVisible | ) |
Set visibility of the left softkey. Softkey is hidden when data in the query is not acceptable.
Parameter | Description |
---|---|
aVisible | EFalse hides softkey label, ETrue shows it. |
IMPORT_C TInt | MaxTextLength | ( | const CAknQueryControl * | aControl, |
const TDes & | aDataText, | |||
TInt | aApiValue | |||
) | [static] |
Return the maximum possible length of the query text This is (in order of precedence, and assuming they are valid i.e. less than or equal to the length of the descriptor passed to return the value) dependent on:
1) aApiValue
2) Resource set value held in aControl
3) The MaxLength of the descriptor
Returns: maximum text length
IMPORT_C TInt | MaxTextLength | ( | const CAknQueryControl * | aControl, |
const TDes * | aDataText, | |||
TInt | aApiValue | |||
) | [static] |
use other version of MaxTextLength
IMPORT_C CAknQueryDialog * | NewL | ( | const TTone & | aTone = ENoTone | ) | [static] |
Second phase construction required to align with multiline queries API In future might use MAknQueryData mixin in the base class, hence requiring second phase construction.
Returns: pointer to CAknQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TDes & | aText, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknTextQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TInt & | aNumber, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknNumberQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TTime & | aTime, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknTimeQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TTimeIntervalSeconds & | aTime, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknDurationQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TReal & | aNumber, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknFloatQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TInetAddr & | aInetAddr, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Returns: pointer to CAknIpQueryDialog
IMPORT_C CAknQueryDialog * | NewL | ( | TPosition & | aValue, |
const TTone & | aTone = ENoTone | |||
) | [static] |
Not yet totally implemented!
Returns: pointer to CAknLocationQueryDialog
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CAknDialog::OfferKeyEventL(const TKeyEvent &,TEventCode)
From CCoeControl
Handle key events. When a key event occurs, until one of them returns EKeyWasConsumed to indicate that it processed the key event. CONE calls this function for each control on the control stack,
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.
Reimplemented from CAknDialog::OkToExitL(TInt)
From CEikdialog
This function is called by the EIKON framework if the user activates a button in the button panel. It is not called if the Cancel button is activated, unless the EEikDialogFlagNotifyEsc flag is set.
Parameter | Description |
---|---|
aButtonId | The ID of the button that was activated |
Returns: Should return ETrue if the dialog should exit, and EFalse if it should not.
IMPORT_C void | PostLayoutDynInitL | ( | ) | [protected, virtual] |
Reimplemented from CEikDialog::PostLayoutDynInitL()
From CEikdialog
This function is called by the EIKON dialog framework just before the dialog is activated, after it has called PreLayoutDynInitL() and the dialog has been sized.
IMPORT_C void | PreLayoutDynInitL | ( | void | ) | [protected, virtual] |
Reimplemented from CEikDialog::PreLayoutDynInitL()
From CEikdialog
This function is called by the EIKON dialog framework just before the dialog is activated, but before it is sized, and before PostLayoutDynInitL() is called.
IMPORT_C CAknQueryControl * | QueryControl | ( | ) | const [protected, virtual] |
Return pointer to query control or NULL
IMPORT_C CAknPopupHeadingPane * | QueryHeading | ( | ) | const [virtual] |
Return pointer to query heading or NULL
IMPORT_C void | RemoveEditorIndicator | ( | ) |
Removes the editor indicators for this dialog. Used to ensure this dialog does not own any editor indicators. before opening another dialog which outlasts this one.
IMPORT_C TInt | RunLD | ( | ) | [virtual] |
Reimplemented from CAknDialog::RunLD()
Runs the querydialog and returns the ID of the button used to dismiss it. The dialog is destroyed on exit.
IMPORT_C void | SetEmergencyCallSupport | ( | TBool | aOnOff | ) |
Enable or disable emergency call support. This method is only valid in numeric queries (secret or normal).
Default is Off for both.
Parameter | Description |
---|---|
aOnOff | Sets emergency call support active or inactive, if feature is available in current type of control |
IMPORT_C void | SetEmergencyCallSupportForCBA | ( | TBool | aOnOff | ) |
Enable or disable support to change the CBA labels of the query according to the current ECS state. It's necessary to enable this alongside with ECS for touch and full screen queries.
Note that if enabling this, then it's not necessary to call SetEmergencyCallSupport( ETrue ) additionally, as when enabling this, CAknQueryControl::EEmergencyCallsEnabledByAPI will also be set. To enable the ECS via this method, it must be called prior to PreLayoutDynamicInitL.
If this is enabled for CAknQueryDialog-derived classes, then the OkToExitL implementation of those should forward the EAknSoftkeyEmergencyCall events to the base class' OkToExitL for the emergency call event to be handled.
This method is only valid in numeric queries (secret or normal), default is Off for both.
Parameter | Description |
---|---|
aOnOff | ETrue to enable the ECS CBA support, EFalse otherwise. |
IMPORT_C void | SetHeaderImageL | ( | CEikImage * | aImage | ) |
use QueryHeading() method instead
IMPORT_C void | SetHeaderTextL | ( | const TDesC & | aHeader | ) |
use QueryHeading() method instead
IMPORT_C void | SetPredictiveTextInputPermitted | ( | TBool | aPermitted | ) |
This method can be used to set predictive text entry permitted. The default Query behaviour is to supress predictive entry (over-riding editor resource flags that may indicate otherwise.
This may be called at any time prior to activation of the query.
Parameter | Description |
---|---|
aPermitted | ETrue - allow predictive text entry |
IMPORT_C void | SetPromptL | ( | const TDesC & | aPrompt | ) |
Set prompt text for query. This this will override text given in constructor.
Parameter | Description |
---|---|
aPrompt | Text for prompt |
IMPORT_C void | SetSizeAndPosition | ( | const TSize & | aSize | ) | [protected, virtual] |
Reimplemented from CEikDialog::SetSizeAndPosition(const TSize &)
From CEikdialog
EIKON provides an implementation of this function, which positions the dialog in the centre of the screen. However, it can be overridden by derived classes.
Parameter | Description |
---|---|
aSize | The size for the dialog. |