|
|
|
The My directory application is a simple database where the user can store information about personal media possessions, for example, movies, music and books. These media items are presented in a way that allows the user to add, remove and edit the items. Data for each item, a name, year, rank, category and note can be stored. A number of default categories exist and the user can create, delete and rename additional categories. This data is stored in persistent storage. This means that when an application is restarted, the data from the previous call to the application remains intact.
If you need an example that shows and describes the basics of developing for UIQ, we recommend looking at the QHelloWorld example first.
The main purpose of My directory is to provide an example application that demonstrates some of the main features of the UIQ UI framework. The following features are demonstrated:
List view containing a listbox,
Detail view supporting pages with tabs,
Building blocks,
Categories,
Command Processing Framework (CPF),
Different phone styles (Pen Style and Softkey Style).
The application contains two views:
The list view presents all of the media items in a list. In the list view, media items can be added or removed and the detail view for an item can be opened. The list view can also be filtered by the category menu.
The detail view presents details for one media item. In the detail view, the information that is stored about the item is presented and can be changed. Item can also be assigned to a single categories. Moreover, new media items can be created.
In the list view new items can be created. This will take you to the detail view where information can be added to the media item. When an existing media item is selected in the list view, you switch to the detailed view, which shows all the information about the specific item. In both cases, it is possible to return to the list view in the same way, either by choosing the save command that saves the item information to the domain data or using the back command that rejects all changes.
In the list view you can delete media items. When multiple items are deleted there is no way to recover the deleted items. However, for single deletes, the last deleted item can be recovered.
Categories are used as filters in the list view. By default, a new item is assigned to the category Unfiled. This category and the defaults categories cannot be renamed nor deleted. All items are visible in the All category. New categories can be created from the category menu in the list view. The created category can be renamed and deleted. Items can be set to belong to a category in the detail view. If a category is deleted, the category of the items belonging to that category is set to Unfiled
The UI configuration that is used by the phone determines the look and feel of the application. My directory 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.
CMyDirectoryApplication is the entry point to the application.
CMyDirectoryDocument is responsible for storing all domain data in persistent storage. It holds the model and the application preferences.
CMyDirectoryAppUi is responsible for creating the views.
CMyDirectoryListView presents all My directory entries from the model in a list. New entries can be created and entries can be deleted in the list view.
CMyDirectoryDetailView is used to create new My directory items or to show detailed information about an item. In this view, items can even be edited or deleted. This view consists of tab pages.
CMyDirectoryModel is responsible for storing domain data that is used in the application. This model is used to separate application data from UI code. This makes it to easier to change the UI in the future because none of the code that handles the data has to be changed.
CMyDirectoryItem contains all data that is needed for a My directory item. It makes it possible to store the data to persistent storage.
TMyDirectoryCategory contains data needed to make use of user created categories. It makes it possible to store the data to persistent storage.
TMyDirectoryPreferences sets preferences that can be saved for the My directory application.