Go to the documentation of this file.00001 #ifndef PLOT_AREA_H
00002 #define PLOT_AREA_H
00003
00004 #include <qwt_plot_item.h>
00005
00006 class PlotArea : public QwtPlotItem
00007 {
00008
00009
00010
00011 enum Type { Rect, XInterval, YInterval };
00012
00013
00014
00015
00016 public:
00017 PlotArea();
00018 virtual ~PlotArea();
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 public:
00032 Type type() const { return m_type; }
00033 void setBrush( QBrush brush ) { m_brush = brush; }
00034 QBrush brush() const { return m_brush; }
00035 void setRect( double xLowerBound, double yLowerBound,
00036 double xUpperBound, double yUpperBound );
00037 QRectF rect() const { return m_rect; }
00038 void setXInterval( double lowerBound, double upperBound );
00039 double xIntervalLowerBound() const { return m_xIntervalLowerBound; }
00040 double xIntervalUpperBound() const { return m_xIntervalUpperBound; }
00041 void setYInterval( double lowerBound, double upperBound );
00042 double yIntervalLowerBound() const { return m_yIntervalLowerBound; }
00043 double yIntervalUpperBound() const { return m_yIntervalUpperBound; }
00044
00045 virtual int rtti() const;
00046 virtual void draw( QPainter* painter, const QwtScaleMap& xMap,
00047 const QwtScaleMap& yMap, const QRect& canvasRect ) const;
00048
00049
00050
00051
00052 private:
00053 Type m_type;
00054 QBrush m_brush;
00055 int m_alpha;
00056 double m_xIntervalLowerBound;
00057 double m_xIntervalUpperBound;
00058 double m_yIntervalLowerBound;
00059 double m_yIntervalUpperBound;
00060 QRectF m_rect;
00061 };
00062
00063 #endif