Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Landmarks API: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''English''' [[ | '''English''' [[Landmarks_API_Spanish|Spanish]]<br />[[Category:Developing with Qt::QtMobility]] | ||
==Qt Mobility 1.1 Features== | == Qt Mobility 1.1 Features == | ||
==News== | == News == | ||
"Qt Mobility 1.1.3 Release&quot;:http://labs.qt.nokia.com/2011/05/04/qt-4-7-3-and-qt-mobility-1-1-3-have-been-released/ is available now for commercial app development and deployment on Ovi store.<br />"Qt Mobility 1.2.0 release&quot;:http://labs.qt.nokia.com/2011/05/12/qt-mobility-1-2-0-released/ is available now. | |||
=Landmarks | = Landmarks API = | ||
==Summary== | == Summary == | ||
One of the new elements of the Qt Mobility Location library is the Landmarks | One of the new elements of the Qt Mobility Location library is the Landmarks API. What is a landmark? A landmark is a particular location which holds some significance. It could be a favorite restaurant, a friend's house or the Sydney Opera house. The landmarks API is designed to make the searching and management of such landmarks simple and easy to use. | ||
==Key features== | == Key features == | ||
* Save Landmark | * Save Landmark | ||
Line 21: | Line 21: | ||
* Delete landmarks | * Delete landmarks | ||
* Delete categories | * Delete categories | ||
* Import landmarks ( | * Import landmarks (GPX version 1.1 currently supported) | ||
* ''Export landmarks'' | * ''Export landmarks'' | ||
* Both asynchronous and synchronous | * Both asynchronous and synchronous API's to perform the above operations | ||
* ''Generic attributes assignable to landmarks and categories.'' | * ''Generic attributes assignable to landmarks and categories.'' | ||
* Plugin based backend allowing developers to create their own datastore back ends. | * Plugin based backend allowing developers to create their own datastore back ends. | ||
Line 31: | Line 31: | ||
(Features in italics have yet to be implemented on the currently supported platforms) | (Features in italics have yet to be implemented on the currently supported platforms) | ||
==Parts of the | == Parts of the API that are still unstable: == | ||
Paging/QLandmarkFetchHint:<br /> Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the | Paging/QLandmarkFetchHint:<br />Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the API. One of the possible use cases is to retrieve partial landmark data, e.g. only retrieve the icon and coordinates. The QLandmarkFetchHint would allow this specification to be made. For the sake of not having an empty class, the offset and maximum limit have been placed in the QLandmarkFetchHint. There may be a more elegant way to handling paging; we are open to suggestions on how this should be done. | ||
If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection. | If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection. | ||
Synchronization:<br /> To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique. | Synchronization:<br />To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique. | ||
Multiple database instances per plugin:<br /> The | Multiple database instances per plugin:<br />The API as it currently stands only allows a single datastore instance per plugin. All applications using a particular plugin will effectively be sharing those landmarks. It may be desirable for each application to have it's own separate landmark datastore.<br />Please provide feedback if you want this functionality. | ||
==LandmarkBrowser Example== | == LandmarkBrowser Example == | ||
The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names. | The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names. | ||
[[Image:4829712737_a934e11864_b_d.jpg|LandmarkBrowser]] | [[Image:http://farm5.static.flickr.com/4075/4829712737_a934e11864_b_d.jpg|LandmarkBrowser]] | ||
To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields. | To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields. | ||
Line 51: | Line 51: | ||
To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button. | To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button. | ||
To import landmarks click the import button and a dialog will be displayed allowing you to choose a | To import landmarks click the import button and a dialog will be displayed allowing you to choose a GPX file &#40;only version 1.1 is supported&amp;#41;. A sample file called places.gpx already accompanies the LandmarkBrowser. | ||
[[Category:Developing with Qt::QtMobility]] | |||
Revision as of 11:12, 24 February 2015
English Spanish
Qt Mobility 1.1 Features
News
"Qt Mobility 1.1.3 Release":http://labs.qt.nokia.com/2011/05/04/qt-4-7-3-and-qt-mobility-1-1-3-have-been-released/ is available now for commercial app development and deployment on Ovi store.
"Qt Mobility 1.2.0 release":http://labs.qt.nokia.com/2011/05/12/qt-mobility-1-2-0-released/ is available now.
Landmarks API
Summary
One of the new elements of the Qt Mobility Location library is the Landmarks API. What is a landmark? A landmark is a particular location which holds some significance. It could be a favorite restaurant, a friend's house or the Sydney Opera house. The landmarks API is designed to make the searching and management of such landmarks simple and easy to use.
Key features
- Save Landmark
- Save Category
- Retrieve landmarks based on a filter and sort order
- Retrieve categories
- Delete landmarks
- Delete categories
- Import landmarks (GPX version 1.1 currently supported)
- Export landmarks
- Both asynchronous and synchronous API's to perform the above operations
- Generic attributes assignable to landmarks and categories.
- Plugin based backend allowing developers to create their own datastore back ends.
- Notifications of added/modified/deleted landmarks
- Notifications of added/modified/deleted categories
(Features in italics have yet to be implemented on the currently supported platforms)
Parts of the API that are still unstable:
Paging/QLandmarkFetchHint:
Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the API. One of the possible use cases is to retrieve partial landmark data, e.g. only retrieve the icon and coordinates. The QLandmarkFetchHint would allow this specification to be made. For the sake of not having an empty class, the offset and maximum limit have been placed in the QLandmarkFetchHint. There may be a more elegant way to handling paging; we are open to suggestions on how this should be done.
If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection.
Synchronization:
To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique.
Multiple database instances per plugin:
The API as it currently stands only allows a single datastore instance per plugin. All applications using a particular plugin will effectively be sharing those landmarks. It may be desirable for each application to have it's own separate landmark datastore.
Please provide feedback if you want this functionality.
LandmarkBrowser Example
The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names.
To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields.
To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button.
To import landmarks click the import button and a dialog will be displayed allowing you to choose a GPX file (only version 1.1 is supported&#41;. A sample file called places.gpx already accompanies the LandmarkBrowser.