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>
|
2024-01-05 11:51:48 +00:00
|
|
|
#include <string_view>
|
2022-10-19 17:02:00 +00:00
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
class QMutex;
|
|
|
|
class QObject;
|
|
|
|
class QWidget;
|
|
|
|
|
2017-05-09 07:50:16 +00:00
|
|
|
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;
|
2017-05-09 07:50:16 +00:00
|
|
|
CSVWidget::ColorEditor* mWidget;
|
2015-12-11 10:15:14 +00:00
|
|
|
|
|
|
|
public:
|
2023-11-11 23:52:09 +00:00
|
|
|
explicit ColourSetting(
|
2024-01-05 11:51:48 +00:00
|
|
|
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.
|
2023-11-10 12:28:10 +00:00
|
|
|
SettingWidgets makeWidgets(QWidget* parent) override;
|
2015-12-11 10:15:14 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void updateWidget() override;
|
2015-12-11 10:15:14 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
private slots:
|
2017-05-09 07:50:16 +00:00
|
|
|
|
2015-12-11 10:15:14 +00:00
|
|
|
void valueChanged();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|