3 * Copyright (C) 2011 Roman Moravcik
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 class Compass : public QWidget
33 class Compass : public QGLWidget
45 Compass(CompassType type);
48 void updateWidget(const int azimuth, double calibration);
49 void updateWidget(const int azimuth, bool locked, int speed);
52 void moveTimerEvent();
60 double m_sensorCalibLevel;
62 QColor m_azimuthLabelWarnColor;
64 QColor m_windroseNorthColor;
65 QColor m_windroseColor;
66 QColor m_windroseBckColor;
68 void paintAzimuth(QPainter &painter, const QRectF &area);
69 void paintCompass(QPainter &painter, const QRectF &area);
71 QTimer *m_rotateTimer;
74 void paintEvent(QPaintEvent *event);