00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_INTERVAL_CURVE_H
00011 #define QWT_PLOT_INTERVAL_CURVE_H
00012
00013 #include "qwt_global.h"
00014 #include "qwt_plot_seriesitem.h"
00015 #include "qwt_series_data.h"
00016
00017 class QwtIntervalSymbol;
00018
00019 class QWT_EXPORT QwtPlotIntervalCurve: public QwtPlotSeriesItem<QwtIntervalSample>
00020 {
00021 public:
00022 enum CurveStyle
00023 {
00024 NoCurve,
00025 Tube,
00026
00027 UserCurve = 100
00028 };
00029
00030 explicit QwtPlotIntervalCurve(const QString &title = QString::null);
00031 explicit QwtPlotIntervalCurve(const QwtText &title);
00032
00033 virtual ~QwtPlotIntervalCurve();
00034
00035 virtual int rtti() const;
00036
00037 void setData(const QwtArray<QwtIntervalSample> &data);
00038 void setData(const QwtSeriesData<QwtIntervalSample> &data);
00039
00040 void setPen(const QPen &);
00041 const QPen &pen() const;
00042
00043 void setBrush(const QBrush &);
00044 const QBrush &brush() const;
00045
00046 void setCurveStyle(CurveStyle style);
00047 CurveStyle curveStyle() const;
00048
00049 void setSymbol(const QwtIntervalSymbol&);
00050 const QwtIntervalSymbol& symbol() const;
00051
00052 virtual void drawSeries(QPainter *p,
00053 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00054 const QRect &canvasRect, int from, int to) const;
00055
00056 virtual QwtDoubleRect boundingRect() const;
00057 virtual void updateLegend(QwtLegend *) const;
00058
00059 protected:
00060
00061 void init();
00062
00063 virtual void drawTube(QPainter *p,
00064 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00065 int from, int to) const;
00066
00067 virtual void drawSymbols(QPainter *p,
00068 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00069 int from, int to) const;
00070
00071 private:
00072 class PrivateData;
00073 PrivateData *d_data;
00074 };
00075
00076 #endif