summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setupitem.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-20 02:49:46 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-20 02:49:46 +0300
commite2620fcbbe0ae5ac43565879f4b7243c367c84cf (patch)
tree39acff6d0c70aebf4f6813e1c9350873b04c63ed /src/gui/widgets/setupitem.h
parent0d2d350e8eb6f57be31f926897e39c6483eeee75 (diff)
downloadmv-e2620fcbbe0ae5ac43565879f4b7243c367c84cf.tar.gz
mv-e2620fcbbe0ae5ac43565879f4b7243c367c84cf.tar.bz2
mv-e2620fcbbe0ae5ac43565879f4b7243c367c84cf.tar.xz
mv-e2620fcbbe0ae5ac43565879f4b7243c367c84cf.zip
Move gui opacity option to visual settings page.
Add slider class for setup pages.
Diffstat (limited to 'src/gui/widgets/setupitem.h')
-rw-r--r--src/gui/widgets/setupitem.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 71856d6e2..220a55494 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -41,6 +41,7 @@ class EditDialog;
class HorizontContainer;
class IntTextField;
class Label;
+class Slider;
class TextField;
class SetupItem : public gcn::ActionListener
@@ -264,4 +265,37 @@ class SetupItemDropDown : public SetupItem
DropDown *mDropDown;
};
+class SetupItemSlider : public SetupItem
+{
+ public:
+ SetupItemSlider(std::string text, std::string description,
+ std::string keyName, SetupTabScroll *parent,
+ std::string eventName, double min, double max,
+ bool mainConfig = true);
+
+ SetupItemSlider(std::string text, std::string description,
+ std::string keyName, SetupTabScroll *parent,
+ std::string eventName, double min, double max,
+ std::string def, bool mainConfig = true);
+
+ ~SetupItemSlider();
+
+ void createControls();
+
+ void fromWidget();
+
+ void toWidget();
+
+ void action(const gcn::ActionEvent &event);
+
+ void apply(std::string eventName);
+
+ protected:
+ HorizontContainer *mHorizont;
+ Label *mLabel;
+ Slider *mSlider;
+ double mMin;
+ double mMax;
+};
+
#endif