|
Qwt User's Guide
6.0.2
|
#include <qwt_compass.h>

Public Member Functions | |
| QwtCompass (QWidget *parent=NULL) | |
| virtual | ~QwtCompass () |
| const QMap< double, QString > & | labelMap () const |
| QMap< double, QString > & | labelMap () |
| const QwtCompassRose * | rose () const |
| QwtCompassRose * | rose () |
| void | setLabelMap (const QMap< double, QString > &map) |
| void | setRose (QwtCompassRose *rose) |
Public Member Functions inherited from QwtDial | |
| QwtDial (QWidget *parent=NULL) | |
| virtual | ~QwtDial () |
| QRectF | boundingRect () const |
| Direction | direction () const |
| Shadow | frameShadow () const |
| QRectF | innerRect () const |
| int | lineWidth () const |
| double | maxScaleArc () const |
| virtual QSize | minimumSizeHint () const |
| double | minScaleArc () const |
| Mode | mode () const |
| const QwtDialNeedle * | needle () const |
| QwtDialNeedle * | needle () |
| double | origin () const |
| QwtDialScaleDraw * | scaleDraw () |
| const QwtDialScaleDraw * | scaleDraw () const |
| virtual QRectF | scaleInnerRect () const |
| void | setDirection (Direction) |
| void | setFrameShadow (Shadow) |
| void | setLineWidth (int) |
| void | setMode (Mode) |
| virtual void | setNeedle (QwtDialNeedle *) |
| virtual void | setOrigin (double) |
| virtual void | setScale (int maxMajIntv, int maxMinIntv, double step=0.0) |
| void | setScaleArc (double min, double max) |
| void | setScaleComponents (QwtAbstractScaleDraw::ScaleComponents) |
| virtual void | setScaleDraw (QwtDialScaleDraw *) |
| void | setScaleTicks (int minLen, int medLen, int majLen, int penWidth=1) |
| virtual void | setWrapping (bool) |
| virtual QSize | sizeHint () const |
| bool | wrapping () const |
Public Member Functions inherited from QwtAbstractSlider | |
| QwtAbstractSlider (Qt::Orientation, QWidget *parent=NULL) | |
| virtual | ~QwtAbstractSlider () |
| bool | isReadOnly () const |
| bool | isValid () const |
| virtual double | mass () const |
| Qt::Orientation | orientation () const |
| virtual void | setMass (double val) |
| virtual void | setOrientation (Qt::Orientation o) |
| void | setTracking (bool enable) |
| void | setUpdateTime (int t) |
| void | setValid (bool valid) |
| void | stopMoving () |
Public Member Functions inherited from QwtDoubleRange | |
| QwtDoubleRange () | |
| virtual | ~QwtDoubleRange () |
| virtual void | incPages (int) |
| double | maxValue () const |
| double | minValue () const |
| int | pageSize () const |
| bool | periodic () const |
| void | setPeriodic (bool tf) |
| void | setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1) |
| void | setStep (double) |
| double | step () const |
| double | value () const |
Protected Member Functions | |
| virtual void | drawRose (QPainter *, const QPointF ¢er, double radius, double north, QPalette::ColorGroup) const |
| virtual void | drawScaleContents (QPainter *, const QPointF ¢er, double radius) const |
| virtual void | keyPressEvent (QKeyEvent *) |
| virtual QwtText | scaleLabel (double value) const |
Protected Member Functions inherited from QwtDial | |
| virtual void | drawContents (QPainter *) const |
| virtual void | drawFocusIndicator (QPainter *) const |
| virtual void | drawFrame (QPainter *p) |
| virtual void | drawNeedle (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const |
| virtual void | drawScale (QPainter *, const QPointF ¢er, double radius, double origin, double arcMin, double arcMax) const |
| virtual void | getScrollMode (const QPoint &, QwtAbstractSlider::ScrollMode &, int &direction) const |
| virtual double | getValue (const QPoint &) |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | rangeChange () |
| void | updateScale () |
| virtual void | valueChange () |
Protected Member Functions inherited from QwtAbstractSlider | |
| virtual void | mouseMoveEvent (QMouseEvent *e) |
| double | mouseOffset () const |
| virtual void | mousePressEvent (QMouseEvent *e) |
| virtual void | mouseReleaseEvent (QMouseEvent *e) |
| int | scrollMode () const |
| void | setMouseOffset (double) |
| virtual void | setPosition (const QPoint &) |
| virtual void | timerEvent (QTimerEvent *e) |
| virtual void | wheelEvent (QWheelEvent *e) |
Protected Member Functions inherited from QwtDoubleRange | |
| double | exactPrevValue () const |
| double | exactValue () const |
| double | prevValue () const |
| virtual void | stepChange () |
Additional Inherited Members | |
Public Types inherited from QwtDial | |
| enum | Direction { Clockwise, CounterClockwise } |
| enum | Mode { RotateNeedle, RotateScale } |
| enum | Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken } |
Public Types inherited from QwtAbstractSlider | |
| enum | ScrollMode { ScrNone, ScrMouse, ScrTimer, ScrDirect, ScrPage } |
A Compass Widget.
QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
|
explicit |
Constructor.
| parent | Parent widget |
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.
|
protectedvirtual |
Draw the compass rose
| painter | Painter |
| center | Center of the compass |
| radius | of the circle, where to paint the rose |
| north | Direction pointing north, in degrees counter clockwise |
| cg | Color group |
|
protectedvirtual |
Draw the contents of the scale
| painter | Painter |
| center | Center of the content circle |
| radius | Radius of the content circle |
Reimplemented from QwtDial.
|
protectedvirtual |
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.
| const QMap< double, QString > & QwtCompass::labelMap | ( | ) | const |
| QMap< double, QString > & QwtCompass::labelMap | ( | ) |
| const QwtCompassRose * QwtCompass::rose | ( | ) | const |
| QwtCompassRose * QwtCompass::rose | ( | ) |
|
protectedvirtual |
Map a value to a corresponding label
| value | Value that will be mapped |
label() looks in a map for a corresponding label for value or return an null text.
Reimplemented from QwtDial.
| void QwtCompass::setLabelMap | ( | const QMap< double, QString > & | map | ) |
Set a map, mapping values to labels.
| map | value to label map |
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.
| void QwtCompass::setRose | ( | QwtCompassRose * | rose | ) |
Set a rose for the compass
| rose | Compass rose |
1.8.1