UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [Previous] [Next]



QDialogs

Found in: Examples\UIQ\QDialogs


Description

QDialogs should not be looked upon as an ordinary application; its purpose is instead to present the different dialog types that are found in UIQ 3. This application should be used as a guide when you want to create a dialog in your own application. You will see the system dialogs that are provided in UIQ 3 and learn how to create your own dialogs. The dialog classes have been changed in UIQ 3.0; the previous CEikDialog class has been deprecated and is replaced by CQikSimpleDialog and CQikViewDialog.

The application contains three parts: system dialogs, simple dialogs and View-dialogs. Demonstrations of each type of dialog are available in the application, grouped by type in cascading menus.

The UI configuration that is used by the phone determines the look-and-feel of the application. The Dialogs example supports the reference UI Configurations that are supported in the UIQ 3 SDK. For development purposes, the UIQ Environment Configuration Tool, UiqEnv, allows you to change the UI Configuration in the emulator in order to develop and test the application with varying phone styles.

For an introduction to dialog handling in UIQ 3 see New UIQ View-dialogs in the Programmer's Guide and How-To Guides for dialogs.

[Top]


Dialog styles


System dialogs

These examples show the different system dialogs in UIQ 3 and describe how they are used. The system dialogs use the old-style dialog, which uses the CEikDialog class. This class is deprecated, which means the old-dialog style should not be used in dialogs in new applications.

The project demonstrates the usage of the following system dialogs:


Simple dialogs

The simple dialog is a simplified version of the old-style dialog. The simple dialog does not, for example, enable multiple pages using tabs. A simple dialog fits on the screen without scrolling, has no tabs and should only contain one input control. But there can be exceptions where it is more appropriate to have more than one input control in a simple dialog as you can see in the user password example.

There are four simple-dialog examples that highlight different use cases.


View-dialogs

The View-dialog, which inherits from the view class, is in many ways like a view. For example, a View-dialog uses building blocks for the layout of UI controls. It is intended for advanced dialogs that require scrolling or use tabs. This is the primary dialog to use when several input controls are needed.

There are three View-dialog examples that highlight different use cases.

[Top]


Usage

You need to build the QDialogs project from the beginning because the animation image needs to be exported to the correct location.

First, run bldmake from the projects group directory where the bld.inf file is located:

> bldmake bldfiles

This creates a batch file, called abld.bat, which you use in the next step. To build the project, you call abld build which will build the project for all default targets in both release and debug variants. To build for a particular target and variant, use abld build target-name variant, for example,

> abld build winscw udeb

builds the project for the debug variant of WINSCW only. To run it, choose Dialogs from the Launcher.

[Top]


Class summary

CDilaogsApplication is the entry point to the application. The application class defines the properties of the application, such as its UID and caption, and creates a new document.

CDialogsDocument represents the document in the Dialogs application.

CDialogsAppUi represents the application UI in the Dialogs application. It is responsible for creating the view.

CDialogsView is a view that contains commands to launch the different dialogs example. The commands are divided in three cascading menus: system dialogs, simple dialogs and View-dialogs. Command handling for the different dialog types is separated from each other to bring clarity to the differences between the dialog types. This view is responsible for creating the different command handlers and distributing the responsibility for the commands between these handlers.

CDialogsSystemDialogHandler takes care of all system-dialog specific commands for CDialogsView and shows how they can be launched.

CDialogsSimpleDialogHandler takes care of all simple-dialog specific commands for CDialogsView and shows how they can be launched.

CDialogsViewDialogHandler This class takes care of all View-dialog specific commands for CDialogsView and shows how they can be launched.

CDialogsNotifier is a notifier wrapper that allows either an infoprint, which is a single line message, or a simple-dialog box to be displayed on the screen.

CDialogsAnimationDialog presents a label with an animation. This class holds a timer object that notifies when the dialog is to be closed.

CDialogsProgressDialog presents a label with a progress bar. This class holds a timer object that notifies each time the progress bar is to be incremented. When the progress bar is completed, the dialog will be closed.

CDialogsUserPasswordDialog presents a user password dialog that contains a CEikEdwin text editor and a secret editor.

CDialogsEditAlarmDialog presents the alarm dialog that is used to set alarm messages. The dialog consists of a time editor to set when the alarm is to be triggered, a sound selector to set the alarm sound and a CEikEdwin text editor into which an alarm message can be written.

CDialogsMultiPageDialog presents a View-dialog that shows how to create and use a dialog with pages and a scrollbar.

CDialogsListBoxDialog presents a View-dialog that shows how to create and use a list box inside a dialog.