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
00043 class QWT_EXPORT QwtPlotMarker: public QwtPlotItem
00044 {
00045 public:
00046
00051 enum LineStyle
00052 {
00053 NoLine,
00054 HLine,
00055 VLine,
00056 Cross
00057 };
00058
00059 explicit QwtPlotMarker();
00060 virtual ~QwtPlotMarker();
00061
00062 virtual int rtti() const;
00063
00064 double xValue() const;
00065 double yValue() const;
00066 QPointF value() const;
00067
00068 void setXValue( double );
00069 void setYValue( double );
00070 void setValue( double, double );
00071 void setValue( const QPointF & );
00072
00073 void setLineStyle( LineStyle st );
00074 LineStyle lineStyle() const;
00075
00076 void setLinePen( const QPen &p );
00077 const QPen &linePen() const;
00078
00079 void setSymbol( const QwtSymbol *s );
00080 const QwtSymbol &symbol() const;
00081
00082 void setLabel( const QwtText& );
00083 QwtText label() const;
00084
00085 void setLabelAlignment( Qt::Alignment );
00086 Qt::Alignment labelAlignment() const;
00087
00088 void setLabelOrientation( Qt::Orientation );
00089 Qt::Orientation labelOrientation() const;
00090
00091 void setSpacing( int );
00092 int spacing() const;
00093
00094 virtual void draw( QPainter *p,
00095 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00096 const QRectF & ) const;
00097
00098 virtual QRectF boundingRect() const;
00099
00100 protected:
00101 void drawAt( QPainter *, const QRectF &, const QPointF & ) const;
00102
00103 private:
00104 void drawLabel( QPainter *, const QRectF &, const QPointF & ) const;
00105
00106 class PrivateData;
00107 PrivateData *d_data;
00108 };
00109
00110 #endif