16 Q_PROPERTY(QGeoCoordinate bottomLeft READ bottomLeft WRITE setBottomLeft)
17 Q_PROPERTY(QGeoCoordinate bottomRight READ bottomRight WRITE setBottomRight)
18 Q_PROPERTY(QGeoCoordinate topLeft READ topLeft WRITE setTopLeft)
19 Q_PROPERTY(QGeoCoordinate topRight READ topRight WRITE setTopRight)
20 Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter)
21 Q_PROPERTY(
double height READ height WRITE setHeight)
22 Q_PROPERTY(
double width READ width WRITE setWidth)
26 QGeoRectangle(
const QGeoCoordinate ¢er,
double degreesWidth,
double degreesHeight);
27 QGeoRectangle(
const QGeoCoordinate &topLeft,
const QGeoCoordinate &bottomRight);
28 QGeoRectangle(
const QList<QGeoCoordinate> &coordinates);
29 QGeoRectangle(
const QGeoRectangle &other);
30 QGeoRectangle(
const QGeoShape &other);
34 QGeoRectangle &operator=(
const QGeoRectangle &other);
36 void setTopLeft(
const QGeoCoordinate &topLeft);
37 QGeoCoordinate topLeft()
const;
39 void setTopRight(
const QGeoCoordinate &topRight);
40 QGeoCoordinate topRight()
const;
42 void setBottomLeft(
const QGeoCoordinate &bottomLeft);
43 QGeoCoordinate bottomLeft()
const;
45 void setBottomRight(
const QGeoCoordinate &bottomRight);
46 QGeoCoordinate bottomRight()
const;
48 void setCenter(
const QGeoCoordinate ¢er);
49 QGeoCoordinate center()
const;
51 void setWidth(
double degreesWidth);
54 void setHeight(
double degreesHeight);
55 double height()
const;
57 using QGeoShape::contains;
58 bool contains(
const QGeoRectangle &rectangle)
const;
59 Q_INVOKABLE
bool intersects(
const QGeoRectangle &rectangle)
const;
61 Q_INVOKABLE
void translate(
double degreesLatitude,
double degreesLongitude);
62 Q_INVOKABLE QGeoRectangle translated(
double degreesLatitude,
double degreesLongitude)
const;
63 Q_INVOKABLE
void extendRectangle(
const QGeoCoordinate &coordinate);
65 Q_INVOKABLE QGeoRectangle united(
const QGeoRectangle &rectangle)
const;
66 QGeoRectangle operator|(
const QGeoRectangle &rectangle)
const;
67 QGeoRectangle &operator|=(
const QGeoRectangle &rectangle);
69 Q_INVOKABLE QString toString()
const;
72 inline QGeoRectanglePrivate *d_func();
73 inline const QGeoRectanglePrivate *d_func()
const;
75#ifndef QT_NO_DATASTREAM
76 friend QDataStream &operator<<(QDataStream &stream,
const QGeoRectangle &rectangle)
78 return stream <<
static_cast<
const QGeoShape &>(rectangle);
80 friend QDataStream &operator>>(QDataStream &stream, QGeoRectangle &rectangle)
82 return stream >>
static_cast<QGeoShape &>(rectangle);