QMyDirectory

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, type and note can be stored. 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:

The application contains two views:

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 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.

The UI style that is used by the phone determines the look and feel of the application. My Directory supports Pen Style and Softkey Style.

Class summary

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 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.

TMyDirectoryPreferences sets preferences that can be saved for the My Directory application.

Usage

Build the My Directory project in the normal way. 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 My Directory from the Launcher.

Changes in this version

Version 0.3 2006/04/19

Added support for categories, due to this change the icons used for the different types in the list view has been removed. This because the user can now with the categories add user defined types and there will not be any icons for those, only for the predefined types.

Removed calls to PerformLayout that shall not be called by the application.

Small updates have been made in the code and comments so all UIQ examples are consistent with each other. The most common change has been include order in header and cpp-files,system includes shall be included before the user includes.

Will launch save change dialog if user navigate from the detail view without saving when changes has been done in the controls.

Reverted change to include header file for UID3 in the mmp file. This due to Carbide.VS (plugin that enable Symbian OS C++ application development using the Microsoft Visual Studio .NET 2003 IDE) doesn't support to include header files in mmp file.

Version 0.2 2006/01/23

Added a header file that defines the UID3 value. The UID3 is needed in three files (MyDirectory.mmp, MyDirectoryExternalInterface.h and MyDirectory_reg.rss). Instead of define the UID3 value three times, each file only includes the UID header file and uses the define. This makes it easier to change the UID3, when there is only one place to update.

Version 0.1 2005/12/01

First release.

Download:  QMyDirectory

sys_warning

You need to be a registered member of the UIQ Developer Community and logged in to be able to download this file.

  57.99 Kb  (Last update: 2006-05-29)

«« Back

UIQ 3 SDK documentation

Quick links

More developer resources