Factory class for creating bounded QSlider widgets. More...
#include <BoundProgressBarFactory.hpp>
Public Member Functions | |
BoundSliderFactory (QSlider *barWidget, QObject *parent=nullptr) | |
Constructs a BoundSliderFactory instance. | |
int | queryValue () const |
Gets the current slider value. | |
void | setValue (int value) |
Sets the slider value (with bounds enforcement) | |
Protected Member Functions | |
virtual void | _plain_set_value (int value) |
Internal method for setting values with bounds checking. | |
Protected Attributes | |
int | current_value { default_value } |
QSlider * | monitoring_bar |
Factory class for creating bounded QSlider widgets.
This template class provides a convenient way to create and manage QSlider widgets with enforced value boundaries. It handles value clamping and synchronization between the internal state and the actual QSlider widget.
default_value | The default value for the slider (must be within min/max bounds) |
min | The minimum allowed value (default 0) |
max | The maximum allowed value (default 100) |
|
inlineexplicit |
Constructs a BoundSliderFactory instance.
barWidget | Pointer to the QSlider widget to manage |
parent | Parent QObject (optional) |
|
inlineprotectedvirtual |
Internal method for setting values with bounds checking.
value | The value to set |
Reimplemented in PageSwitchingLimiter.
|
inline |
Gets the current slider value.
|
inline |
Sets the slider value (with bounds enforcement)
value | The new value to set |
|
protected |
The current bounded value
|
protected |
Pointer to the managed QSlider widget