1 #ifndef HYDROData_Polyline_HeaderFile
2 #define HYDROData_Polyline_HeaderFile
4 #include <HYDROData_Object.h>
7 #include <QPainterPath>
10 DEFINE_STANDARD_HANDLE(HYDROData_Polyline, HYDROData_Object)
12 /**\class HYDROData_Polyline
13 * \brief Class that stores/retreives information about the painter path.
15 * Keeps path as binary array of element type and coordinates
16 * of image with correspondent API for forkind wit hthese properties.
18 class HYDROData_Polyline : public HYDROData_Object
21 DEFINE_STANDARD_RTTI(HYDROData_Polyline);
24 * Returns the kind of this object. Must be redefined in all objects of known type.
26 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_POLYLINE;}
29 * Replace current array by points list
30 * \param thePoint the point to add
32 HYDRODATA_EXPORT void setPoints( QList<QPointF> thePointsList );
35 * Add point to the end of point list
36 * \param thePoint the point to add
38 HYDRODATA_EXPORT void addPoint( const QPointF& thePoint );
41 * Add point to the point list at the specified position
42 * \param theIndex the index of the list the point will insert after
44 HYDRODATA_EXPORT void insertPoint( int theIndex, const QPointF& thePoint);
47 * Remove point from polyline
48 * \param theIndex the point index
50 HYDRODATA_EXPORT void removePoint( int theIndex );
53 * Remove all points from polyline
54 * \param theIndex the point index
56 HYDRODATA_EXPORT void removeAllPoints();
59 * Return list point count
60 * \return list point count
62 HYDRODATA_EXPORT int pointsCount();
65 * Returns list of points
66 * \return list of points
68 HYDRODATA_EXPORT QList<QPointF> points();
72 * Returns the painter path. The painter path is construct by lines
74 HYDRODATA_EXPORT QPainterPath painterPathLinear();
79 friend class HYDROData_Iterator;
82 * Creates new object in the internal data structure. Use higher level objects
83 * to create objects with real content.
88 * Destructs properties of the object and object itself, removes it from the document.
90 ~HYDROData_Polyline();