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
*****************************************************************************/
11
#define QWT_COMPASS_H 1
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>;
38
\brief A Compass Widget
40
QwtCompass is a widget to display and enter directions. It consists
41
of a scale, an optional needle and rose.
43
\image html dials1.png
45
\note The examples/dials example shows how to use QwtCompass.
48
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);
57
virtual ~QwtCompass();
59
void setRose(QwtCompassRose *rose);
60
const QwtCompassRose *rose() const;
61
QwtCompassRose *rose();
63
const QMap<double, QString> &labelMap() const;
64
QMap<double, QString> &labelMap();
65
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 *);