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.h | |
parent | ec9116cd7f52e61afc4267b21e35325f4e7fc705 (diff) | |
download | manaplus-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.gz manaplus-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.bz2 manaplus-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.tar.xz manaplus-1b2001d45ea6ee99490d4b1c374b1a03d73bbc86.zip |
Add strong typed bool enum on the fly.
Diffstat (limited to 'src/gui/widgets/setupitem.h')
-rw-r--r-- | src/gui/widgets/setupitem.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 0d817a4b4..2bfa9e04c 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -22,6 +22,7 @@ #define GUI_WIDGETS_SETUPITEM_H #include "enums/simpletypes/mainconfig.h" +#include "enums/simpletypes/onthefly.h" #include "enums/simpletypes/usebase64.h" #include "enums/simpletypes/separator.h" @@ -358,7 +359,7 @@ class SetupItemSlider final : public SetupItem const double max, const double step, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig); SetupItemSlider(const std::string &restrict text, @@ -371,7 +372,7 @@ class SetupItemSlider final : public SetupItem const double step, const std::string &restrict def, const int width, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig); A_DELETE_COPY(SetupItemSlider) @@ -398,7 +399,7 @@ class SetupItemSlider final : public SetupItem double mMax; double mStep; int mWidth; - bool mOnTheFly; + OnTheFly mOnTheFly; }; typedef std::vector<std::string> SetupItemNames; @@ -415,7 +416,7 @@ class SetupItemSlider2 final : public SetupItem const std::string &restrict eventName, const int min, const int max, const int step, SetupItemNames *restrict const values, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig, const bool doNotAlign); @@ -427,7 +428,7 @@ class SetupItemSlider2 final : public SetupItem const int min, const int max, const int step, SetupItemNames *restrict const values, const std::string &restrict def, - const bool onTheFly, + const OnTheFly onTheFly, const MainConfig mainConfig, const bool doNotAlign); @@ -462,7 +463,7 @@ class SetupItemSlider2 final : public SetupItem int mStep; int mInvertValue; bool mInvert; - bool mOnTheFly; + OnTheFly mOnTheFly; bool mDoNotAlign; }; @@ -493,7 +494,7 @@ class SetupItemSliderList notfinal : public SetupItem const std::string &restrict eventName, ListModel *restrict const model, const int width = 150, - const bool onTheFly = false, + const OnTheFly onTheFly = OnTheFly_false, const MainConfig mainConfig = MainConfig_true); SetupItemSliderList(const std::string &restrict text, @@ -504,7 +505,7 @@ class SetupItemSliderList notfinal : public SetupItem ListModel *restrict const model, const std::string &restrict def, const int width = 150, - const bool onTheFly = false, + const OnTheFly onTheFly = OnTheFly_false, const MainConfig mainConfig = MainConfig_true); HorizontContainer *mHorizont; @@ -512,7 +513,7 @@ class SetupItemSliderList notfinal : public SetupItem SliderList *mSlider; ListModel *mModel; int mWidth; - bool mOnTheFly; + OnTheFly mOnTheFly; }; class SetupItemSound final : public SetupItemSliderList @@ -525,7 +526,7 @@ class SetupItemSound final : public SetupItemSliderList const std::string &restrict eventName, ListModel *restrict const model, const int width = 150, - const bool onTheFly = false, + const OnTheFly onTheFly = OnTheFly_false, const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemSound) @@ -549,7 +550,7 @@ class SetupItemSliderInt final : public SetupItemSliderList ListModel *restrict const model, const int min, const int width = 150, - const bool onTheFly = false, + const OnTheFly onTheFly = OnTheFly_false, const MainConfig mainConfig = MainConfig_true); A_DELETE_COPY(SetupItemSliderInt) |