S60 3rd Edition SDK for Symbian OS
Example Applications Guide

Landmarks UI Reference Example

1. About this Example
2. Prerequisites
3. User interface
4. Design and Implementation
5. Summary
6. Class List


1. About this Example

The Landmarks UI reference application is a UI application that demonstrates the usage of the selector and editor dialogs exported by the Landmarks UI application. These dialogs are used to list and select landmarks or categories and modify or view a selected landmark.


2. Prerequisites

This example makes use of the standard Series 60/Symbian OS application framework comprising of the Application, Document, UI, and View classes. The reader should be familiar with the areas mentioned above.


3. User interface

This chapter explains how the Landmarks UI reference application appears to the end-user, and how it can be used.

3.1 Capabilities

The program capabilities are defined in lmuirefapp.mmp -file: NetworkServices Location ReadUserData WriteUserData LocalServices

3.2 ScalableUI

The program takes screen parameters in the start of the application and works with all screen modes. The program does not support changing of the screen layout while program is running.

3.3 Initial view

When the Landmarks UI reference application is launched, it displays the default view. The Options menu of the view has commands for functions such as adding, deleting, editing and viewing landmarks.

3.4 Creating a new landmark

To create a new landmark, select the New Landmarks item from the Options menu. After the selection, the landmark editor is launched where you can edit different landmark fields. The softkey Done finishes the landmark editing and saves the landmark to the database.

3.5 Editing a landmark

Selecting the Edit Landmarks item from the Options menu enables you to modify an already existing landmark. After the selection, the landmark editor is launched. All the editable fields are displayed in the editor.

When editing a landmark, the location fields latitude, longitude, altitude, horizontal accuracy, and vertical accuracy can be manually edited or automatically updated by selecting the menu Current location from the Options menu of the editor. A location is then acquired and the location fields in the editor are updated according to the location that was retrieved. If the location retrieval fails for some reason, the location fields are not modified but the reason for the acquisition failure is displayed in an Information note.

A landmark can belong to one or several landmark categories. When editing the categories field, a markable list of the categories can be launched by selecting the item Select categories from the Options menu or by pressing any key except the right and left softkeys and the Arrow up and Arrow down keys. In the list, categories can be added to or removed from a landmark by using the Selection key and the Arrow up and Arrow down keys. The softkey Ok finishes selecting the categories.

3.6 Viewing a landmark

An already existing landmark can be viewed by selecting the View Landmarks item from the Options menu of the main view. The landmark editor is launched in the View mode. All the defined landmark fields are displayed.

3.7 Deleting a landmark

To delete a landmark, select Delete Landmarks from the Options menu. After the selection, the landmark selector dialog is launched enabling you to select a landmark to be deleted. After that, a query dialog is launched for confirming the delete operation. If the query is accepted, the landmark is deleted from the database.


4. Design and Implementation

4.1 Design

The class diagram of the Landmarks UI reference application is shown in the following figure.

ClassDiagram.PNG
Figure 8 Class diagram of the Landmarks UI reference application

4.2 Implementation

4.2.1 Sequence diagrams

4.2.1.1 Application start-up

When the Landmarks UI reference application is started, most of the classes are instantiated and the landmark database is opened. The following figure demonstrates this briefly.

ApplicationStartUp.PNG
Figure 9 Application start-up

1. The framework creates the document class, which in turn opens the landmark database (Steps 1 and 2).

2. The framework creates the Application UI class of the application and it in turn creates a single view, CLmUiRefAppView (Steps 3 and 4).

3. Activating the view creates the container CLmUiRefAppContainer.(Step5).

4.2.1.2 Creating a new landmark

The following figure describes the creation of a new blank landmark.

CreatingNewLandmark2.PNG
Figure 10 Creating a new landmark

1. The user has activated the menu command for creating a new blank landmark (Step 1).

2. A blank landmark is created (Steps 2 and 3).

3. The landmark editor is created and launched (Steps 4 and 5).

4. If the user selects the Ok option when the dialog is dismissed, the edited data is saved to the landmark and the application returns to the main view (Step 6).

4.2.1.3 Deleting a landmark

The following figure shows the sequence of deleting a landmark.

CreatingNewLandmark2.PNG
Figure 11 Deleting a landmark

1. The user has activated the menu command for deleting a landmark (Step1).

2. The landmark selector dialog is created and launched (Steps 2, 3 and 4).

3. The user selects a landmark to be deleted (Step 5).

4. The selected landmarks is deleted (Step 6).

4.2.1.4 Editing and viewing a landmark

The following figure shows the sequence of editing or viewing a landmark in the landmark database.

EditingandViewingLandmark.PNG
Figure 12 Editing and viewing a landmark

1. The user has activated the menu command for editing (or viewing) a landmark (Step 1).

2. The landmark selector dialog is created and launched (Steps 2, 3, 4 and 5).

3. The selected landmark is opened for editing or viewing (Steps 6, 7 and 8).


5. Summary

The Landmarks UI reference application demonstrates: How to make use of the Landmarks UI Selector dialog to launch a selector and select a single landmark from a list of landmarks. How to make use of the Landmarks UI Add/Edit dialog to edit and view the landmark contents.


6. Class List

This inheritance list is sorted roughly, but not completely, alphabetically:

© Nokia 2006

Back to top