00001
00002
00003
00004
00005
00006
00007 #ifndef GRAPHICS_POINT_H
00008 #define GRAPHICS_POINT_H
00009
00010 #include "GraphicsPointAbstractBase.h"
00011 #include "GraphicsPoint.h"
00012 #include <QColor>
00013 #include <QPointF>
00014
00015 class CurveStyle;
00016 class GraphicsPointEllipse;
00017 class GraphicsPointPolygon;
00018 class PointStyle;
00019 class QColor;
00020 class QGraphicsScene;
00021 class QPolygonF;
00022 class QTextStream;
00023 class QVariant;
00024
00039 class GraphicsPoint : public GraphicsPointAbstractBase
00040 {
00041 public:
00043 GraphicsPoint(QGraphicsScene &scene,
00044 const QString &identifier,
00045 const QPointF &posScreen,
00046 const QColor &color,
00047 unsigned int radius,
00048 double lineWidth);
00049
00051 GraphicsPoint(QGraphicsScene &scene,
00052 const QString &identifier,
00053 const QPointF &posScreen,
00054 const QColor &color,
00055 const QPolygonF &polygon,
00056 double lineWidth);
00057
00059 ~GraphicsPoint ();
00060
00062 QVariant data (int key) const;
00063
00065 QPointF pos () const;
00066
00068 void printStream (QString indentation,
00069 QTextStream &str,
00070 double ordinalKey) const;
00071
00073 void reset();
00074
00076 void setData (int key, const QVariant &data);
00077
00079 void setPointStyle (const PointStyle &pointStyle);
00080
00082 void setPos (const QPointF pos);
00083
00085 void setToolTip (const QString &toolTip);
00086
00088 void setWanted ();
00089
00091 void updateCurveStyle (const CurveStyle &curveStyle);
00092
00094 bool wanted () const;
00095
00096 private:
00097 GraphicsPoint();
00098
00099 void createPointEllipse (unsigned int radius);
00100 void createPointPolygon (const QPolygonF &polygon);
00101
00102 QGraphicsScene &m_scene;
00103
00104
00105 GraphicsPointEllipse *m_graphicsItemEllipse;
00106 GraphicsPointEllipse *m_shadowZeroWidthEllipse;
00107
00108
00109 GraphicsPointPolygon *m_graphicsItemPolygon;
00110 GraphicsPointPolygon *m_shadowZeroWidthPolygon;
00111
00112
00113 const QString m_identifier;
00114 const QPointF m_posScreen;
00115 const QColor m_color;
00116 double m_lineWidth;
00117
00118
00119 bool m_wanted;
00120 };
00121
00122 #endif // GRAPHICS_POINT_H