Qwt User's Guide 6.0.2

- Main Page
- Related Pages
- Classes

qwt_compass.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
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 *****************************************************************************/
9
10 #ifndef QWT_COMPASS_H
11 #define QWT_COMPASS_H 1
12
13 #include "qwt_global.h"
14 #include "qwt_dial.h"
15 #include <qstring.h>
16 #include <qmap.h>
17
18 class QwtCompassRose;
19
31 class QWT_EXPORT QwtCompass: public QwtDial
32 {
33 Q_OBJECT
34
35 public:
36 explicit QwtCompass( QWidget* parent = NULL );
37 virtual ~QwtCompass();
38
39 void setRose( QwtCompassRose *rose );
40 const QwtCompassRose *rose() const;
41 QwtCompassRose *rose();
42
43 const QMap<double, QString> &labelMap() const;
44 QMap<double, QString> &labelMap();
45 void setLabelMap( const QMap<double, QString> &map );
46
47 protected:
48 virtual QwtText scaleLabel( double value ) const;
49
50 virtual void drawRose( QPainter *, const QPointF &center,
51 double radius, double north, QPalette::ColorGroup ) const;
52
53 virtual void drawScaleContents( QPainter *,
54 const QPointF &center, double radius ) const;
55
56 virtual void keyPressEvent( QKeyEvent * );
57
58 private:
59 void initCompass();
60
61 class PrivateData;
62 PrivateData *d_data;
63 };
64
65 #endif