#include <Workspace/Widgets/rangedslider.h>
Inherits QSlider.
◆ RangedSlider()
The constructor connects the slider's valueChanged() signal to the checkEnds() slot, so client code does not need to do this for themselves. This ensures that the atStart() and atEnd() signals are emitted appropriately without any special action by client code.
◆ atEnd
This signal will be emitted if either the value or the maximum is changed and as a result, value() == maximum().
◆ atStart
This signal will be emitted if either the value or the minimum is changed and as a result, value() == minimum().
◆ checkEnds
Causes the atStart() and/or atEnd() signals to be emitted if the current value is set to the minimum or maximum respectively. If the minimum and maximum are the same, both signals will be emitted, atStart() then atEnd().
◆ setMaximumSlot
void setMaximumSlot |
( |
int |
val | ) |
|
|
slot |
- Parameters
-
val | The new maximum for the range. |
Apart from calling QSlider::setMaximum(), this function also ensures that atEnd() is emitted if the result of setting the maximum to val causes the current value to be set to val.
◆ setMinimumSlot
void setMinimumSlot |
( |
int |
val | ) |
|
|
slot |
- Parameters
-
val | The new minimum for the range. |
Apart from calling QSlider::setMinimum(), this function also ensures that atStart() is emitted if the result of setting the minimum to val causes the current value to be set to val.
◆ setStepSlot
void setStepSlot |
( |
int |
val | ) |
|
|
slot |
- Parameters
-
val | The new step size to use. |
This function simply forwards to QSlider::setSingleStep(). It exists only because setSingleStep() is not a slot and sometimes widgets want to modify the step size dynamically.