blob: e3f16d44b492c29d844a3979f7cf2b8f096395dd (
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(static_cast<int>((dMaxValue - dMinValue) / dStep));
}
if (dSmallStep) {
setSmallStepCount(static_cast<int>((dMaxValue - dMinValue) / dSmallStep));
}
}
|