00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_MARKER_H
00011 #define QWT_PLOT_MARKER_H
00012
00013 #include <qpen.h>
00014 #include <qfont.h>
00015 #include <qstring.h>
00016 #include <qbrush.h>
00017 #include "qwt_global.h"
00018 #include "qwt_plot_item.h"
00019
00020 class QRectF;
00021 class QwtText;
00022 class QwtSymbol;
00023
00044 class QWT_EXPORT QwtPlotMarker: public QwtPlotItem
00045 {
00046 public:
00047
00052 enum LineStyle
00053 {
00055 NoLine,
00056
00058 HLine,
00059
00061 VLine,
00062
00064 Cross
00065 };
00066
00067 explicit QwtPlotMarker();
00068 virtual ~QwtPlotMarker();
00069
00070 virtual int rtti() const;
00071
00072 double xValue() const;
00073 double yValue() const;
00074 QPointF value() const;
00075
00076 void setXValue( double );
00077 void setYValue( double );
00078 void setValue( double, double );
00079 void setValue( const QPointF & );
00080
00081 void setLineStyle( LineStyle st );
00082 LineStyle lineStyle() const;
00083
00084 void setLinePen( const QPen &p );
00085 const QPen &linePen() const;
00086
00087 void setSymbol( const QwtSymbol * );
00088 const QwtSymbol *symbol() const;
00089
00090 void setLabel( const QwtText& );
00091 QwtText label() const;
00092
00093 void setLabelAlignment( Qt::Alignment );
00094 Qt::Alignment labelAlignment() const;
00095
00096 void setLabelOrientation( Qt::Orientation );
00097 Qt::Orientation labelOrientation() const;
00098
00099 void setSpacing( int );
00100 int spacing() const;
00101
00102 virtual void draw( QPainter *p,
00103 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00104 const QRectF & ) const;
00105
00106 virtual QRectF boundingRect() const;
00107
00108 virtual void updateLegend( QwtLegend * ) const;
00109 virtual void drawLegendIdentifier( QPainter *, const QRectF & ) const;
00110
00111 protected:
00112 virtual void drawLines( QPainter *,
00113 const QRectF &, const QPointF & ) const;
00114
00115 virtual void drawLabel( QPainter *,
00116 const QRectF &, const QPointF & ) const;
00117
00118 private:
00119
00120 class PrivateData;
00121 PrivateData *d_data;
00122 };
00123
00124 #endif