OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
modifiersetting.hpp
Go to the documentation of this file.
1 #ifndef CSM_PREFS_MODIFIERSETTING_H
2 #define CSM_PREFS_MODIFIERSETTING_H
3 
4 #include <QKeySequence>
5 
6 #include "setting.hpp"
7 
8 class QEvent;
9 class QPushButton;
10 
11 namespace CSMPrefs
12 {
13  class ModifierSetting : public Setting
14  {
15  Q_OBJECT
16 
17  public:
18 
19  ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
20  const std::string& label);
21 
22  virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
23 
24  protected:
25 
26  bool eventFilter(QObject* target, QEvent* event);
27 
28  private:
29 
30  bool handleEvent(QObject* target, int mod, int value);
31 
32  void storeValue(int modifier);
33  void resetState();
34 
35  QPushButton* mButton;
37 
38  private slots:
39 
40  void buttonToggled(bool checked);
41  };
42 }
43 
44 #endif
bool mEditorActive
Definition: modifiersetting.hpp:36
void buttonToggled(bool checked)
Definition: modifiersetting.cpp:140
Definition: category.hpp:12
void storeValue(int modifier)
Definition: modifiersetting.cpp:112
void resetState()
Definition: modifiersetting.cpp:127
QPushButton * mButton
Definition: modifiersetting.hpp:35
Definition: modifiersetting.hpp:13
Definition: setting.hpp:22
ModifierSetting(Category *parent, Settings::Manager *values, QMutex *mutex, const std::string &key, const std::string &label)
Definition: modifiersetting.cpp:15
bool handleEvent(QObject *target, int mod, int value)
Definition: modifiersetting.cpp:71
Settings management (can change during runtime)
Definition: settings.hpp:17
bool eventFilter(QObject *target, QEvent *event)
Definition: modifiersetting.cpp:42
virtual std::pair< QWidget *, QWidget * > makeWidgets(QWidget *parent)
Definition: modifiersetting.cpp:23