diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-05-21 10:26:54 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-21 06:31:04 +0200 |
commit | 8163cef8ba1baa717458b592033a80fc3f335251 (patch) | |
tree | b697b27bf39fde4af251a6b6f725b9a15211fabf /src/location | |
parent | bb3b37f02ea501b95ea690e9d566f2a61da147b2 (diff) | |
download | qtlocation-8163cef8ba1baa717458b592033a80fc3f335251.tar.gz |
Fix QGeoBounding* documentation errors.
qdoc was having trouble parsing the "using foo()" statements. Fixed by
wrapping them in Q_NO_USING_KEYWORD and providing documentation for
those functions.
Change-Id: I172300bbd04e9d6c865af834ab47ad0ef58c1d1b
Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'src/location')
-rw-r--r-- | src/location/qgeoboundingarea.cpp | 22 | ||||
-rw-r--r-- | src/location/qgeoboundingbox.cpp | 20 | ||||
-rw-r--r-- | src/location/qgeoboundingbox.h | 21 | ||||
-rw-r--r-- | src/location/qgeoboundingcircle.cpp | 14 | ||||
-rw-r--r-- | src/location/qgeoboundingcircle.h | 14 |
5 files changed, 88 insertions, 3 deletions
diff --git a/src/location/qgeoboundingarea.cpp b/src/location/qgeoboundingarea.cpp index 195cda6c..ffc90992 100644 --- a/src/location/qgeoboundingarea.cpp +++ b/src/location/qgeoboundingarea.cpp @@ -79,9 +79,9 @@ bool QGeoBoundingAreaPrivate::operator==(const QGeoBoundingAreaPrivate &other) c Describes the type of a bounding area. - \value BoxType A box shaped bounding area. - - \value CircleType A circular bounding area. + \value UnknownType A bounding area of unknown type. + \value BoxType A box shaped bounding area. + \value CircleType A circular bounding area. */ inline QGeoBoundingAreaPrivate *QGeoBoundingArea::d_func() @@ -94,15 +94,24 @@ inline const QGeoBoundingAreaPrivate *QGeoBoundingArea::d_func() const return static_cast<const QGeoBoundingAreaPrivate *>(d_ptr.constData()); } +/*! + Constructs a new invalid bounding area of \l UnknownType. +*/ QGeoBoundingArea::QGeoBoundingArea() { } +/*! + Constructs a new bounding area which is a copy of \a other. +*/ QGeoBoundingArea::QGeoBoundingArea(const QGeoBoundingArea &other) : d_ptr(other.d_ptr) { } +/*! + \internal +*/ QGeoBoundingArea::QGeoBoundingArea(QGeoBoundingAreaPrivate *d) : d_ptr(d) { @@ -191,11 +200,18 @@ bool QGeoBoundingArea::operator==(const QGeoBoundingArea &other) const return *d == *other.d_func(); } +/*! + Returns true if the \a other bounding area is not equivalent to this bounding area, otherwise + returns false. +*/ bool QGeoBoundingArea::operator!=(const QGeoBoundingArea &other) const { return !(*this == other); } +/*! + Assigns \a other to this bounding area and returns a reference to this bounding area. +*/ QGeoBoundingArea &QGeoBoundingArea::operator=(const QGeoBoundingArea &other) { if (this == &other) diff --git a/src/location/qgeoboundingbox.cpp b/src/location/qgeoboundingbox.cpp index 1b464502..b4066fe8 100644 --- a/src/location/qgeoboundingbox.cpp +++ b/src/location/qgeoboundingbox.cpp @@ -75,6 +75,26 @@ QT_BEGIN_NAMESPACE in the center of the bounding box. */ +#ifdef Q_NO_USING_KEYWORD +/*! + \fn bool QGeoBoundingBox::operator==(const QGeoBoundingArea &other) const + + Returns true if \a other is equivalent to this bounding box; otherwise returns false. +*/ + +/*! + \fn bool QGeoBoundingBox::operator!=(const QGeoBoundingArea &other) const + + Returns true if \a other is not equivalent to this bounding box; otherwise returns false. +*/ + +/*! + \fn bool QGeoBoundingBox::contains(const QGeoCoordinate &coordinate) const + + Returns true if \a coordinate is within this bounding box; otherwise returns false. +*/ +#endif + inline QGeoBoundingBoxPrivate *QGeoBoundingBox::d_func() { return static_cast<QGeoBoundingBoxPrivate *>(d_ptr.data()); diff --git a/src/location/qgeoboundingbox.h b/src/location/qgeoboundingbox.h index e0372689..46941c53 100644 --- a/src/location/qgeoboundingbox.h +++ b/src/location/qgeoboundingbox.h @@ -64,10 +64,24 @@ public: QGeoBoundingBox &operator = (const QGeoBoundingBox &other); +#ifdef Q_NO_USING_KEYWORD + bool operator==(const QGeoBoundingArea &other) const + { + return QGeoBoundingArea::operator==(other); + } +#else using QGeoBoundingArea::operator==; +#endif bool operator==(const QGeoBoundingBox &other) const; +#ifdef Q_NO_USING_KEYWORD + bool operator!=(const QGeoBoundingArea &other) const + { + return QGeoBoundingArea::operator!=(other); + } +#else using QGeoBoundingArea::operator!=; +#endif bool operator!=(const QGeoBoundingBox &other) const; void setTopLeft(const QGeoCoordinate &topLeft); @@ -91,7 +105,14 @@ public: void setHeight(double degreesHeight); double height() const; +#ifdef Q_NO_USING_KEYWORD + bool contains(const QGeoCoordinate &coordinate) const + { + return QGeoBoundingArea::contains(coordinate); + } +#else using QGeoBoundingArea::contains; +#endif bool contains(const QGeoBoundingBox &boundingBox) const; bool intersects(const QGeoBoundingBox &boundingBox) const; diff --git a/src/location/qgeoboundingcircle.cpp b/src/location/qgeoboundingcircle.cpp index 5a2fcd0d..e941661a 100644 --- a/src/location/qgeoboundingcircle.cpp +++ b/src/location/qgeoboundingcircle.cpp @@ -65,6 +65,20 @@ QT_BEGIN_NAMESPACE or if the radius is less than zero. */ +#ifdef Q_NO_USING_KEYWORD +/*! + \fn bool QGeoBoundingCircle::operator==(const QGeoBoundingArea &other) const + + Returns true if \a other is equal to this bounding circle; otherwise returns false. +*/ + +/*! + \fn bool QGeoBoundingCircle::operator!=(const QGeoBoundingArea &other) const + + Returns true if \a other is not equal to this bounding circle; otherwise returns false. +*/ +#endif + inline QGeoBoundingCirclePrivate *QGeoBoundingCircle::d_func() { return static_cast<QGeoBoundingCirclePrivate *>(d_ptr.data()); diff --git a/src/location/qgeoboundingcircle.h b/src/location/qgeoboundingcircle.h index 56754f5f..6fbe3ef4 100644 --- a/src/location/qgeoboundingcircle.h +++ b/src/location/qgeoboundingcircle.h @@ -67,10 +67,24 @@ public: QGeoBoundingCircle &operator = (const QGeoBoundingCircle &other); +#ifdef Q_NO_USING_KEYWORD + bool operator==(const QGeoBoundingArea &other) const + { + return QGeoBoundingArea::operator==(other); + } +#else using QGeoBoundingArea::operator==; +#endif bool operator==(const QGeoBoundingCircle &other) const; +#ifdef Q_NO_USING_KEYWORD + bool operator!=(const QGeoBoundingArea &other) const + { + return QGeoBoundingArea::operator!=(other); + } +#else using QGeoBoundingArea::operator!=; +#endif bool operator!=(const QGeoBoundingCircle &other) const; void setCenter(const QGeoCoordinate ¢er); |