Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_COMPASS_ROSE_H
00011 #define QWT_COMPASS_ROSE_H 1
00012
00013 #include "qwt_global.h"
00014 #include <qpalette.h>
00015
00016 class QPainter;
00017
00021 class QWT_EXPORT QwtCompassRose
00022 {
00023 public:
00024 QwtCompassRose();
00025 virtual ~QwtCompassRose();
00026
00027 virtual void setPalette( const QPalette & );
00028 const QPalette &palette() const;
00029
00039 virtual void draw( QPainter *painter,
00040 const QPointF ¢er, double radius, double north,
00041 QPalette::ColorGroup colorGroup = QPalette::Active ) const = 0;
00042
00043 private:
00044 Q_DISABLE_COPY(QwtCompassRose)
00045
00046 QPalette d_palette;
00047 };
00048
00052 class QWT_EXPORT QwtSimpleCompassRose: public QwtCompassRose
00053 {
00054 public:
00055 QwtSimpleCompassRose( int numThorns = 8, int numThornLevels = -1 );
00056 virtual ~QwtSimpleCompassRose();
00057
00058 void setWidth( double w );
00059 double width() const;
00060
00061 void setNumThorns( int count );
00062 int numThorns() const;
00063
00064 void setNumThornLevels( int count );
00065 int numThornLevels() const;
00066
00067 void setShrinkFactor( double factor );
00068 double shrinkFactor() const;
00069
00070 virtual void draw( QPainter *, const QPointF ¢er, double radius,
00071 double north, QPalette::ColorGroup = QPalette::Active ) const;
00072
00073 static void drawRose( QPainter *, const QPalette &,
00074 const QPointF ¢er, double radius, double origin, double width,
00075 int numThorns, int numThornLevels, double shrinkFactor );
00076
00077 private:
00078 class PrivateData;
00079 PrivateData *d_data;
00080 };
00081
00082 #endif