![]() |
NDEVR
API Documentation
|
The slider is the classic widget for controlling a bounded value. More...
Public Member Functions | |
| QCustomSlider (Qt::Orientation orientation, QWidget *parent=nullptr) | |
| Constructs a slider with the specified orientation. | |
| QCustomSlider (QWidget *parent=nullptr) | |
| Constructs a slider with default orientation. | |
| void | edited (fltp08 percent) |
| Signal emitted when the slider value changes. | |
| void | editingFinished () |
| Signal emitted when the user finishes editing the slider value. | |
| fltp08 | getValue () const |
| Returns the current slider value as a floating-point percent. | |
| void | setMaximum (fltp08 value) |
| Sets the maximum slider value from a floating-point value. | |
| void | setMinimum (fltp08 value) |
| Sets the minimum slider value from a floating-point value. | |
| void | setRange (fltp08 min, fltp08 max) |
| Sets the minimum and maximum range of the slider. | |
| void | setValue (fltp08 value) |
| Sets the slider value from a floating-point percent. | |
| void | setVertical (bool is_vertical) |
| Sets the slider orientation to vertical or horizontal. | |
Protected Member Functions | |
| void | init () |
| Initializes the slider with default settings and signal connections. | |
| void | onEditedSlot () |
| Slot called when the slider value is edited by the user. | |
| fltp08 | sliderScale () const |
| Returns the internal scale factor used to convert between floating-point values and the integer-based QSlider range. | |
The slider is the classic widget for controlling a bounded value.
It lets the user move a slider handle along a horizontal or vertical groove and translates the handle's position into a percent value 0.0 to 1.0.
Definition at line 13 of file QCustomSlider.h.
|
inline |
Constructs a slider with the specified orientation.
| [in] | orientation | The orientation of the slider (horizontal or vertical). |
| [in] | parent | The parent widget, or nullptr for no parent. |
Definition at line 22 of file QCustomSlider.h.
References init().
|
inline |
Constructs a slider with default orientation.
| [in] | parent | The parent widget, or nullptr for no parent. |
Definition at line 31 of file QCustomSlider.h.
References init().
| void QCustomSlider::edited | ( | fltp08 | percent | ) |
Signal emitted when the slider value changes.
| [in] | percent | The new slider value as a floating-point percent. |
|
inline |
Returns the current slider value as a floating-point percent.
Definition at line 40 of file QCustomSlider.h.
References cast(), and sliderScale().
|
inline |
Sets the maximum slider value from a floating-point value.
| [in] | value | The maximum value, scaled by the internal slider scale. |
Definition at line 56 of file QCustomSlider.h.
References cast(), and sliderScale().
|
inline |
Sets the minimum slider value from a floating-point value.
| [in] | value | The minimum value, scaled by the internal slider scale. |
Definition at line 64 of file QCustomSlider.h.
References cast(), and sliderScale().
Sets the minimum and maximum range of the slider.
| [in] | min | The minimum value of the range. |
| [in] | max | The maximum value of the range. |
|
inline |
Sets the slider value from a floating-point percent.
| [in] | value | The value to set, scaled by the internal slider scale. |
Definition at line 48 of file QCustomSlider.h.
References cast(), and sliderScale().
Referenced by MaterialPropertySlider::refreshFromMaterial().
| void QCustomSlider::setVertical | ( | bool | is_vertical | ) |
Sets the slider orientation to vertical or horizontal.
| [in] | is_vertical | True for vertical orientation, false for horizontal. |
|
inlineprotected |
Returns the internal scale factor used to convert between floating-point values and the integer-based QSlider range.
Definition at line 85 of file QCustomSlider.h.
Referenced by getValue(), setMaximum(), setMinimum(), and setValue().