diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/cpp-qml.qdoc | 23 | ||||
-rw-r--r-- | doc/src/snippets/cpp/cppqml.cpp | 16 | ||||
-rw-r--r-- | doc/src/snippets/declarative/places.qml | 9 |
3 files changed, 2 insertions, 46 deletions
diff --git a/doc/src/cpp-qml.qdoc b/doc/src/cpp-qml.qdoc index 28bc6620..47b2175e 100644 --- a/doc/src/cpp-qml.qdoc +++ b/doc/src/cpp-qml.qdoc @@ -132,29 +132,6 @@ The following sets the properties of this object based on a QGeoAddress object f \snippet snippets/cpp/cppqml.cpp Address set -\section2 GeoRectangle - QGeoRectangle -\target georectangle -The \l {GeoRectangle::rectangle}{GeoRectangle.rectangle} property is used to provide an interface -between C++ and QML code. First a pointer to a GeoRectangle object must be obtained from C++, then -use the \l {QObject::property()}{property()} and \l {QObject::setProperty()}{setProperty()} -functions to get and set the \c rectangle property. The following gets the QGeoRectangle -representing this object from C++: -\snippet snippets/cpp/cppqml.cpp GeoRectangle get -The following sets the properties of this object based on a QGeoRectangle object from C++: -\snippet snippets/cpp/cppqml.cpp GeoRectangle set - - -\section2 GeoCircle - QGeoCircle -\target geocircle -The \l {GeoCircle::circle} {GeoCircle.circle} property is used to provide an interface between C++ and QML code. First a pointer to a -GeoCircle object must be obtained from C++, then use the -\l {QObject::property()}{property()} and \l {QObject::setProperty()}{setProperty()} functions -to get and set the \c circle property. -The following gets the QGeoCircle representing this object from C++: -\snippet snippets/cpp/cppqml.cpp GeoCircle get -The following sets the properties of this object based on a QGeoCircle object from C++: -\snippet snippets/cpp/cppqml.cpp GeoCircle set - \section2 Location - QGeoLocation \target location The \l {Location::location} {Location.location} property is used to provide an interface between C++ and QML code. First a pointer to a diff --git a/doc/src/snippets/cpp/cppqml.cpp b/doc/src/snippets/cpp/cppqml.cpp index 0e7158a7..d5d4bad9 100644 --- a/doc/src/snippets/cpp/cppqml.cpp +++ b/doc/src/snippets/cpp/cppqml.cpp @@ -127,22 +127,6 @@ void cppQmlInterface(QObject *qmlObject) qmlObject->setProperty("address", QVariant::fromValue(geoAddress)); //! [Address set] - //! [GeoRectangle get] - QGeoRectangle geoRectangle = qmlObject->property("rectangle").value<QGeoRectangle>(); - //! [GeoRectangle get] - - //! [GeoRectangle set] - qmlObject->setProperty("rectangle", QVariant::fromValue(geoRectangle)); - //! [GeoRectangle set] - - //! [GeoCircle get] - QGeoCircle geoCircle = qmlObject->property("circle").value<QGeoCircle>(); - //! [GeoCircle get] - - //! [GeoCircle set] - qmlObject->setProperty("circle", QVariant::fromValue(geoCircle)); - //! [GeoCircle set] - //! [Location get] QGeoLocation geoLocation = qmlObject->property("location").value<QGeoLocation>(); //! [Location get] diff --git a/doc/src/snippets/declarative/places.qml b/doc/src/snippets/declarative/places.qml index dbc7f8d6..11a0f3b3 100644 --- a/doc/src/snippets/declarative/places.qml +++ b/doc/src/snippets/declarative/places.qml @@ -128,13 +128,8 @@ Item { plugin: myPlugin - searchArea: GeoCircle { - center { - // Brisbane - longitude: 153.02778 - latitude: -27.46778 - } - } + // Brisbane + searchArea: QtLocation.circle(QtLocation.coordinate(-27.46778, 153.02778)) onSearchTermChanged: update() } |