summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-07-02 15:53:25 +1000
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-07-02 15:53:25 +1000
commit74e5d954c6fb82621280fe6ee47d787227a1afbd (patch)
tree5a71af60201aed7fdf9864a3f3cab515771b9a82 /doc/src
parent976f83c87c7fc79e022ceb523b84cf18e051055a (diff)
parent6edf183f5bd701f4cc3c8a33a0f25fec2fc6ecc2 (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:qtmobility/qtmobility
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/location.qdoc3
-rw-r--r--doc/src/qlandmarks.qdoc2
-rw-r--r--doc/src/qt-defines.qdocconf4
-rw-r--r--doc/src/qtmobility.qdocconf58
-rw-r--r--doc/src/snippets/qtlandmarksdocsample/qtlandmarksdocsample.cpp63
-rw-r--r--doc/src/snippets/qtlandmarksdocsample/requestexample.h1
6 files changed, 98 insertions, 33 deletions
diff --git a/doc/src/location.qdoc b/doc/src/location.qdoc
index 93e4b7d19e..c2b53a5113 100644
--- a/doc/src/location.qdoc
+++ b/doc/src/location.qdoc
@@ -270,7 +270,7 @@ A landmark is a location of some significance, also known as a point of interest
\section2 Landmark Examples
-For more details see the \l {landmarks} {Landmark Examples} page.
+For more details see the \l {Landmark Examples} {Landmark Examples} page.
\section2 Landmark classes
@@ -294,6 +294,7 @@ for (asynchronous landmark selection)
\annotatedlist landmarks-sort
+\target Asynchronous Landmark Requests
\section3 Asynchronous Requests
Asynchronous operations are facilitates by the request classes listed below:
diff --git a/doc/src/qlandmarks.qdoc b/doc/src/qlandmarks.qdoc
index 356d94617f..0bc68eead1 100644
--- a/doc/src/qlandmarks.qdoc
+++ b/doc/src/qlandmarks.qdoc
@@ -42,7 +42,7 @@
/*!
\page landmarks.html
-\title Landmarks
+\title Landmark Examples
\ingroup navigation
diff --git a/doc/src/qt-defines.qdocconf b/doc/src/qt-defines.qdocconf
index 4a05aaaa75..24e93e4e08 100644
--- a/doc/src/qt-defines.qdocconf
+++ b/doc/src/qt-defines.qdocconf
@@ -41,8 +41,8 @@ extraimages.HTML = qt-logo \
stylesheet-coffee-plastique.png
# This stuff is used by the new doc format.
-scriptdirs = $MOBILITY_SRC_DIR/doc/src/template/scripts
-styledirs = $MOBILITY_SRC_DIR/doc/src/template/style
+scriptdirs = $QT_MOBILITY_SOURCE_TREE/doc/src/template/scripts
+styledirs = $QT_MOBILITY_SOURCE_TREE/doc/src/template/style
scripts.HTML = functions.js \
jquery.js
diff --git a/doc/src/qtmobility.qdocconf b/doc/src/qtmobility.qdocconf
index fb33561e91..4af75d55b1 100644
--- a/doc/src/qtmobility.qdocconf
+++ b/doc/src/qtmobility.qdocconf
@@ -4,7 +4,7 @@ include(qt-cpp-ignore.qdocconf)
include(qt-html-templates.qdocconf)
include(qt-defines.qdocconf)
-project = Qt Mobility Project Library
+project = QtMobility
description = Qt Mobility Project Library Reference Documentation
versionsym =
version = 1.1
@@ -52,29 +52,29 @@ qhp.Qt.extraFiles = index.html \
style/style_ie8.css \
style/style.css
-qhp.Mobility.filterAttributes = qtmobility
-qhp.Mobility.file = qtmobility.qhp
-qhp.Mobility.namespace = com.nokia.qtmobility
-qhp.Mobility.virtualFolder = mobility
-qhp.Mobility.indexTitle = Qt Mobility Project Reference Documentation
-qhp.Mobility.indexRoot =
-
-qhp.Mobility.customFilters.QtMobility.name = Qt Mobility
-qhp.Mobility.customFilters.QtMobility.filterAttributes = qtmobility
-
-qhp.Mobility.subprojects = classes overviews examples
-qhp.Mobility.subprojects.classes.title = Classes
-qhp.Mobility.subprojects.classes.indexTitle = All Qt Mobility Project Classes
-qhp.Mobility.subprojects.classes.selectors = class
-qhp.Mobility.subprojects.classes.sortPages = true
-qhp.Mobility.subprojects.overviews.title = Overviews
-qhp.Mobility.subprojects.overviews.indexTitle = Qt Mobility Project Overview
-qhp.Mobility.subprojects.overviews.selectors = fake:page,group
-qhp.Mobility.subprojects.overviews.sortPages = true
-qhp.Mobility.subprojects.examples.title = Examples
-qhp.Mobility.subprojects.examples.indexTitle = Qt Mobility Project Examples
-qhp.Mobility.subprojects.examples.selectors = fake:example
-qhp.Mobility.subprojects.examples.sortPages = true
+qhp.QtMobility.filterAttributes = qtmobility
+qhp.QtMobility.file = qtmobility.qhp
+qhp.QtMobility.namespace = com.nokia.qtmobility
+qhp.QtMobility.virtualFolder = mobility
+qhp.QtMobility.indexTitle = Qt Mobility Project Reference Documentation
+qhp.QtMobility.indexRoot =
+
+qhp.QtMobility.customFilters.QtMobility.name = Qt Mobility
+qhp.QtMobility.customFilters.QtMobility.filterAttributes = qtmobility
+
+qhp.QtMobility.subprojects = classes overviews examples
+qhp.QtMobility.subprojects.classes.title = Classes
+qhp.QtMobility.subprojects.classes.indexTitle = All Qt Mobility Project Classes
+qhp.QtMobility.subprojects.classes.selectors = class
+qhp.QtMobility.subprojects.classes.sortPages = true
+qhp.QtMobility.subprojects.overviews.title = Overviews
+qhp.QtMobility.subprojects.overviews.indexTitle = Qt Mobility Project Overview
+qhp.QtMobility.subprojects.overviews.selectors = fake:page,group
+qhp.QtMobility.subprojects.overviews.sortPages = true
+qhp.QtMobility.subprojects.examples.title = Examples
+qhp.QtMobility.subprojects.examples.indexTitle = Qt Mobility Project Examples
+qhp.QtMobility.subprojects.examples.selectors = fake:example
+qhp.QtMobility.subprojects.examples.sortPages = true
defines = Q_QDOC \
__cplusplus \
@@ -132,12 +132,12 @@ examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.q
examples.imageextensions = "*.png"
imagedirs = images \
- $QTDIR/examples \
- $QTDIR/doc/src/template/images
+ $QT_MOBILITY_SOURCE_TREE/examples \
+ $QT_MOBILITY_SOURCE_TREE/doc/src/template/images
-outputdir = $QTDIR/doc/html
-tagfile = $QTDIR/doc/html/qt.tags
-base = file:$QTDIR/doc/html
+outputdir = $QT_MOBILITY_SOURCE_TREE/doc/html
+tagfile = $QT_MOBILITY_SOURCE_TREE/doc/html/qt.tags
+base = file:$MOBILITY_SRC_DIR/doc/html
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
diff --git a/doc/src/snippets/qtlandmarksdocsample/qtlandmarksdocsample.cpp b/doc/src/snippets/qtlandmarksdocsample/qtlandmarksdocsample.cpp
index d6d9a86012..7cb25fb43b 100644
--- a/doc/src/snippets/qtlandmarksdocsample/qtlandmarksdocsample.cpp
+++ b/doc/src/snippets/qtlandmarksdocsample/qtlandmarksdocsample.cpp
@@ -319,6 +319,16 @@ void addLandmarkAndCategory(QLandmarkManager *lm)
lm->saveLandmark(&monks); //lm is a QLandmarkManager*
//! [Add landmark synchronously]
+
+ {
+ QLandmarkManager *landmarkManager;
+ //! [Add landmark synchronously simple]
+ QLandmark monks;
+ monks.setName("Monk's cafe");
+ //..
+ landmarkManager->saveLandmark(&monks);
+ //! [Add landmark synchronously simple]
+ }
}
void categoryFetch(QLandmarkManager *lm)
@@ -336,6 +346,13 @@ void categoryFetch(QLandmarkManager *lm)
qDebug() << "Found category: " << category.name();
}
//! [Retrieve categories synchronously]
+
+ {
+ QLandmarkManager *landmarkManager;
+ //! [Retrieve categories synchronously simple]
+ QList<QLandmarkCategory> categories = landmarkManager->categories();
+ //! [Retrieve categories synchronously simple]
+ }
}
void landmarkFetch(QLandmarkManager *lm)
@@ -361,6 +378,30 @@ void landmarkFetch(QLandmarkManager *lm)
qDebug() << "Found landmark:" << landmark.name();
}
//! [Retrieve landmarks synchronously]
+
+ {
+ QLandmarkManager *landmarkManager;
+ //! [Retrieve landmarks by proximity synchronously]
+ QGeoCoordinate coordinate(54.0, 23.1);
+
+ QLandmarkProximityFilter filter;
+ filter.setCoordinate(coordinate);
+ filter.setRadius(5000);
+
+ QLandmarkDistanceSort distanceSort;
+ distanceSort.setCoordinate(coordinate);
+ distanceSort.setDirection(Qt::AscendingOrder);
+
+ QLandmarkFetchHint fetchHint;
+ fetchHint.setMaxItems(5);
+
+ landmarkManager->landmarks(filter, sortOrder, fetchHint);
+ //! [Retrieve landmarks by proximity synchronously]
+
+ //! [Retrieve all landmarks synchronously]
+ landmarkManager->landmarks();
+ //! [Retrieve all landmarks synchronously]
+ }
}
void filterByName(QLandmarkManager *lm)
@@ -418,12 +459,34 @@ void deleteLandmarkAndCategory(QLandmarkManager *lm)
//landmark is a previously retrieved QLandmark object
lm->removeLandmark(landmark.landmarkId());
//! [Remove landmark synchronously]
+
+ {
+ QLandmarkManager *landmarkManager;
+ //! [Remove landmark synchronously simple]
+ landmarkManager->removeLandmark(landmark.landmarkId());
+ //! [Remove landmark synchronously simple]
+ }
+}
+
+void importExportLandmark() {
+ QLandmarkManager *landmarkManager;
+ //! [ImportExport landmark simple]
+ landmarkManager->importLandmarks("places.gpx");
+
+ landmarkManager->exportLandmarks("myplaces.gpx");
+ //! [ImportExport landmark simple]
}
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QLandmarkManager *lm = new QLandmarkManager();
+
+ //! [Instantiate default QLandmarkManager]
+ QLandmarkManager *landmarkManager = new QLandmarkManager();
+ //! [Instantiate default QLandmarkManager]
+ Q_UNUSED(landmarkManager);
+
//Synchronous API examples
addLandmarkAndCategory(lm);
categoryFetch(lm);
diff --git a/doc/src/snippets/qtlandmarksdocsample/requestexample.h b/doc/src/snippets/qtlandmarksdocsample/requestexample.h
index a73c332c71..abb49a33da 100644
--- a/doc/src/snippets/qtlandmarksdocsample/requestexample.h
+++ b/doc/src/snippets/qtlandmarksdocsample/requestexample.h
@@ -92,6 +92,7 @@ private:
QLandmarkCategoryRemoveRequest *catRemoveRequest;
QLandmarkRemoveRequest *lmRemoveRequest;
+ QLandmarkManager *landmarkManager;
QLandmarkCategoryId categoryId;
int previousLastIndex;
};