QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
Definition at line 36 of file qwt_compass.h.
Public Member Functions | |
QwtCompass (QWidget *parent=0, const char *name=0) | |
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 QString | 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.
References QwtDial::setOrigin(), QwtDial::setScaleOptions(), and QwtDial::setWrapping(). |
|
Destructor. Definition at line 66 of file qwt_compass.cpp. |
|
Draw the compass rose
Referenced by drawScaleContents(). |
|
Draw the contents of the scale.
Reimplemented from QwtDial. Definition at line 72 of file qwt_compass.cpp. References drawRose(), QwtSliderBase::isValid(), QwtDial::mode(), QwtDial::origin(), and QwtDblRange::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 154 of file qwt_compass.cpp. References QwtSliderBase::isReadOnly(), QwtDial::keyPressEvent(), QwtDial::mode(), QwtDial::origin(), QwtSliderBase::setValue(), and QwtDblRange::value(). |
|
|
|
|
|
|
|
|
|
Map a value to a corresponding label
Reimplemented from QwtDial. Definition at line 255 of file qwt_compass.cpp. |
|
Set a map, mapping values to labels.
|
|
Set a rose for the compass
|