Loading...
Searching...
No Matches
SkinEditorWidget.hpp
1#pragma once
2#include <score_plugin_scenario_export.h>
3
4#include <verdigris>
5
6#include <QWidget>
7
8class QComboBox;
9class QLineEdit;
10class QPlainTextEdit;
11class QLabel;
12class QListWidget;
13class QSpinBox;
14class QCheckBox;
15class QJsonObject;
16class QTimer;
17namespace color_widgets
18{
19class ColorWheel;
20}
21
22namespace Scenario
23{
24namespace Settings
25{
33class SCORE_PLUGIN_SCENARIO_TEST_EXPORT SkinEditorWidget final : public QWidget
34{
35 W_OBJECT(SkinEditorWidget)
36public:
37 explicit SkinEditorWidget(QWidget* parent = nullptr);
38 ~SkinEditorWidget() override;
39
41 void setSkin(const QString& skin);
42
46 static int selectedParts() noexcept;
47
51 static QJsonObject savedState() noexcept;
52
54 static void saveState() noexcept;
55
56 void skinChanged(const QString& arg_1) W_SIGNAL(skinChanged, arg_1);
57
58private:
59 QWidget* makeSkinRow();
60 QWidget* makeColorEditor();
61 QWidget* makeFontEditor();
62
64 void reloadFromSkin();
66 void loadFontRole();
68 void applyFontRole();
69 void refreshFontPreview();
70
73 void scheduleSave();
74
75 QComboBox* m_skin{};
76 QCheckBox* m_applyColours{};
77 QCheckBox* m_applyFonts{};
78
79 QListWidget* m_colorList{};
80 color_widgets::ColorWheel* m_wheel{};
81 QLineEdit* m_hex{};
82
83 QListWidget* m_fontList{};
84 QComboBox* m_fontFamily{};
85 QComboBox* m_fontStyle{};
86 QSpinBox* m_fontSize{};
87 QCheckBox* m_fontAntialias{};
88 QComboBox* m_fontHinting{};
89 QPlainTextEdit* m_fontPreview{};
90 QLabel* m_fontHint{};
91
93 bool m_loading{false};
96 bool m_applying{false};
97
98 QTimer* m_saveTimer{};
99};
100}
101}
The skin editor, inlined as a settings sub-tab.
Definition SkinEditorWidget.hpp:34
Main plug-in of score.
Definition ConnectionsList.hpp:22