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. |
|
Destructor.
Definition at line 77 of file qwt_compass.cpp. |
|
Draw the compass rose
Definition at line 143 of file qwt_compass.cpp. Referenced by drawScaleContents(). |
|
Draw the contents of the scale.
Reimplemented from QwtDial. Definition at line 114 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 196 of file qwt_compass.cpp. References QwtAbstractSlider::isReadOnly(). |
|
Definition at line 265 of file qwt_compass.cpp. |
|
Definition at line 256 of file qwt_compass.cpp. |
|
Definition at line 182 of file qwt_compass.cpp. |
|
Definition at line 173 of file qwt_compass.cpp. Referenced by setRose(). |
|
Map a value to a corresponding label
Reimplemented from QwtDial. Definition at line 297 of file qwt_compass.cpp. |
|
Set a map, mapping values to labels.
Definition at line 282 of file qwt_compass.cpp. |
|
Set a rose for the compass
Definition at line 157 of file qwt_compass.cpp. References rose(). |