1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/apps/opencs/model/prefs/coloursetting.hpp

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

50 lines
900 B
C++
Raw Normal View History

2015-12-11 10:15:14 +00:00
#ifndef CSM_PREFS_COLOURSETTING_H
#define CSM_PREFS_COLOURSETTING_H
#include "setting.hpp"
#include <QColor>
2022-10-19 17:02:00 +00:00
#include <string>
#include <string_view>
2022-10-19 17:02:00 +00:00
#include <utility>
class QMutex;
class QObject;
class QWidget;
namespace CSVWidget
{
class ColorEditor;
}
2015-12-11 10:15:14 +00:00
namespace CSMPrefs
{
2022-10-19 17:02:00 +00:00
class Category;
2023-11-11 23:52:09 +00:00
class ColourSetting final : public TypedSetting<std::string>
2015-12-11 10:15:14 +00:00
{
Q_OBJECT
std::string mTooltip;
CSVWidget::ColorEditor* mWidget;
2015-12-11 10:15:14 +00:00
public:
2023-11-11 23:52:09 +00:00
explicit ColourSetting(
Category* parent, QMutex* mutex, std::string_view key, const QString& label, Settings::Index& index);
2015-12-11 10:15:14 +00:00
2015-12-15 11:19:48 +00:00
ColourSetting& setTooltip(const std::string& tooltip);
2015-12-11 10:15:14 +00:00
/// Return label, input widget.
SettingWidgets makeWidgets(QWidget* parent) override;
2015-12-11 10:15:14 +00:00
void updateWidget() override;
2015-12-11 10:15:14 +00:00
private slots:
2015-12-11 10:15:14 +00:00
void valueChanged();
};
}
#endif