summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setupitem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
commitbcdf34645ff3067d3b4110120b6191af2b0b2e99 (patch)
tree428493a138f0fdaebd4c915153f0dcdcbaedf76d /src/gui/widgets/setupitem.cpp
parenta93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (diff)
parentb64a1f46b930516927b1290c1d6771b491b84958 (diff)
downloadplus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.gz
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.bz2
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.xz
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/setupitem.cpp')
-rw-r--r--src/gui/widgets/setupitem.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 4c32b0572..87bc2baa5 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -713,8 +713,11 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text,
const std::string &restrict keyName,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
- const double min, const double max,
- const int width, const bool onTheFly,
+ const double min,
+ const double max,
+ const double step,
+ const int width,
+ const bool onTheFly,
const bool mainConfig) :
SetupItem(text, description, keyName, parent, eventName, mainConfig),
mHorizont(nullptr),
@@ -722,6 +725,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text,
mSlider(nullptr),
mMin(min),
mMax(max),
+ mStep(step),
mWidth(width),
mOnTheFly(onTheFly)
{
@@ -734,7 +738,9 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text,
const std::string &restrict keyName,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
- const double min, const double max,
+ const double min,
+ const double max,
+ const double step,
const std::string &restrict def,
const int width,
const bool onTheFly,
@@ -745,6 +751,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text,
mSlider(nullptr),
mMin(min),
mMax(max),
+ mStep(step),
mWidth(width),
mOnTheFly(onTheFly)
{
@@ -766,7 +773,7 @@ void SetupItemSlider::createControls()
mHorizont = new HorizontContainer(this, 32, 2);
mLabel = new Label(this, mText);
- mSlider = new Slider(this, mMin, mMax);
+ mSlider = new Slider(this, mMin, mMax, mStep);
mSlider->setActionEventId(mEventName);
mSlider->addActionListener(mParent);
mSlider->setValue(atof(mValue.c_str()));
@@ -823,7 +830,9 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
const std::string &restrict keyName,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
- const int min, const int max,
+ const int min,
+ const int max,
+ const int step,
SetupItemNames *restrict const values,
const bool onTheFly,
const bool mainConfig,
@@ -836,6 +845,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
mValues(values),
mMin(min),
mMax(max),
+ mStep(step),
mInvertValue(0),
mInvert(false),
mOnTheFly(onTheFly),
@@ -850,10 +860,13 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
const std::string &restrict keyName,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
- const int min, const int max,
+ const int min,
+ const int max,
+ const int step,
SetupItemNames *restrict const values,
const std::string &restrict def,
- const bool onTheFly, const bool mainConfig,
+ const bool onTheFly,
+ const bool mainConfig,
const bool doNotAlign) :
SetupItem(text, description, keyName, parent, eventName, def, mainConfig),
mHorizont(nullptr),
@@ -863,6 +876,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text,
mValues(values),
mMin(min),
mMax(max),
+ mStep(step),
mInvertValue(0),
mInvert(false),
mOnTheFly(onTheFly),
@@ -890,7 +904,7 @@ void SetupItemSlider2::createControls()
mLabel = new Label(this, mText);
mLabel2 = new Label(this, "");
mLabel2->setWidth(width);
- mSlider = new Slider(this, mMin, mMax);
+ mSlider = new Slider(this, mMin, mMax, mStep);
mSlider->setActionEventId(mEventName);
mSlider->addActionListener(mParent);
mSlider->setValue(atof(mValue.c_str()));