diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93.dita --- a/Symbian3/PDK/Source/GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93.dita Tue Mar 30 11:56:28 2010 +0100 @@ -4,49 +4,71 @@ "Eclipse Public License v1.0" which accompanies this distribution, and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> Queries +--> + +Queries

A query is a state where the software waits for user input. Queries are used in situations with more than one ways to proceed, when the application needs data from the user, or when it is necessary to make sure the user knows what is happening. A query must be exited before the application can proceed.

Queries are displayed in pop-up windows. The following query types can be used:

-
    -
  • Confirmation -query: a question or notice with one or two possible responses.

  • -
  • List query: -a question with a selection of more than two possible (predefined) responses -in a list.

  • -
  • Grid query: -a question with a selection of more than two possible (predefined) responses -in a grid.

  • -
  • Multi-selection -list query: presents a list of items; the user can select any number -of them.

  • -
  • Data query: -used for numeric or textual input.

  • -
  • Message query: -used for various purposes in queries that are longer than one screen.

  • -
-
Using queries in C++ -applications

The APIs to use for queries are the Queries -API, Dialogs -API, and the Popups -API. For implementation information, see Using -the Dialogs API.

Query dialogs are dialogs that can be used to -require user input or user selection. All query dialogs derive from CAknQueryDialog, -which inherits CAknDialog. + + + + +

Query types

+

Description

+
+ + + +

Confirmation query

+

A question or notice with one or two possible responses.

+
+ +

List query

+

A question with a selection of more than two possible (pre-defined) +responses in a list.

+
+ +

Grid query

+

A question with a selection of more than two possible (pre-defined) +responses in a grid.

+
+ +

Multi-selection list query

+

Presents a list of items; the user can select any number of them.

+
+ +

Data query

+

Used for numeric or textual input.

+
+ +

Message query

+

Used for various purposes in queries that are longer than one screen.

+
+ + +
+

Using +queries in C++ applications

The APIs to use for queries are the +Queries API, Dialogs API, and the Popups API. For implementation information, see Using the Dialogs API.

Query dialogs are dialogs +that can be used to require user input or user selection. All query dialogs +derive from CAknQueryDialog, which inherits CAknDialog. There are two types of queries: local and global queries. Local query dialogs are local to a certain application. That means they are only displayed within this application. Global query dialogs are system-wide queries, and are shown topmost even when another application moves to the foreground. Query dialogs -require resource definitions when they are used in your code.

In -order to have a header pane, the AVKON_HEADING component -should be specified as the first dialog line in the resource description.

At -runtime, the dialog's header pane (CAknPopupHeadingPane) can be obtained by calling the method CAknQueryDialog::QueryHeading().

The following -parts are available for modification from the class CAknQueryDialog:

    +require resource definitions when they are used in your code.

    To +have a header pane, the AVKON_HEADING component should be +specified as the first dialog line in the resource description.

    At +runtime, the dialog's header pane (CAknPopupHeadingPane) +can be obtained by calling the method CAknQueryDialog::QueryHeading().

    The +following parts are available for modification from the class CAknQueryDialog:

    • Data query

      • Header text

      • Header image/animation

      • @@ -65,7 +87,8 @@

      The following example illustrates the resource definition for the Secret Editor Query, which contains a Secret Editor, resides inside the dialog. The values for flags, type, id, and control are specific to the query dialog. -These values are enumerated in the file avkon.hrh, which is in the ./epoc32/include folder.

      RESOURCE DIALOG r_aknexquery_code_query +These values are enumerated in the file avkon.hrh, which +is in the ./epoc32/include folder.

      RESOURCE DIALOG r_aknexquery_code_query { flags = EGeneralQueryFlags buttons = R_AVKON_SOFTKEYS_OK_CANCEL; @@ -88,6 +111,5 @@ }; }

      The query in the above example includes a secret editor. For -information on implementing secret editors, see the Editors -API.

+information on implementing secret editors, see the Editors API.

See also:

\ No newline at end of file