UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



UIQ Controls - View Dialog


1. Introduction

CQikViewDialog is a new framework class that extends CQikMultiPageViewBase and allows for CEikDialog-like invocation. This means that the same code can be used for both views and complex dialogs. A View-dialog looks like a view but behaves like a dialog. Actually, it is a type of view. As with CQikSimpleDialog, it is possible to have different configurations for different screen modes, integral row height and pixel-perfect display. Dialogs that are complex, that require scrolling or use multiple tabs, are prime candidates for CQikViewDialog.


1.1 Further Reference

See the API documentation for CQikViewDialog (CQikViewDialog).

[Top]


2. Architecture

View-dialog inherits from CQikMultiPageViewBase.

High-level architecture of CQikViewDialo...

High-level architecture of CQikViewDialog.

[Top]


3. Using the Control

This section explains how the control is constructed, used and destroyed. Source code examples are used and explained to illustrate how the View-dialog is used.


3.1 Includes and Identifications

Use the following #include directive:

#include <QikViewDialog.h>

Use the following LIBRARY directive in the project's mmp-file:

LIBRARY QikCore.lib


3.2 Creating and Using View-dialog

A common way to construct View-dialogs is to specify them in the resource files and let the framework construct them from there. Specifying the View-dialogs in resource files is the preferred way since it allows for easier modifications compared to creating them entirely from source code.

A View-dialog uses the QIK_VIEW_CONFIGURATIONS resource structure to define which UI configurations it supports and it works in the same way as for views. For more information on how to create the layout for the View-dialog from resource see Resource driven layout in the Programmers Guide.

Launch the dialog by creating an instance of it, if this is not already done, and call ExecuteLD().

// Create an instance of a dialog.
CHelloWorldViewDialog* dialog = new (ELeave) CHelloWorldViewDialog();
// Executes the dialog, and destroys it. This single call encapsulates both CQikViewDialog::PrepareLC and CQikViewDialog::RunLD
dialog->ExecuteLD();

To close a dialog, simply call CloseDialog() with the specified return code. Then the View-dialog signals itself when it is ready to be closed. A closing View-dialog receives SaveL()and ViewDeactivated() callbacks, which can be overridden by derived classes.

CloseDialog(returnCode);

Terms and conditions of use of the material