Logo Search packages:      
Sourcecode: qmk-groundstation version File versions  Download package

qmapcontrol::LineString Class Reference

#include <linestring.h>

Inheritance diagram for qmapcontrol::LineString:

qmapcontrol::Curve qmapcontrol::Geometry

List of all members.


Detailed Description

A collection of Point objects to describe a line.

A LineString is a Curve with linear interpolation between Points. Each consecutive pair of Points defines a Line segment.

Author:
Kai Winter <kaiwinter@gmx.de>

Definition at line 38 of file linestring.h.


Public Slots

virtual void setVisible (bool visible)
 if visible is true, the layer is made visible

Signals

void geometryClicked (Geometry *geometry, QPoint point)
 This signal is emitted when a Geometry is clicked.
void positionChanged (Geometry *geom)
 A Geometry emits this signal, when its position gets changed.
void updateRequest (QRectF rect)
void updateRequest (Geometry *geom)

Public Member Functions

void addPoint (Point *point)
 adds a point at the end of the LineString
virtual QRectF boundingBox ()
 returns the BoundingBox
virtual QList< Geometry * > clickedPoints ()
 returns the clicked Points
bool Equals (Geometry *geom)
virtual bool hasClickedPoints () const
 returns true if the LineString has clicked Points
virtual bool hasPoints () const
 returns true if the LineString has Childs
bool isVisible () const
 returns true if this Geometry is visible
 LineString (QList< Point * > const points, QString name=QString(), QPen *pen=0)
 constructor
QString name () const
 returns the name of this Geometry
int numberOfPoints () const
 returns the number of Points the LineString consists of
GeometryparentGeometry () const
 returns the parent Geometry of this Geometry
QPen * pen () const
 returns the QPen which is used on drawing
QList< Point * > points ()
 returns the points of the LineString
void setName (QString name)
 sets the name of the geometry
virtual void setPen (QPen *pen)
void setPoints (QList< Point * > points)
 sets the given list as points of the LineString
QString toString ()
 returns a String representation of this Geometry

Public Attributes

QString GeometryType
double Length

Protected Member Functions

virtual void draw (QPainter *painter, const MapAdapter *mapadapter, const QRect &screensize, const QPoint offset)
void setParentGeometry (Geometry *geom)
virtual bool Touches (Point *geom, const MapAdapter *mapadapter)
virtual bool Touches (Geometry *geom, const MapAdapter *mapadapter)

Protected Attributes

QString myname
QPen * mypen
bool visible

Private Attributes

QList< Geometry * > touchedPoints
QList< Point * > vertices

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index