1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_COMPASS_ROSE_H
11
#define QWT_COMPASS_ROSE_H 1
14
#include "qwt_global.h"
19
\brief Abstract base class for a compass rose
21
class QWT_EXPORT QwtCompassRose
24
virtual ~QwtCompassRose() {};
26
virtual void setPalette(const QPalette &p) { d_palette = p; }
27
const QPalette &palette() const { return d_palette; }
32
\param painter Painter
33
\param center Center point
34
\param radius Radius of the rose
36
\param colorGroup Color group
38
virtual void draw(QPainter *painter, const QPoint ¢er,
39
int radius, double north,
40
QPalette::ColorGroup colorGroup = QPalette::Active) const = 0;
47
\brief A simple rose for QwtCompass
49
class QWT_EXPORT QwtSimpleCompassRose: public QwtCompassRose
52
QwtSimpleCompassRose(int numThorns = 8, int numThornLevels = -1);
54
void setWidth(double w);
55
double width() const { return d_width; }
57
void setNumThorns(int count);
58
int numThorns() const;
60
void setNumThornLevels(int count);
61
int numThornLevels() const;
63
void setShrinkFactor(double factor) { d_shrinkFactor = factor; }
64
double shrinkFactor() const { return d_shrinkFactor; }
66
virtual void draw(QPainter *, const QPoint ¢er, int radius,
67
double north, QPalette::ColorGroup = QPalette::Active) const;
69
static void drawRose(QPainter *,
70
#if QT_VERSION < 0x040000
75
const QPoint ¢er, int radius, double origin, double width,
76
int numThorns, int numThornLevels, double shrinkFactor);
82
double d_shrinkFactor;
85
#endif // QWT_COMPASS_ROSE_H