18 void setLimits(
double min,
double max,
int steps);
58 QSlider::setRange(0, steps);
66 long pos = std::round((
double)(maximum() - minimum()) * ratio + minimum());
67 QSlider::setValue(pos);
73 int new_step = std::max(1,
static_cast<int>(std::round(step / ratio)));
74 QSlider::setSingleStep(new_step);
81 const double ratio = (double)value / (
double)(max - min);
86 #endif // REALSLIDER_H