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

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
{
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