~showard314/ubuntu/natty/qtiplot/Python2.7_fix

« back to all changes in this revision

Viewing changes to 3rdparty/qwt/examples/dials/attitude_indicator.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-04-04 15:11:55 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404151155-rjp12ziov4tryj0o
Tags: 0.9.4-1
* New upstream release.
* Refresh patches.
* Remove 04_homepage_url patch. Merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <qwt_dial.h>
 
2
#include <qwt_dial_needle.h>
 
3
 
 
4
class AttitudeIndicatorNeedle: public QwtDialNeedle
 
5
{
 
6
public:
 
7
    AttitudeIndicatorNeedle(const QColor &);
 
8
 
 
9
    virtual void draw(QPainter *, const QPoint &, int length,
 
10
        double direction, QPalette::ColorGroup) const;
 
11
};
 
12
 
 
13
class AttitudeIndicator: public QwtDial
 
14
{
 
15
    Q_OBJECT
 
16
 
 
17
public:
 
18
    AttitudeIndicator(QWidget *parent = NULL);
 
19
 
 
20
    double angle() const { return value(); }
 
21
    double gradient() const { return d_gradient; }
 
22
 
 
23
public slots:
 
24
    void setGradient(double);
 
25
    void setAngle(double angle) { setValue(angle); }
 
26
 
 
27
protected:
 
28
    virtual void keyPressEvent(QKeyEvent *);
 
29
 
 
30
    virtual void drawScale(QPainter *, const QPoint &center,
 
31
        int radius, double origin, double arcMin, double arcMax) const;
 
32
 
 
33
    virtual void drawScaleContents(QPainter *painter,
 
34
        const QPoint &center, int radius) const;
 
35
 
 
36
private:
 
37
    double d_gradient;
 
38
};