1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 08:53:52 +00:00
openmw/apps/opencs/model/prefs/boolsetting.hpp
2023-12-03 17:18:26 +01:00

39 lines
764 B
C++

#ifndef CSM_PREFS_BOOLSETTING_H
#define CSM_PREFS_BOOLSETTING_H
#include "setting.hpp"
#include <string>
#include <utility>
class QCheckBox;
namespace CSMPrefs
{
class Category;
class BoolSetting final : public TypedSetting<bool>
{
Q_OBJECT
std::string mTooltip;
QCheckBox* mWidget;
public:
explicit BoolSetting(
Category* parent, QMutex* mutex, const std::string& key, const QString& label, Settings::Index& index);
BoolSetting& setTooltip(const std::string& tooltip);
/// Return label, input widget.
SettingWidgets makeWidgets(QWidget* parent) override;
void updateWidget() override;
private slots:
void valueChanged(int value);
};
}
#endif