blob: 5ca5962f46dd42d45175ca69782e64b73123dafe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "control/controllinpotmeter.h"
ControlLinPotmeter::ControlLinPotmeter(ConfigKey key,
double dMinValue, double dMaxValue,
double dStep, double dSmallStep,
bool allowOutOfBounds)
: ControlPotmeter(key, dMinValue, dMaxValue, allowOutOfBounds) {
if (m_pControl) {
m_pControl->setBehavior(
new ControlLinPotmeterBehavior(dMinValue, dMaxValue, allowOutOfBounds));
}
if (dStep) {
setStepCount((dMaxValue - dMinValue) / dStep);
}
if (dSmallStep) {
setSmallStepCount((dMaxValue - dMinValue) / dSmallStep);
}
}
|