diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-01 13:03:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-01 13:03:27 +0300 |
commit | 1b2001d45ea6ee99490d4b1c374b1a03d73bbc86 (patch) | |
tree | 1677f727de2185b8abd56f3917f2a759d26fb3f8 /src/gui/widgets/setupitem.cpp | |
parent | ec9116cd7f52e61afc4267b21e35325f4e7fc705 (diff) | |
download | manaverse-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.gz manaverse-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.bz2 manaverse-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.xz manaverse-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.zip |
Add strong typed bool enum on the fly.
Diffstat (limited to 'src/gui/widgets/setupitem.cpp')
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 94e6231f9..be26265c3 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -728,7 +728,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text, const double max, const double step, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), @@ -754,7 +754,7 @@ SetupItemSlider::SetupItemSlider(const std::string &restrict text, const double step, const std::string &restrict def, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -823,7 +823,7 @@ void SetupItemSlider::toWidget() void SetupItemSlider::action(const ActionEvent &event A_UNUSED) { fromWidget(); - if (mOnTheFly) + if (mOnTheFly == OnTheFly_true) save(); } @@ -846,7 +846,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, const int max, const int step, SetupItemNames *restrict const values, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig, const bool doNotAlign) : SetupItem(text, description, keyName, parent, eventName, mainConfig), @@ -877,7 +877,7 @@ SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, const int step, SetupItemNames *restrict const values, const std::string &restrict def, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig, const bool doNotAlign) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), @@ -987,7 +987,7 @@ void SetupItemSlider2::action(const ActionEvent &event A_UNUSED) { fromWidget(); updateLabel(); - if (mOnTheFly) + if (mOnTheFly == OnTheFly_true) save(); } @@ -1033,7 +1033,7 @@ SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, const std::string &restrict eventName, ListModel *restrict const model, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), @@ -1055,7 +1055,7 @@ SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, ListModel *restrict const model, const std::string &restrict def, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -1120,7 +1120,7 @@ void SetupItemSliderList::toWidget() void SetupItemSliderList::action(const ActionEvent &event A_UNUSED) { fromWidget(); - if (mOnTheFly) + if (mOnTheFly == OnTheFly_true) save(); } @@ -1139,7 +1139,8 @@ SetupItemSound::SetupItemSound(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, ListModel *restrict const model, - const int width, const bool onTheFly, + const int width, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItemSliderList(text, description, keyName, parent, eventName, model, width, onTheFly, mainConfig), @@ -1179,7 +1180,7 @@ SetupItemSliderInt::SetupItemSliderInt(const std::string &restrict text, ListModel *restrict const model, const int min, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig) : SetupItemSliderList(text, description, keyName, parent, eventName, model, width, onTheFly, mainConfig), |