17 Q_PROPERTY(QGeoCoordinate bottomLeft READ bottomLeft WRITE setBottomLeft)
18 Q_PROPERTY(QGeoCoordinate bottomRight READ bottomRight WRITE setBottomRight)
19 Q_PROPERTY(QGeoCoordinate topLeft READ topLeft WRITE setTopLeft)
20 Q_PROPERTY(QGeoCoordinate topRight READ topRight WRITE setTopRight)
21 Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter)
22 Q_PROPERTY(
double height READ height WRITE setHeight)
23 Q_PROPERTY(
double width READ width WRITE setWidth)
27 QGeoRectangle(
const QGeoCoordinate ¢er,
double degreesWidth,
double degreesHeight);
28 QGeoRectangle(
const QGeoCoordinate &topLeft,
const QGeoCoordinate &bottomRight);
29 QGeoRectangle(
const QList<QGeoCoordinate> &coordinates);
30 QGeoRectangle(
const QGeoRectangle &other);
31 QGeoRectangle(
const QGeoShape &other);
35 QGeoRectangle &operator=(
const QGeoRectangle &other);
37 void setTopLeft(
const QGeoCoordinate &topLeft);
38 QGeoCoordinate topLeft()
const;
40 void setTopRight(
const QGeoCoordinate &topRight);
41 QGeoCoordinate topRight()
const;
43 void setBottomLeft(
const QGeoCoordinate &bottomLeft);
44 QGeoCoordinate bottomLeft()
const;
46 void setBottomRight(
const QGeoCoordinate &bottomRight);
47 QGeoCoordinate bottomRight()
const;
49 void setCenter(
const QGeoCoordinate ¢er);
50 QGeoCoordinate center()
const;
52 void setWidth(
double degreesWidth);
55 void setHeight(
double degreesHeight);
56 double height()
const;
58 using QGeoShape::contains;
59 bool contains(
const QGeoRectangle &rectangle)
const;
60 Q_INVOKABLE
bool intersects(
const QGeoRectangle &rectangle)
const;
62 Q_INVOKABLE
void translate(
double degreesLatitude,
double degreesLongitude);
63 Q_INVOKABLE QGeoRectangle translated(
double degreesLatitude,
double degreesLongitude)
const;
64 Q_INVOKABLE
void extendRectangle(
const QGeoCoordinate &coordinate);
66 Q_INVOKABLE QGeoRectangle united(
const QGeoRectangle &rectangle)
const;
67 QGeoRectangle operator|(
const QGeoRectangle &rectangle)
const;
68 QGeoRectangle &operator|=(
const QGeoRectangle &rectangle);
70 Q_INVOKABLE QString toString()
const;
73 inline QGeoRectanglePrivate *d_func();
74 inline const QGeoRectanglePrivate *d_func()
const;
76#ifndef QT_NO_DATASTREAM
77 friend QDataStream &operator<<(QDataStream &stream,
const QGeoRectangle &rectangle)
79 return stream <<
static_cast<
const QGeoShape &>(rectangle);
81 friend QDataStream &operator>>(QDataStream &stream, QGeoRectangle &rectangle)
83 return stream >>
static_cast<QGeoShape &>(rectangle);