52 QSlider::setRange(0, steps);
60 long pos = std::round((
double)(maximum() - minimum()) * ratio + minimum());
61 QSlider::setValue(pos);
67 int new_step =
std::max(1, static_cast<int>(std::round(step / ratio)));
68 QSlider::setSingleStep(new_step);
75 const double ratio = (double)value / (
double)(max -
min);
80 #endif // REALSLIDER_H enum MQTTPropertyCodes value
double getMinimum() const
double getMaximum() const
void realValueChanged(double)
void setLimits(double min, double max, int steps)
void onValueChanged(int value)
void setRealStepValue(double step)
void setRealValue(double val)
RealSlider(QWidget *parent=nullptr)