37 connect(
this, &QSlider::valueChanged,
45 QSlider::setRange(0,steps);
53 long pos = std::round( (
double)(maximum() - minimum()) * ratio + minimum()) ;
54 QSlider::setValue(pos);
61 const double ratio = (double)value / (
double)(max - min );
66 #endif // REALSLIDER_H
double getMinimum() const
double getMaximum() const
void realValueChanged(double)
void setLimits(double min, double max, int steps)
void onValueChanged(int value)
void setRealValue(double val)
RealSlider(QWidget *parent=nullptr)