![]() |
VR-Forces 4.5 Class Documentation
|
A widget for pairing a horizontal slider with a double spin-box. More...

Public Types | |
| enum | SliderScale { LINEAR, LOGARITHMIC } |
Signals | |
| void | valueChanged (double value) |
| Signal when the value has changed by either the slider or spinbox. | |
Public Member Functions | |
| DtSliderDoubleSpinboxWidget (double maxValue, double minValue=0, QWidget *parent=NULL, Qt::WindowFlags flags=Qt::Widget) | |
| CTOR. | |
| DtSliderDoubleSpinboxWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::Widget) | |
| CTOR for use with UI files. | |
| virtual | ~DtSliderDoubleSpinboxWidget () |
| virtual DTOR | |
Field value setters. | |
Sets the values of the widget's corresponding fields. | |
| virtual void | setValue (double value) |
| Set the current value. | |
| virtual double | value () const |
| Get the current value. | |
| virtual void | setMaxAndMin (double maxValue, double minValue) |
| Set the maximum and minimum values. | |
| virtual double | maximum () const |
| Get the maximum allowed value for this widget. | |
| virtual double | minimum () const |
| Get the minimum allowed value for this widget. | |
| virtual void | setSingleStep (double step) |
| Set the single step value. | |
| virtual double | singleStep () const |
| Get the single step value for this widget. | |
| virtual void | setSliderScale (SliderScale scale) |
| Set the slider scale type. | |
| virtual SliderScale | setSliderScale () const |
| Get the slider scale type. | |
| virtual void | setSliderRange (int range) |
| Set the slider range. | |
| virtual int | sliderRange () const |
| Get the slider range. | |
Accessors to the underlying widgets. | |
Gets the handle to each of the child widgets. | |
| QHBoxLayout * | mainLayout () |
| Get the main layout for this widget. | |
| QSlider * | sliderWidget () |
| Get the slider for this widget. | |
| QDoubleSpinBox * | spinboxWidget () |
| Get the spin-box for this widget. | |
Protected Slots | |
User input slots. | |
Slots connected to the signals of the internal widgets. | |
| virtual void | onSliderValueChanged (int value) |
| virtual void | onSpinnerValueChanged (double value) |
Protected Member Functions | |
Event handlers. | |
Extending base-class event handlers to propagate to children. | |
| virtual void | changeEvent (QEvent *evt) |
| Handle the enabled/disabled event. | |
| virtual void | showEvent (QShowEvent *evt) |
| virtual void | hideEvent (QHideEvent *evt) |
Protected Attributes | |
| QHBoxLayout * | myLayout |
| QSlider * | mySlider |
| QDoubleSpinBox * | mySpinBox |
| double | myMaximum |
| double | myMinimum |
| SliderScale | mySliderScale |
| double | myScaleFactor |
Private Member Functions | |
| void | setupGui () |
| Sets up the widget's fields. | |
| void | connectToSignals () |
| Connects widget signals to slots. | |
| virtual int | makeInteger (double value) |
| Helper function to convert spin-box double to slider int value. | |
| virtual double | makeDouble (int value) |
| Helper function to convert slider int to spin-box double value. | |
A widget for pairing a horizontal slider with a double spin-box.
The spin box must be clamped to a min and max value, as the slider cannot slide continuously.
| makVrv::DtSliderDoubleSpinboxWidget::DtSliderDoubleSpinboxWidget | ( | double | maxValue, |
| double | minValue = 0, |
||
| QWidget * | parent = NULL, |
||
| Qt::WindowFlags | flags = Qt::Widget |
||
| ) |
CTOR.
| [in] | maxValue | is the maximum allowed value for this widget. |
| [in] | minValue | is the minimum allowed value for this widget. |
| [in] | parent | is the parent to manage this widget. |
| [in] | flags | is a set of windowing flags for display. |
| makVrv::DtSliderDoubleSpinboxWidget::DtSliderDoubleSpinboxWidget | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | flags = Qt::Widget |
||
| ) |
CTOR for use with UI files.
| [in] | parent | is the parent to manage this widget. |
|
virtual |
virtual DTOR
|
virtual |
Set the current value.
| [in] | value | is the new value to set. |
|
virtual |
Get the current value.
|
virtual |
Set the maximum and minimum values.
| [in] | maxValue | is the maximum allowed value for this widget. |
| [in] | minValue | is the minimum allowed value for this widget. |
|
virtual |
Get the maximum allowed value for this widget.
|
virtual |
Get the minimum allowed value for this widget.
|
virtual |
Set the single step value.
| [in] | step | is the single step value through the range. |
|
virtual |
Get the single step value for this widget.
|
virtual |
Set the slider scale type.
| [in] | scale | is the slider scale (default LINEAR). |
|
virtual |
Get the slider scale type.
|
virtual |
Set the slider range.
| [in] | range | is the slider range Default is 100 for linear and 10000 for logarithmic. Note that calling setSliderScale() will reset the range to the default values |
|
virtual |
Get the slider range.
| QHBoxLayout* makVrv::DtSliderDoubleSpinboxWidget::mainLayout | ( | ) |
Get the main layout for this widget.
returns a handle to the main layout.
| QSlider* makVrv::DtSliderDoubleSpinboxWidget::sliderWidget | ( | ) |
Get the slider for this widget.
returns a handle to the slider.
| QDoubleSpinBox* makVrv::DtSliderDoubleSpinboxWidget::spinboxWidget | ( | ) |
Get the spin-box for this widget.
returns a handle to the spin-box.
|
signal |
Signal when the value has changed by either the slider or spinbox.
| [in] | value | is the new current value. |
|
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).
Helper function to convert spin-box double to slider int value.
Helper function to convert slider int to spin-box double value.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |