QListBox

The list box applications demonstrate the usage of the list box in UIQ.
This project creates several list box examples, from simple to more advanced examples that highlight different areas in the list box. The reason for having several examples is that developers that use UIQ's SDK examples have different levels of skills and experience. You can see the examples as a tutorial in three stages, easy, medium and advanced. The medium example is an extension of the easy example and so on.
The UI style that is used by the phone determines the look and feel of the application. These list box examples support Pen style and Softkey style.
Easy list box example
Easy list box contains of a very simple list box with plain text. It uses the standard layout EQikListBoxLine. The application only contains a list view with the list box. List box entries cannot be added to the list box; all entries that are available are initiated when the application starts. The list loops when highlight reaches the top or bottom of the view.
Class summary
CListBoxApplication is the entry point to the application.
CListBoxDocument represents the document in the commands application.
CListBoxAppUi is responsible for creating the view.
CListBoxListView presents a list box with 10 entries.
Medium list box example
Medium list box is extended with highlight area. It uses standard layout, EQikListBoxIconLine, for normal mode, and EQikListBoxIconTwoLines for highlight mode. Entries can be added. Single deletion is available; only the item that is highlighted can be deleted.
Class summary
CListBoxApplication is the entry point to the application.
CListBoxDocument represents the document in the commands application.
CListBoxAppUi is responsible for creating the view.
CListBoxListView is used to create and delete list box entries. Each item that is added is given the same name plus an integer value that is one greater than the most recently added entry.
Advanced list box example
Advanced list box consists of two views, list view and detail view. It is possible to view the data for a list box entry in detail view. Adding, removing and updating list box entries is possible; detail view is used to create new list box entries. It is possible to delete multiple entries by using check marks. The list box shares the application space with a label at the bottom that is used to write out the last event that has taken place.
The list box example is very similar to My Directory, where the user can store information about personal belongings such as media content, for example, movies, music and books. These items are presented in a way that allows the user to add, remove and edit the items. An item stores information about title, year and priority. The major difference between this example and My Directory is that, in this example, the main focus is on the list box.
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 contains a list box and a label that is used to present the most recent event that has taken place.
- 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. Moreover, new media items can be created directly from the detail view of an item already in the directory.
Class summary
CListBoxApplication is the entry point to the application.
CListBoxDocument is responsible for storing all domain data.
CListBoxAppUi is responsible for creating the view.
CListBoxListView presents all list box entries from the model in a list. New entries can be created and existing entries can be deleted in the list view.
CListBoxDetailView is used to create new list box items or to show detailed information about an item. In this view, items can even be edited or deleted.
CListBoxModel 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.
CListBoxItem contains all data that is needed for a list box item.
Usage
Build the list box project in the normal way. You can either build each example individually or all at once. First, run bldmake from the projects group directory where the bld.inf file is located:
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,
builds the project for the debug variant of WINSCW only. To run one of the examples, choose one of the list box applications from the Launcher.
Changes in this version
Version 0.3 2006/04/19
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.
In list box advance a launch save change dialog be launched 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 (ListBox*.mmp, ListBox*ExternalInterface.h and ListBox*_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:
QListBox
You need to be a registered member of the UIQ Developer Community and logged in to be able to download this file.