OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
intsetting.hpp
Go to the documentation of this file.
1 #ifndef CSM_PREFS_INTSETTING_H
2 #define CSM_PREFS_INTSETTING_H
3 
4 #include "setting.hpp"
5 
6 namespace CSMPrefs
7 {
8  class IntSetting : public Setting
9  {
10  Q_OBJECT
11 
12  int mMin;
13  int mMax;
14  std::string mTooltip;
15  int mDefault;
16 
17  public:
18 
19  IntSetting (Category *parent, Settings::Manager *values,
20  QMutex *mutex, const std::string& key, const std::string& label, int default_);
21 
22  // defaults to [0, std::numeric_limits<int>::max()]
23  IntSetting& setRange (int min, int max);
24 
25  IntSetting& setMin (int min);
26 
27  IntSetting& setMax (int max);
28 
29  IntSetting& setTooltip (const std::string& tooltip);
30 
32  virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
33 
34  private slots:
35 
36  void valueChanged (int value);
37  };
38 }
39 
40 #endif
std::string mTooltip
Definition: intsetting.hpp:14
int mMax
Definition: intsetting.hpp:13
IntSetting(Category *parent, Settings::Manager *values, QMutex *mutex, const std::string &key, const std::string &label, int default_)
Definition: intsetting.cpp:15
Definition: category.hpp:12
IntSetting & setRange(int min, int max)
Definition: intsetting.cpp:21
IntSetting & setMin(int min)
Definition: intsetting.cpp:28
int mMin
Definition: intsetting.hpp:12
int mDefault
Definition: intsetting.hpp:15
Definition: setting.hpp:22
IntSetting & setTooltip(const std::string &tooltip)
Definition: intsetting.cpp:40
Definition: intsetting.hpp:8
Settings management (can change during runtime)
Definition: settings.hpp:17
void valueChanged(int value)
Definition: intsetting.cpp:66
IntSetting & setMax(int max)
Definition: intsetting.cpp:34
virtual std::pair< QWidget *, QWidget * > makeWidgets(QWidget *parent)
Return label, input widget.
Definition: intsetting.cpp:46