QtMobility Reference Documentation

QGeoMapPolygonObject Class Reference

The QGeoMapPolygonObject class is a QGeoMapObject used to draw a polygon on a map. More...

 #include <QGeoMapPolygonObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Properties

Public Functions

QGeoMapPolygonObject ()
~QGeoMapPolygonObject ()
QBrush brush () const
QList<QGeoCoordinate> path () const
QPen pen () const
void setBrush ( const QBrush & brush )
void setPath ( const QList<QGeoCoordinate> & path )
void setPen ( const QPen & pen )

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

void brushChanged ( const QBrush & brush )
void pathChanged ( const QList<QGeoCoordinate> & path )
void penChanged ( const QPen & pen )

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 QGeoMapPolygonObject class is a QGeoMapObject used to draw a polygon on a map.

The polygon is specified by a set of at least 3 valid QGeoCoordinate instances listed in the same order in which the coordinates would be traversed when traveling around the border of the polygon.

Property Documentation

brush : QBrush

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

The brush is used to fill in polygon.

The outline around the perimeter of the polygon is drawn using the QGeoMapPolygonObject::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 )

path : QList<QGeoCoordinate>

This property holds the ordered list of coordinates which define the polygon to be drawn by this polygon object.

The default value of this property is an empty list of coordinates.

The coordinates should be listed in the order in which they would be traversed when traveling around the border of the polygon.

Invalid coordinates in the list will be ignored, and if the list of coordinates contains less than 3 valid coordinates then the polygon object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QList<QGeoCoordinate> path () const
void setPath ( const QList<QGeoCoordinate> & path )

Notifier signal:

void pathChanged ( const QList<QGeoCoordinate> & path )

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 polygon. The polygon is filled using the QGeoMapPolygonObject::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 )

Member Function Documentation

QGeoMapPolygonObject::QGeoMapPolygonObject ()

Constructs a new polygon object.

QGeoMapPolygonObject::~QGeoMapPolygonObject ()

Destroys this polygon object.

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

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

The new value is brush.

This function was introduced in Qt Mobility 1.1.

void QGeoMapPolygonObject::pathChanged ( const QList<QGeoCoordinate> & path ) [signal]

This signal is emitted when the ordered list of coordinates that define the polygon to be drawn by this polygon object has changed.

The new value is path.

This function was introduced in Qt Mobility 1.1.

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

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

The new value is pen.

This function was introduced in Qt Mobility 1.1.

QGeoMapObject::Type QGeoMapPolygonObject::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.