1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-02 15:15:35 +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.

35 lines
699 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"
class QCheckBox;
2015-12-10 12:28:48 +00:00
namespace CSMPrefs
{
class BoolSetting : public Setting
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
std::string mTooltip;
bool mDefault;
QCheckBox* mWidget;
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
public:
BoolSetting(Category* parent, QMutex* mutex, const std::string& key, const std::string& label, bool default_);
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
BoolSetting& setTooltip(const std::string& tooltip);
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
/// Return label, input widget.
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
void updateWidget() override;
2015-12-10 12:28:48 +00:00
2022-09-22 18:26:05 +00:00
private slots:
2022-09-22 18:26:05 +00:00
void valueChanged(int value);
2015-12-10 12:28:48 +00:00
};
}
#endif