Qt Mobility Reference Documentation

QGeoMapCircleObject Class Reference

The QGeoMapCircleObject class is a QGeoMapObject used to draw the region within a given distance of a coordinate. More...

 #include <QGeoMapCircleObject>

Inherits QGeoMapObject.

Properties

Public Functions

QGeoMapCircleObject ()
QGeoMapCircleObject ( const QGeoBoundingCircle & circle )
QGeoMapCircleObject ( const QGeoCoordinate & center, qreal radius )
~QGeoMapCircleObject ()
QBrush brush () const
QGeoCoordinate center () const
QGeoBoundingCircle circle () const
QPen pen () const
qreal radius () const
void setBrush ( const QBrush & brush )
void setCenter ( const QGeoCoordinate & center )
void setCircle ( const QGeoBoundingCircle & circle )
void setPen ( const QPen & pen )
void setRadius ( qreal radius )

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

void brushChanged ( const QBrush & brush )
void centerChanged ( const QGeoCoordinate & center )
void penChanged ( const QPen & pen )
void radiusChanged ( qreal radius )

Additional Inherited Members

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

Detailed Description

The QGeoMapCircleObject class is a QGeoMapObject used to draw the region within a given distance of a coordinate.

The circle is specified by either a valid QGeoBoundingCircle instance or a valid QGeoCoordinate instance and a qreal with value greater than 0.0, which represent the center of the circle and the radius of the circle in metres respectively.

The circle may appear as an ellipse on maps which use the Mercator projection. This is done so that the circle accurately covers all points at a distance of the radius or less from the center.

Property Documentation

brush : QBrush

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

The brush is used to fill in circle.

The outline around the perimeter of the circle is drawn using the QGeoMapCircleObject::pen property.

Access functions:

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

Notifier signal:

void brushChanged ( const QBrush & brush )

center : QGeoCoordinate

This property holds this property holds the coordinate of the center of the circle to be drawn by this circle object.

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

Access functions:

QGeoCoordinate center () const
void setCenter ( const QGeoCoordinate & center )

Notifier signal:

void centerChanged ( const QGeoCoordinate & center )

pen : QPen

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

The pen is used to draw an outline around the circle. The circle is filled using the QGeoMapCircleObject::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.

Access functions:

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

Notifier signal:

void penChanged ( const QPen & pen )

radius : qreal

This property holds this property holds the radius in metres of the circle that will be drawn by this circle object.

The default value of this property is -1.0. While the value of this property is not greater than 0 the circle object will not be displayed.

Access functions:

qreal radius () const
void setRadius ( qreal radius )

Notifier signal:

void radiusChanged ( qreal radius )

Member Function Documentation

QGeoMapCircleObject::QGeoMapCircleObject ()

Constructs a new circle object.

QGeoMapCircleObject::QGeoMapCircleObject ( const QGeoBoundingCircle & circle )

Constructs a new circle object based on the circle circle.

QGeoMapCircleObject::QGeoMapCircleObject ( const QGeoCoordinate & center, qreal radius )

Constructs a new circle object with a center at coordinate center and a radius in meters of radius.

QGeoMapCircleObject::~QGeoMapCircleObject ()

Destroys this circle object.

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

This signal is emitted when the brush used to fill the inside of the circle object has changed.

The new value is brush.

void QGeoMapCircleObject::centerChanged ( const QGeoCoordinate & center ) [signal]

This signal is emitted when the center of the circle object has changed.

The new value is center.

QGeoBoundingCircle QGeoMapCircleObject::circle () const

Returns a QGeoBoundingCircle instance which corresponds to the circle that will be drawn by this object.

This is equivalent to

 QGeoMapCircleObject *object;
 // setup object
 QGeoBoundingCircle(object->center(), object->radius());

See also setCircle().

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

This signal is emitted when the pen used to draw the edge of the circle object has changed.

The new value is pen.

void QGeoMapCircleObject::radiusChanged ( qreal radius ) [signal]

This signal is emitted when the radius of the circle object has changed.

The new value is radius.

void QGeoMapCircleObject::setCircle ( const QGeoBoundingCircle & circle )

Sets the circle that will be drawn by this object to circle.

This is equivalent to

 QGeoMapCircleObject *object;
 // setup object
 object->setCenter(circle.center());
 object->setRadius(circle.radius());

See also circle().

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

Reimplemented from QGeoMapObject::type().

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.