Inherits QwtDial.
A Compass Widget.
QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
Note:
Definition at line 36 of file qwt_compass.h.
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)
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.
Parameters:
Create a compass widget with a scale, no needle and no rose. The default origin is 270.0 with no valid value. It accepts mouse and keyboard inputs and has no step size. The default mode is QwtDial::RotateNeedle. Definition at line 34 of file qwt_compass.cpp.
References QwtDial::setOrigin(), QwtDial::setScaleOptions(), and QwtDial::setWrapping().
Destructor.
Definition at line 66 of file qwt_compass.cpp.
Draw the compass rose
Parameters:
Definition at line 101 of file qwt_compass.cpp.
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.
See also:
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().
Returns:
See also:
Definition at line 223 of file qwt_compass.cpp.
Returns:
See also:
Definition at line 214 of file qwt_compass.cpp.
Returns:
See also:
Definition at line 140 of file qwt_compass.cpp.
Returns:
See also:
Definition at line 131 of file qwt_compass.cpp.
Map a value to a corresponding label
Parameters:
Returns:
label() looks in a map for a corresponding label for value or return QString::null.
See also:
Reimplemented from QwtDial.
Definition at line 255 of file qwt_compass.cpp.
Set a map, mapping values to labels.
Parameters:
The values of the major ticks are found by looking into this map. The default map consists of the labels N, NE, E, SE, S, SW, W, NW.
Warning:
See also:
Definition at line 240 of file qwt_compass.cpp.
Set a rose for the compass
Parameters:
Warning:
See also:
Definition at line 115 of file qwt_compass.cpp.
Generated automatically by Doxygen for Qwt User's Guide from the source code.