MauiKit Terminal

customcolorscheme.h
1#pragma once
2#include <QObject>
3#include <QQmlParserStatus>
4#include <QColor>
5
6class QTimer;
7
8namespace Konsole
9{
10class ColorScheme;
11}
12
13class CustomColorScheme : public QObject, public QQmlParserStatus
14{
16
18 Q_PROPERTY(QString name READ name CONSTANT FINAL)
19 Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
20 Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
21 Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor NOTIFY foregroundColorChanged)
22 Q_PROPERTY(QColor color2 READ color2 WRITE setColor2 NOTIFY color2Changed)
23 Q_PROPERTY(QColor color3 READ color3 WRITE setColor3 NOTIFY color3Changed)
24 Q_PROPERTY(QColor color4 READ color4 WRITE setColor4 NOTIFY color4Changed)
25 Q_PROPERTY(QColor color5 READ color5 WRITE setColor5 NOTIFY color5Changed)
26 Q_PROPERTY(QColor color6 READ color6 WRITE setColor6 NOTIFY color6Changed)
27 Q_PROPERTY(QColor color7 READ color7 WRITE setColor7 NOTIFY color7Changed)
28 Q_PROPERTY(QColor color8 READ color8 WRITE setColor8 NOTIFY color8Changed)
29 Q_PROPERTY(QColor color9 READ color9 WRITE setColor9 NOTIFY color9Changed)
30
31
32public:
33 explicit CustomColorScheme(QObject *parent = nullptr);
34
35 void classBegin() override final;
36 void componentComplete() override final;
37
38 QString name() const;
39
40 QString description() const;
41
42 QColor backgroundColor() const;
43
44 QColor foregroundColor() const;
45
46 QColor color2() const;
47
48 QColor color3() const;
49
50 QColor color4() const;
51
52 QColor color5() const;
53
54 QColor color6() const;
55
56 QColor color7() const;
57
58 QColor color8() const;
59
60 QColor color9() const;
61
62 const Konsole::ColorScheme * getScheme();
63
64public Q_SLOTS:
65 void setDescription(QString description);
66
67 void setBackgroundColor(QColor backgroundColor);
68
69 void setForegroundColor(QColor foregroundColor);
70
71 void setColor2(QColor color2);
72
73 void setColor3(QColor color3);
74
75 void setColor4(QColor color4);
76
77 void setColor5(QColor color5);
78
79 void setColor6(QColor color6);
80
81 void setColor7(QColor color7);
82
83 void setColor8(QColor color8);
84
85 void setColor9(QColor color9);
86
87private:
88 Konsole::ColorScheme* m_scheme;
89 QTimer *m_timer;
90 QString m_name = "Adaptive";
91
92 QString m_description;
93
94 QColor m_backgroundColor;
95
96 QColor m_foregroundColor;
97
98 void save();
99
100 QColor m_color2;
101
102 QColor m_color3;
103
104 QColor m_color4;
105
106 QColor m_color5;
107
108 QColor m_color6;
109
110 QColor m_color7;
111
112 QColor m_color8;
113
114 QColor m_color9;
115
117 void descriptionChanged(QString description);
118 void backgroundColorChanged(QColor backgroundColor);
119 void foregroundColorChanged(QColor foregroundColor);
120 void color2Changed(QColor color2);
121 void color3Changed(QColor color3);
122 void color4Changed(QColor color4);
123 void color5Changed(QColor color5);
124 void color6Changed(QColor color6);
125 void color7Changed(QColor color7);
126 void color8Changed(QColor color8);
127 void color9Changed(QColor color9);
128};
129
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.