00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef QWT_PLOT_MARKER_H
00013 #define QWT_PLOT_MARKER_H
00014
00015 #include <qpen.h>
00016 #include <qfont.h>
00017 #include <qstring.h>
00018 #include <qbrush.h>
00019 #include "qwt_global.h"
00020 #include "qwt_plot_item.h"
00021
00022 class QRect;
00023 class QwtText;
00024 class QwtSymbol;
00025
00045 class QWT_EXPORT QwtPlotMarker: public QwtPlotItem
00046 {
00047 public:
00048
00053 enum LineStyle {NoLine, HLine, VLine, Cross};
00054
00055 explicit QwtPlotMarker();
00056 virtual ~QwtPlotMarker();
00057
00058 QwtPlotMarker(const QwtPlotMarker&);
00059 QwtPlotMarker &operator=(const QwtPlotMarker&);
00060
00061 virtual int rtti() const;
00062
00063 double xValue() const;
00064 double yValue() const;
00065 QwtDoublePoint value() const;
00066
00067 void setXValue(double);
00068 void setYValue(double);
00069 void setValue(double, double);
00070 void setValue(const QwtDoublePoint &);
00071
00072 void setLineStyle(LineStyle st);
00073 LineStyle lineStyle() const;
00074
00075 void setLinePen(const QPen &p);
00076 const QPen &linePen() const;
00077
00078 void setSymbol(const QwtSymbol &s);
00079 const QwtSymbol &symbol() const;
00080
00081 void setLabel(const QwtText&);
00082 QwtText label() const;
00083
00084 #if QT_VERSION < 0x040000
00085 void setLabelAlignment(int align);
00086 int labelAlignment() const;
00087 #else
00088 void setLabelAlignment(Qt::Alignment);
00089 Qt::Alignment labelAlignment() const;
00090 #endif
00091
00092 virtual void draw(QPainter *p,
00093 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00094 const QRect &) const;
00095
00096 virtual QwtDoubleRect boundingRect() const;
00097
00098 private:
00099 class PrivateData;
00100 PrivateData *d_data;
00101 };
00102
00103 #endif