QtMobility Reference Documentation

QGeoMapRectangleObject Class Reference

The QGeoMapRectangleObject class is a QGeoMapObject used to draw a rectangular region on a map. More...

 #include <QGeoMapRectangleObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Properties

Public Functions

QGeoMapRectangleObject ()
QGeoMapRectangleObject ( const QGeoBoundingBox & boundingBox )
QGeoMapRectangleObject ( const QGeoCoordinate & topLeft, const QGeoCoordinate & bottomRight )
~QGeoMapRectangleObject ()
QGeoCoordinate bottomRight () const
QGeoBoundingBox bounds () const
QBrush brush () const
QPen pen () const
void setBottomRight ( const QGeoCoordinate & bottomRight )
void setBounds ( const QGeoBoundingBox & bounds )
void setBrush ( const QBrush & brush )
void setPen ( const QPen & pen )
void setTopLeft ( const QGeoCoordinate & topLeft )
QGeoCoordinate topLeft () const

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

void bottomRightChanged ( const QGeoCoordinate & bottomRight )
void brushChanged ( const QBrush & brush )
void penChanged ( const QPen & pen )
void topLeftChanged ( const QGeoCoordinate & topLeft )

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 3 protected functions inherited from QGeoMapObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QGeoMapRectangleObject class is a QGeoMapObject used to draw a rectangular region on a map.

The rectangle is specified by either a valid QGeoBoundingBox instance or a pair of valid QGeoCoordinate instances which represent the top left and bottom right coordinates of the rectangle respectively.

Property Documentation

bottomRight : QGeoCoordinate

This property holds the bottom right coordinate of the rectangle to be drawn by this rectangle object.

The default value of this property is an invalid coordinate. While the value of this property is invalid the rectangle object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QGeoCoordinate bottomRight () const
void setBottomRight ( const QGeoCoordinate & bottomRight )

Notifier signal:

void bottomRightChanged ( const QGeoCoordinate & bottomRight )

brush : QBrush

This property holds the brush that will be used to draw this object.

The brush is used to fill in rectangle.

The outline around the perimeter of the rectangle is drawn using the QGeoMapRectangleObject::pen property.

This property was introduced in Qt Mobility 1.1.

Access functions:

QBrush brush () const
void setBrush ( const QBrush & brush )

Notifier signal:

void brushChanged ( const QBrush & brush )

pen : QPen

This property holds the pen that will be used to draw this object.

The pen is used to draw an outline around the rectangle. The rectangle is filled using the QGeoMapRectangleObject::brush property.

The pen will be treated as a cosmetic pen, which means that the width of the pen will be independent of the zoom level of the map.

This property was introduced in Qt Mobility 1.1.

Access functions:

QPen pen () const
void setPen ( const QPen & pen )

Notifier signal:

void penChanged ( const QPen & pen )

topLeft : QGeoCoordinate

This property holds the top left coordinate of the rectangle to be drawn by this rectangle object.

The default value of this property is an invalid coordinate. While the value of this property is invalid the rectangle object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QGeoCoordinate topLeft () const
void setTopLeft ( const QGeoCoordinate & topLeft )

Notifier signal:

void topLeftChanged ( const QGeoCoordinate & topLeft )

Member Function Documentation

QGeoMapRectangleObject::QGeoMapRectangleObject ()

Constructs a new rectangle object.

QGeoMapRectangleObject::QGeoMapRectangleObject ( const QGeoBoundingBox & boundingBox )

Constructs a new rectangle object based on the bounding box boundingBox.

This function was introduced in Qt Mobility 1.1.

QGeoMapRectangleObject::QGeoMapRectangleObject ( const QGeoCoordinate & topLeft, const QGeoCoordinate & bottomRight )

Constructs a new rectangle object with the top left coordinate at topLeft and the bottom right coordinate at bottomRight.

This function was introduced in Qt Mobility 1.1.

QGeoMapRectangleObject::~QGeoMapRectangleObject ()

Destroys this rectangle object.

void QGeoMapRectangleObject::bottomRightChanged ( const QGeoCoordinate & bottomRight ) [signal]

This signal is emitted when the bottom right coordinate of this rectangle object has changed.

The new value is bottomRight.

This function was introduced in Qt Mobility 1.1.

QGeoBoundingBox QGeoMapRectangleObject::bounds () const

Returns a QGeoBoundingBox instance which corresponds to the rectangle that will be drawn by this object.

This is equivalent to

 QGeoMapRectangleObject *object;
 // setup object
 QGeoBoundingBox(object->topLeft(), object->bottomRight());

This function was introduced in Qt Mobility 1.1.

See also setBounds().

void QGeoMapRectangleObject::brushChanged ( const QBrush & brush ) [signal]

This signal is emitted when the brush used to fill in the interior of this rectangle object has changed.

The new value is brush.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRectangleObject::penChanged ( const QPen & pen ) [signal]

This signal is emitted when the pen used to draw the perimeter of this rectangle object has changed.

The new value is pen.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRectangleObject::setBounds ( const QGeoBoundingBox & bounds )

Sets the rectangle that will be drawn by this object to bounds.

This is equivalent to

 QGeoMapRectangleObject *object;
 // setup object
 object->setTopLeft(bounds.topLeft());
 object->setBottomRight(bounds.bottomRight());

This function was introduced in Qt Mobility 1.1.

See also bounds().

void QGeoMapRectangleObject::topLeftChanged ( const QGeoCoordinate & topLeft ) [signal]

This signal is emitted when the top left coordinate of this rectangle object has changed.

The new value is topLeft.

This function was introduced in Qt Mobility 1.1.

QGeoMapObject::Type QGeoMapRectangleObject::type () const [virtual]

Reimplemented from QGeoMapObject::type().

This function was introduced in Qt Mobility 1.1.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.