![]() |
VR-Forces 4.8 Class Documentation
|
A widget for pairing a wind direction dial with a combo box. More...

Public Slots | |
| void | setDirection (int degrees) |
| Set the direction. More... | |
| void | setDirection (double degrees) |
| Set the direction as a double value. More... | |
| void | setCardinalDirection (const QString &dir) |
| Set the cardinal direction. More... | |
Signals | |
| void | directionChanged (int) |
| Signal emitted when the direction changed. More... | |
| void | directionChanged (double) |
| Signal emitted when the direction changed. More... | |
| void | cardinalDirectionChanged (QString) |
| Signal emitted when the cardinal direction changed. More... | |
Public Member Functions | |
| DtWindDirectionWidget (QWidget *parent=NULL, Qt::WindowFlags flags=Qt::Widget) | |
| CTOR. More... | |
| virtual | ~DtWindDirectionWidget () |
| virtual DTOR More... | |
Field value setters. | |
Sets the values of the widget's corresponding fields. | |
| int | direction () const |
| Get the direction. More... | |
| double | directionF () const |
| Get the direction as a double value. More... | |
| QString | cardinalDirection () const |
| Get the cardinal direction. More... | |
Accessors to the underlying widgets. | |
Gets the handle to each of the child widgets. | |
| QHBoxLayout * | mainLayout () |
| Get the main layout for this widget. More... | |
| DtWindDirectionDialWidget * | compassDialWidget () |
| Get the compass-dial for this widget. More... | |
| QComboBox * | comboboxWidget () |
| Get the combo-box for this widget. More... | |
Protected Slots | |
User input slots. | |
Slots connected to the signals of the internal widgets. | |
| virtual void | onDialDirectionChanged (double value) |
| virtual void | onComboBoxIndexChanged (const QString &text) |
Protected Member Functions | |
Event handlers. | |
Extending base-class event handlers to propagate to children. | |
| virtual void | changeEvent (QEvent *evt) |
| Handle the enabled/disabled event. More... | |
| virtual void | showEvent (QShowEvent *evt) |
| virtual void | hideEvent (QHideEvent *evt) |
Protected Attributes | |
| QHBoxLayout * | myLayout |
| DtWindDirectionDialWidget * | myDial |
| QComboBox * | myComboBox |
| QStringList | myCardinalDirections |
| QList< double > | myCardinalBounds |
Private Member Functions | |
| void | setupGui () |
| Sets up the widget's fields. More... | |
| void | connectToSignals () |
| Connects widget signals to slots. More... | |
| QString | makeCardinal (double dir) const |
| Utility function to transform a direction into a cardinal value. More... | |
| double | makeDegrees (const QString &dir) const |
| Utility function to transform a cardinal value into a direction. More... | |
A widget for pairing a wind direction dial with a combo box.
The wind direction dial shows the wind direction and the combo box names the cardinal direction (N, E, S, W, etc).
| makVrv::DtWindDirectionWidget::DtWindDirectionWidget | ( | QWidget * | parent = NULL, |
| Qt::WindowFlags | flags = Qt::Widget |
||
| ) |
CTOR.
| [in] | parent | is the parent to manage this widget. |
| [in] | flags | is a set of windowing flags for display. |
|
virtual |
virtual DTOR
| int makVrv::DtWindDirectionWidget::direction | ( | ) | const |
Get the direction.
| double makVrv::DtWindDirectionWidget::directionF | ( | ) | const |
Get the direction as a double value.
| QString makVrv::DtWindDirectionWidget::cardinalDirection | ( | ) | const |
Get the cardinal direction.
| QHBoxLayout* makVrv::DtWindDirectionWidget::mainLayout | ( | ) |
Get the main layout for this widget.
returns a handle to the main layout.
| DtWindDirectionDialWidget* makVrv::DtWindDirectionWidget::compassDialWidget | ( | ) |
Get the compass-dial for this widget.
returns a handle to the compass-dial.
| QComboBox* makVrv::DtWindDirectionWidget::comboboxWidget | ( | ) |
Get the combo-box for this widget.
returns a handle to the combo-box.
|
signal |
Signal emitted when the direction changed.
|
signal |
Signal emitted when the direction changed.
|
signal |
Signal emitted when the cardinal 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). |
|
slot |
Set the cardinal direction.
| [in] | dir | is the new direction (N, NNE, NE, ENE, E, ESE, etc). |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtual |
Handle the enabled/disabled event.
| [in] | evt | is the event to handle. |
|
protectedvirtual |
Handle the show/hide events.
| [in] | evt | is the event to handle. |
|
protectedvirtual |
|
private |
Sets up the widget's fields.
Non-virtual (Called from CTOR).
|
private |
Connects widget signals to slots.
Non-virtual (Called from CTOR).
|
private |
Utility function to transform a direction into a cardinal value.
| [in] | dir | is the direction to transform. |
|
private |
Utility function to transform a cardinal value into a direction.
| [in] | dir | is the cardinal direction to transform. |
|
protected |
|
protected |
|
protected |
|
protected |