1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 19:53:54 +00:00
openmw/apps/opencs/model/prefs/modifiersetting.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
924 B
C++
Raw Normal View History

2016-07-27 17:53:33 +00:00
#ifndef CSM_PREFS_MODIFIERSETTING_H
#define CSM_PREFS_MODIFIERSETTING_H
#include "setting.hpp"
2022-10-19 17:02:00 +00:00
#include <string>
#include <utility>
2022-10-09 10:39:43 +00:00
class QMutex;
class QObject;
class QWidget;
2016-07-27 17:53:33 +00:00
class QEvent;
class QPushButton;
namespace CSMPrefs
{
2022-10-09 10:39:43 +00:00
class Category;
2016-07-27 17:53:33 +00:00
class ModifierSetting : public Setting
{
Q_OBJECT
public:
ModifierSetting(Category* parent, QMutex* mutex, const std::string& key, const std::string& label);
2016-07-27 17:53:33 +00:00
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
2016-07-27 17:53:33 +00:00
void updateWidget() override;
2016-07-27 17:53:33 +00:00
protected:
bool eventFilter(QObject* target, QEvent* event) override;
2016-07-27 17:53:33 +00:00
private:
bool handleEvent(QObject* target, int mod, int value);
void storeValue(int modifier);
void resetState();
2016-07-27 17:53:33 +00:00
QPushButton* mButton;
bool mEditorActive;
private slots:
void buttonToggled(bool checked);
};
}
#endif