qwt_compass_rose.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
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 &center, 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 &center, double radius,
00071         double north, QPalette::ColorGroup = QPalette::Active ) const;
00072 
00073     static void drawRose( QPainter *, const QPalette &,
00074         const QPointF &center, 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 


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:04