1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/apps/opencs/model/prefs/modifiersetting.hpp
2022-10-31 21:04:01 +01:00

48 lines
924 B
C++

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