Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_INTERVAL_SYMBOL_H
00011 #define QWT_INTERVAL_SYMBOL_H
00012
00013 #include "qwt_global.h"
00014 #include <qpen.h>
00015 #include <qsize.h>
00016
00017 class QPainter;
00018 class QRect;
00019 class QPointF;
00020
00026 class QWT_EXPORT QwtIntervalSymbol
00027 {
00028 public:
00030 enum Style
00031 {
00033 NoSymbol = -1,
00034
00039 Bar,
00040
00046 Box,
00047
00053 UserSymbol = 1000
00054 };
00055
00056 public:
00057 explicit QwtIntervalSymbol( Style = NoSymbol );
00058 QwtIntervalSymbol( const QwtIntervalSymbol & );
00059 virtual ~QwtIntervalSymbol();
00060
00061 QwtIntervalSymbol &operator=( const QwtIntervalSymbol & );
00062 bool operator==( const QwtIntervalSymbol & ) const;
00063 bool operator!=( const QwtIntervalSymbol & ) const;
00064
00065 void setWidth( int );
00066 int width() const;
00067
00068 void setBrush( const QBrush& b );
00069 const QBrush& brush() const;
00070
00071 void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00072 void setPen( const QPen & );
00073 const QPen& pen() const;
00074
00075 void setStyle( Style );
00076 Style style() const;
00077
00078 virtual void draw( QPainter *, Qt::Orientation,
00079 const QPointF& from, const QPointF& to ) const;
00080
00081 private:
00082 class PrivateData;
00083 PrivateData* d_data;
00084 };
00085
00086 #endif