10
10
#ifndef QWT_COMPASS_H
11
11
#define QWT_COMPASS_H 1
13
#include "qwt_global.h"
13
15
#include <qstring.h>
17
#if defined(QWT_TEMPLATEDLL)
19
#if defined(QT_NO_STL) || QT_VERSION < 0x040000 || QT_VERSION > 0x040001
21
Unfortunately Qt 4.0.0/Qt 4.0.1 contains uncompilable
22
code in the STL adaptors of qmap.h. The declaration below
23
instantiates this code resulting in compiler errors.
24
If you really need the map to be exported, remove the condition above
28
template class QWT_EXPORT QMap<double, QString>;
35
18
class QwtCompassRose;
38
21
\brief A Compass Widget
40
23
QwtCompass is a widget to display and enter directions. It consists
41
of a scale, an optional needle and rose.
24
of a scale, an optional needle and rose.
43
\image html dials1.png
26
\image html dials1.png
45
28
\note The examples/dials example shows how to use QwtCompass.
48
class QWT_EXPORT QwtCompass: public QwtDial
31
class QWT_EXPORT QwtCompass: public QwtDial
53
explicit QwtCompass( QWidget* parent = NULL);
54
#if QT_VERSION < 0x040000
55
explicit QwtCompass(QWidget* parent, const char *name);
36
explicit QwtCompass( QWidget* parent = NULL );
57
37
virtual ~QwtCompass();
59
void setRose(QwtCompassRose *rose);
39
void setRose( QwtCompassRose *rose );
60
40
const QwtCompassRose *rose() const;
61
41
QwtCompassRose *rose();
63
43
const QMap<double, QString> &labelMap() const;
64
44
QMap<double, QString> &labelMap();
65
void setLabelMap(const QMap<double, QString> &map);
45
void setLabelMap( const QMap<double, QString> &map );
68
virtual QwtText scaleLabel(double value) const;
70
virtual void drawRose(QPainter *, const QPoint ¢er,
71
int radius, double north, QPalette::ColorGroup) const;
73
virtual void drawScaleContents(QPainter *,
74
const QPoint ¢er, int radius) const;
76
virtual void keyPressEvent(QKeyEvent *);
48
virtual QwtText scaleLabel( double value ) const;
50
virtual void drawRose( QPainter *, const QPointF ¢er,
51
double radius, double north, QPalette::ColorGroup ) const;
53
virtual void drawScaleContents( QPainter *,
54
const QPointF ¢er, double radius ) const;
56
virtual void keyPressEvent( QKeyEvent * );
79
59
void initCompass();