~ubuntu-branches/ubuntu/saucy/goldencheetah/saucy

« back to all changes in this revision

Viewing changes to qwt/src/qwt_compass.h

  • Committer: Package Import Robot
  • Author(s): KURASHIKI Satoru
  • Date: 2013-08-18 07:02:45 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130818070245-zgdvb47e1k3mtgil
Tags: 3.0-3
debian/control: remove needless dependency. (Closes: #719571)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#ifndef QWT_COMPASS_H
11
11
#define QWT_COMPASS_H 1
12
12
 
 
13
#include "qwt_global.h"
 
14
#include "qwt_dial.h"
13
15
#include <qstring.h>
14
16
#include <qmap.h>
15
 
#include "qwt_dial.h"
16
 
 
17
 
#if defined(QWT_TEMPLATEDLL)
18
 
 
19
 
#if defined(QT_NO_STL) || QT_VERSION < 0x040000 || QT_VERSION > 0x040001
20
 
/*
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
25
 
  and fix the qmap.h
26
 
*/
27
 
// MOC_SKIP_BEGIN
28
 
template class QWT_EXPORT QMap<double, QString>;
29
 
// MOC_SKIP_END
30
 
#endif
31
 
 
32
 
#endif
33
 
 
34
17
 
35
18
class QwtCompassRose;
36
19
 
38
21
  \brief A Compass Widget
39
22
 
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.
42
25
 
43
 
  \image html dials1.png 
 
26
  \image html dials1.png
44
27
 
45
28
  \note The examples/dials example shows how to use QwtCompass.
46
29
*/
47
30
 
48
 
class QWT_EXPORT QwtCompass: public QwtDial 
 
31
class QWT_EXPORT QwtCompass: public QwtDial
49
32
{
50
33
    Q_OBJECT
51
34
 
52
35
public:
53
 
    explicit QwtCompass( QWidget* parent = NULL);
54
 
#if QT_VERSION < 0x040000
55
 
    explicit QwtCompass(QWidget* parent, const char *name);
56
 
#endif
 
36
    explicit QwtCompass( QWidget* parent = NULL );
57
37
    virtual ~QwtCompass();
58
38
 
59
 
    void setRose(QwtCompassRose *rose);
 
39
    void setRose( QwtCompassRose *rose );
60
40
    const QwtCompassRose *rose() const;
61
41
    QwtCompassRose *rose();
62
42
 
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 );
66
46
 
67
47
protected:
68
 
    virtual QwtText scaleLabel(double value) const;
69
 
 
70
 
    virtual void drawRose(QPainter *, const QPoint &center,
71
 
        int radius, double north, QPalette::ColorGroup) const;
72
 
 
73
 
    virtual void drawScaleContents(QPainter *, 
74
 
        const QPoint &center, int radius) const; 
75
 
 
76
 
    virtual void keyPressEvent(QKeyEvent *);
 
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 * );
77
57
 
78
58
private:
79
59
    void initCompass();