![]() |
VR-Forces 4.6.1 Class Documentation
|
A compass rose with a wind-direction arrow. More...

Public Types | |
| enum | BackGroundType { TICKS, ROSE } |
| enum | NeedleType { ARROW, FULLARROW, LINE } |
Public Slots | |
| void | setDirection (int degrees) |
| Set the direction. | |
| void | setDirection (double degrees) |
| Set the direction as a double value. | |
Signals | |
| void | directionChanged (int) |
| Signal emitted when the direction changed. | |
| void | directionChanged (double) |
| Signal emitted when the direction changed. | |
Public Member Functions | |
| DtWindDirectionDialWidget (QWidget *parent=NULL) | |
| CTOR. | |
| virtual | ~DtWindDirectionDialWidget () |
| virtual DTOR | |
| virtual void | setBackGround (BackGroundType type) |
| Set the background for the compass. | |
| virtual BackGroundType | backGround () const |
| Get the background for the compass. | |
| virtual void | setNeedle (NeedleType type) |
| Set the needle for the compass. | |
| virtual NeedleType | needle () const |
| Get the needle for the compass. | |
| int | direction () const |
| Get the direction. | |
| double | directionF () const |
| Get the direction as a double value. | |
Protected Slots | |
| void | onValueChanged (int val) |
| Convert the base class value to a direction (180 degree change). | |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *event) |
| Override the paint event to draw the widget. | |
| virtual void | resizeEvent (QResizeEvent *event) |
| Override the resize event to change how the widget is displayed. | |
| virtual void | drawCompass (QPainter &painter, QRectF &rect) |
| Utility function to draw the compass background. | |
| virtual void | drawCompassTick (QPainter &painter) |
| Utility function to draw the compass tick. | |
| virtual void | drawHeadingNorth (QPainter &painter) |
| Utility function to draw the letter N. | |
| virtual void | drawDirection (QPainter &painter, QRectF &rect) |
| Utility function to draw the direction from. | |
| virtual void | drawNeedle (QPainter &painter) |
| Utility function to draw the needle. | |
Protected Attributes | |
| BackGroundType | myBackGroundType |
| NeedleType | myNeedleType |
| double | myRemainder |
Private Member Functions | |
| int | convert (int val) const |
| Utility to convert from base class value to direction and back. | |
A compass rose with a wind-direction arrow.
| makVrv::DtWindDirectionDialWidget::DtWindDirectionDialWidget | ( | QWidget * | parent = NULL | ) |
CTOR.
| [in] | parent | is the parent to manage this widget. |
|
virtual |
virtual DTOR
|
virtual |
Set the background for the compass.
| [in] | type | is the type of background, default TICKS. |
|
virtual |
Get the background for the compass.
|
virtual |
Set the needle for the compass.
| [in] | type | is the type of needle, default ARROW. |
|
virtual |
Get the needle for the compass.
| int makVrv::DtWindDirectionDialWidget::direction | ( | ) | const |
Get the direction.
| double makVrv::DtWindDirectionDialWidget::directionF | ( | ) | const |
Get the direction as a double value.
|
signal |
Signal emitted when the direction changed.
|
signal |
Signal emitted when the direction changed.
|
slot |
Set the direction.
| [in] | degrees | is the new direction (wrapped to range 0-359). |
|
slot |
Set the direction as a double value.
| [in] | degrees | is the new direction (wrapped to range 0-359). |
|
protectedslot |
Convert the base class value to a direction (180 degree change).
|
protectedvirtual |
Override the paint event to draw the widget.
| [in] | event | is the current paint event. |
|
protectedvirtual |
Override the resize event to change how the widget is displayed.
| [in] | event | is the resize event event. |
|
protectedvirtual |
Utility function to draw the compass background.
| [in] | painter | is the painter to use for drawing. |
| [in] | rect | is the rectangular space to draw in. |
|
protectedvirtual |
Utility function to draw the compass tick.
| [in] | painter | is the painter to use for drawing. |
|
protectedvirtual |
Utility function to draw the letter N.
| [in] | painter | is the painter to use for drawing. |
|
protectedvirtual |
Utility function to draw the direction from.
| [in] | painter | is the painter to use for drawing. |
| [in] | rect | is the rectangular space to draw in. |
|
protectedvirtual |
Utility function to draw the needle.
| [in] | painter | is the painter to use for drawing. |
Utility to convert from base class value to direction and back.
| [in] | val | is value to convert. |
|
protected |
|
protected |
|
protected |