1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 10:53:53 +00:00
openmw/apps/opencs/model/prefs/boolsetting.hpp

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

40 lines
758 B
C++
Raw Normal View History

2015-12-10 12:28:48 +00:00
#ifndef CSM_PREFS_BOOLSETTING_H
#define CSM_PREFS_BOOLSETTING_H
#include "setting.hpp"
2022-10-19 17:02:00 +00:00
#include <string>
#include <utility>
class QCheckBox;
2015-12-10 12:28:48 +00:00
namespace CSMPrefs
{
2022-10-19 17:02:00 +00:00
class Category;
2015-12-10 12:28:48 +00:00
class BoolSetting : public Setting
{
Q_OBJECT
std::string mTooltip;
bool mDefault;
QCheckBox* mWidget;
2015-12-10 12:28:48 +00:00
public:
2015-12-15 11:19:48 +00:00
BoolSetting(Category* parent, QMutex* mutex, const std::string& key, const std::string& label, bool default_);
2015-12-10 12:28:48 +00:00
2015-12-15 11:19:48 +00:00
BoolSetting& setTooltip(const std::string& tooltip);
2015-12-10 12:28:48 +00:00
/// Return label, input widget.
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
void updateWidget() override;
2015-12-10 12:28:48 +00:00
private slots:
2015-12-10 12:28:48 +00:00
void valueChanged(int value);
};
}
#endif