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
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.
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.
This chapter explains how the Landmarks UI reference application appears to the end-user, and how it can be used.
The program capabilities are defined in lmuirefapp.mmp -file: NetworkServices Location ReadUserData WriteUserData LocalServices
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.
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.
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.
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.
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.
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.
The class diagram of the Landmarks UI reference application is shown in the following figure.
Figure 8 Class diagram of the Landmarks UI reference application
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.
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).
The following figure describes the creation of a new blank landmark.
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).
The following figure shows the sequence of deleting a landmark.
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).
The following figure shows the sequence of editing or viewing a landmark in the landmark database.
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).
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.
This inheritance list is sorted roughly, but not completely, alphabetically:
|
© Nokia 2006 |

|