1#ifndef BOUNDPROGRESSBARFACTORY_H
2#define BOUNDPROGRESSBARFACTORY_H
4#include "library/limited_value/ValueLimiter.hpp"
20template <ValueLimitType default_value, ValueLimitType min = 0, ValueLimitType max = 100>
23 "Default Value is MisMatch");
37 connect(
monitoring_bar, &QSlider::valueChanged,
this, [
this](
int value) {
Factory class for creating bounded QSlider widgets.
Definition BoundProgressBarFactory.hpp:21
BoundSliderFactory(QSlider *barWidget, QObject *parent=nullptr)
Constructs a BoundSliderFactory instance.
Definition BoundProgressBarFactory.hpp:31
QSlider * monitoring_bar
Definition BoundProgressBarFactory.hpp:69
int queryValue() const
Gets the current slider value.
Definition BoundProgressBarFactory.hpp:46
void setValue(int value)
Sets the slider value (with bounds enforcement)
Definition BoundProgressBarFactory.hpp:52
int current_value
Definition BoundProgressBarFactory.hpp:68
virtual void _plain_set_value(int value)
Internal method for setting values with bounds checking.
Definition BoundProgressBarFactory.hpp:64
static constexpr ValueLimitType boundValue(ValueLimitType value)
Clamps a value to the static bounds.
Definition ValueLimiter.hpp:78
constexpr bool inBound(ValueLimitType value, ValueLimitSimplePair p)
Checks if a value is within bounds.
Definition ValueLimiter.hpp:40