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
00028 class QWT_EXPORT QwtPlotIntervalCurve: public QwtPlotSeriesItem<QwtIntervalSample>
00029 {
00030 public:
00052 enum CurveStyle
00053 {
00054 NoCurve,
00055
00056 Tube,
00057
00058 UserCurve = 100
00059 };
00060
00061 explicit QwtPlotIntervalCurve( const QString &title = QString::null );
00062 explicit QwtPlotIntervalCurve( const QwtText &title );
00063
00064 virtual ~QwtPlotIntervalCurve();
00065
00066 virtual int rtti() const;
00067
00068 void setSamples( const QVector<QwtIntervalSample> & );
00069
00070 void setPen( const QPen & );
00071 const QPen &pen() const;
00072
00073 void setBrush( const QBrush & );
00074 const QBrush &brush() const;
00075
00076 void setStyle( CurveStyle style );
00077 CurveStyle style() const;
00078
00079 void setSymbol( const QwtIntervalSymbol * );
00080 const QwtIntervalSymbol *symbol() const;
00081
00082 virtual void drawSeries( QPainter *p,
00083 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00084 const QRectF &canvasRect, int from, int to ) const;
00085
00086 virtual QRectF boundingRect() const;
00087 virtual void drawLegendIdentifier( QPainter *, const QRectF & ) const;
00088
00089 protected:
00090
00091 void init();
00092
00093 virtual void drawTube( QPainter *,
00094 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00095 int from, int to ) const;
00096
00097 virtual void drawSymbols( QPainter *, const QwtIntervalSymbol &,
00098 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00099 int from, int to ) const;
00100
00101 private:
00102 class PrivateData;
00103 PrivateData *d_data;
00104 };
00105
00106 #endif