QtMobility Reference Documentation

QGeoMapPolylineObject Class Reference

The QGeoMapPolylineObject class is a QGeoMapObject used to draw a segmented line on a map. More...

 #include <QGeoMapPolylineObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Properties

  • path : QList<QGeoCoordinate>
  • pen : QPen

Public Functions

QGeoMapPolylineObject ()
~QGeoMapPolylineObject ()
QList<QGeoCoordinate> path () const
QPen pen () const
void setPath ( const QList<QGeoCoordinate> & path )
void setPen ( const QPen & pen )

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

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 QGeoMapPolylineObject class is a QGeoMapObject used to draw a segmented line on a map.

The polyline is specified by a list of at least 2 valid QGeoCoordinate instances and a line will be drawn between every adjacent pairs of coordinates in the list.

Property Documentation

path : QList<QGeoCoordinate>

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

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

A line will be drawn between every pair of coordinates which are adjacent in the list.

Invalid coordinates in the list will be ignored, and if the list of coordinates contains less than 2 valid coordinates then the polyline 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 the polyline.

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

QGeoMapPolylineObject::QGeoMapPolylineObject ()

Constructs a new polyline object.

QGeoMapPolylineObject::~QGeoMapPolylineObject ()

Destroys this polyline object.

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

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

The new value is path.

This function was introduced in Qt Mobility 1.1.

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

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

The new value is pen.

This function was introduced in Qt Mobility 1.1.

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