summaryrefslogtreecommitdiffstats
path: root/src/controllinpotmeter.cpp
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2014-07-26 12:21:36 +0200
committerDaniel Schürmann <daschuer@mixxx.org>2014-07-26 12:21:36 +0200
commitb2136b5fca4b0cb59cb291b86096ff82100350e7 (patch)
tree7d3eb20115fd7a7640734a5c7b3b96c83790c01a /src/controllinpotmeter.cpp
parentac828e0c511edd0484db909157a1298ee8d7d026 (diff)
ControlLinPotmeter: Allow setting the steps from the constructor
Diffstat (limited to 'src/controllinpotmeter.cpp')
-rw-r--r--src/controllinpotmeter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/controllinpotmeter.cpp b/src/controllinpotmeter.cpp
index 4db7a63119..91f051ba35 100644
--- a/src/controllinpotmeter.cpp
+++ b/src/controllinpotmeter.cpp
@@ -2,10 +2,20 @@
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);
+ }
}
+
+
+