QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
Definition at line 48 of file qwt_compass.h.
Public Member Functions | |
QwtCompass (QWidget *parent=NULL) | |
virtual | ~QwtCompass () |
void | setRose (QwtCompassRose *rose) |
const QwtCompassRose * | rose () const |
QwtCompassRose * | rose () |
const QMap< double, QString > & | labelMap () const |
QMap< double, QString > & | labelMap () |
void | setLabelMap (const QMap< double, QString > &map) |
Protected Member Functions | |
virtual QwtText | scaleLabel (double value) const |
virtual void | drawRose (QPainter *, const QPoint ¢er, int radius, double north, QPalette::ColorGroup) const |
virtual void | drawScaleContents (QPainter *, const QPoint ¢er, int radius) const |
virtual void | keyPressEvent (QKeyEvent *) |
|
Constructor.
Definition at line 50 of file qwt_compass.cpp. References QwtDial::setOrigin(), QwtDial::setScaleOptions(), and QwtDial::setWrapping(). |
|
Destructor.
Definition at line 83 of file qwt_compass.cpp. |
|
Draw the compass rose
Definition at line 118 of file qwt_compass.cpp. Referenced by drawScaleContents(). |
|
Draw the contents of the scale.
Reimplemented from QwtDial. Definition at line 89 of file qwt_compass.cpp. References drawRose(), QwtAbstractSlider::isValid(), QwtDial::mode(), QwtDial::origin(), and QwtDoubleRange::value(). |
|
Handles key events Beside the keys described in QwtDial::keyPressEvent numbers from 1-9 (without 5) set the direction according to their position on the num pad.
Reimplemented from QwtDial. Definition at line 171 of file qwt_compass.cpp. References QwtAbstractSlider::isReadOnly(), QwtDial::keyPressEvent(), QwtDial::mode(), QwtDial::origin(), QwtAbstractSlider::setValue(), and QwtDoubleRange::value(). |
|
Definition at line 240 of file qwt_compass.cpp. |
|
Definition at line 231 of file qwt_compass.cpp. |
|
Definition at line 157 of file qwt_compass.cpp. |
|
Definition at line 148 of file qwt_compass.cpp. |
|
Map a value to a corresponding label
Reimplemented from QwtDial. Definition at line 272 of file qwt_compass.cpp. |
|
Set a map, mapping values to labels.
Definition at line 257 of file qwt_compass.cpp. |
|
Set a rose for the compass
Definition at line 132 of file qwt_compass.cpp. |