|
|
|||
Mobile phones can be very different in terms of hardware (e.g. screen size) and how the user interacts with the mobile phone (e.g using softkeys), defined as mobile phones having different Phone Styles. Examples of two Phone Styles are Softkey Style and Pen Style. It is possible to create mobile phones that combine several Phone Styles with the help of additional hardware.
The UIQ Software Platform is very versatile and can be configured by a large number of configuration parameters. One set of configuration parameters (so called UI Configuration Parameters) is related to Phone Styles and makes it possible to configure the UIQ Software Platform with respect to touch/non-touch screens, screen size, the use of a Menu Bar or the use of the Softkeys etc. Each combination of such parameters is called a UI Configuration.
UIQ 3.0 defines a number of standard UI Configurations that are supported in the UIQ 3 SDK. Reference UI Configurations have also been tested on reference hardware and all UIQ's own applications are optimized for these configurations.
Standard UI Configurations
|
A UI Configuration is a unique combination of four UI Parameters that together define a set of methods of display and user interaction. The parameters are:
Screen Mode: One of Portrait (240x320), Landscape (320x240), Portrait Small (240x256) or Landscape Small (256x240).
Touch Screen: One of Yes or No.
Interaction Style: One of Menu or Softkey
Orientation: One of Normal or Inverted
There are a number of UI Configurations that are have been defined as constants, by combining these parameters.
See the file qikon.hrh for detailed information on UI Parameters and UI Configuration constant definitions. The list of standard configuration constants is as below:
KQikSoftkeyStylePortrait
KQikSoftkeyStyleSmallPortrait
KQikSoftkeyStyleTouchPortrait
KQikPenStyleTouchPortrait
KQikPenStyleTouchLandscape
Each of these constants is defined as a combination of parameters. An example from qikon.hrh is the KQikSoftkeyStylePortrait UI Configuration:
#define KQikSoftkeyStylePortrait
EQikScreenModePortrait |
EQikTouchScreenNo |
EQikUiStyleSoftkey |
EQikOrientationNormal
Although possible, it is not recommended to create a new UI Configuration based on the parameter values. Instead, the predefined constants should be used.
An application uses the resource structures QIK_VIEW_CONFIGURATIONS and QIK_VIEW_CONFIGURATION to define which configurations it supports.
RESOURCE QIK_VIEW_CONFIGURATIONS r_view_configurations
{
configurations =
{
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikPenStyleTouchPortrait;
command_list = 0;
view = 0;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikSofkeyStylePortrait;
command_list = 0;
view = 0;
}
};
}
The resource is then loaded with the ViewConstructFromResource method.
void CMyMultiPageView::ViewConstructL()
{
ViewConstructFromResourceL(R_VIEW_CONFIGURATIONS);
}
This is the recommended way to create a view, by specifying the view and command_list members inside each QIK_VIEW_CONFIGURATION. The framework will then automatically switch view layout and commands when the window-server changes mode. It is perfectly valid to use the same view layout and command list in several UI Configurations.
Note that in a real case the command_list and view members should be set to the appropriate resource structs for the command list and view and not to 0 as in the example above.
See the qikon.rh file for details on the resource structures used in view configurations.