|
|
|
The Hello world application presents the basics of developing for UIQ. It displays a text message and a menu bar. A single view that displays the text "Hello world" is drawn using the default title font supplied by UIQ.
Note: The Hello world application does not fully follow UIQ look and feel guidelines. For an example that does follow the UIQ look and feel guidelines, see the My directory example.
This project demonstrates some key ideas including:
Application resources, which define all text displayed in applications, softkeys, dialogs, and other customizable screen furniture. Application resources are managed outside of the application source code in separate resource files that can be independently compiled. In this project the separate resource file is HelloWorld.rss.
Commands being interpreted by an application which are likewise defined outside of the main source in .hrh files, in this case HelloWorld.hrh. This file is included in the application source and the resource files.
Applications being divided into engine, UI, and view components, which are interdependent but logically separate from each other.
All applications having UID, unique identifier, which uniquely identifies it to the system.
The project demonstrates:
The files needed to build an application successfully,
The basic build process,
Some of the commands used to invoke tools, and the functions performed by the tools,
Main architecture of a UIQ application.
The UI configuration that is used by the phone determines the look and feel of the application. Hello world supports the reference UI Configurations that are supported in the UIQ 3 SDK. For development purposes, UiqEnv allows to change the UI Configuration in the emulator in order to develop and test the application with varying phone styles.
The framework requires that an application defines four objects: an application, a document, an application UI, and one or more application views.
CHelloWorldApplication 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.
CHelloWorldDocument represents the document in the Hello world application. The document class is used to represent the data model for the application. Minimally, the purpose of the document class is to create an application UI object to handle editing the document. Additionally, the document class handles storing and restoring the application's data.
CHelloWorldAppUi represents the application UI in the Hello world application. It is responsible for creating the view.
CHelloWorldView is a very simple view that displays the text "Hello world", drawn using the default title font supplied by UIQ. It also consists of three commands that will bring up infoprints.