1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +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
764 B
C++
Raw Normal View History

2015-12-10 13:28:48 +01:00
#ifndef CSM_PREFS_BOOLSETTING_H
#define CSM_PREFS_BOOLSETTING_H
#include "setting.hpp"
2022-10-19 19:02:00 +02:00
#include <string>
#include <utility>
class QCheckBox;
2015-12-10 13:28:48 +01:00
namespace CSMPrefs
{
2022-10-19 19:02:00 +02:00
class Category;
2023-11-12 00:52:09 +01:00
class BoolSetting final : public TypedSetting<bool>
2015-12-10 13:28:48 +01:00
{
Q_OBJECT
std::string mTooltip;
QCheckBox* mWidget;
2015-12-10 13:28:48 +01:00
public:
2023-11-12 00:52:09 +01:00
explicit BoolSetting(
Category* parent, QMutex* mutex, const std::string& key, const QString& label, Settings::Index& index);
2015-12-10 13:28:48 +01:00
2015-12-15 12:19:48 +01:00
BoolSetting& setTooltip(const std::string& tooltip);
2015-12-10 13:28:48 +01:00
/// Return label, input widget.
SettingWidgets makeWidgets(QWidget* parent) override;
2015-12-10 13:28:48 +01:00
void updateWidget() override;
2015-12-10 13:28:48 +01:00
private slots:
2015-12-10 13:28:48 +01:00
void valueChanged(int value);
};
}
#endif