CuteHMI - Graphical User Interface (CuteHMI.GUI.1)
ColorSet.hpp
1#ifndef H_EXTENSIONS_CUTEHMI_GUI_1_INCLUDE_CUTEHMI_GUI_COLORSET_HPP
2#define H_EXTENSIONS_CUTEHMI_GUI_1_INCLUDE_CUTEHMI_GUI_COLORSET_HPP
3
4#include "internal/common.hpp"
5
6#include <QObject>
7#include <QColor>
8#include <QQmlEngine>
9
10namespace cutehmi {
11namespace gui {
12
16class CUTEHMI_GUI_API ColorSet:
17 public QObject
18{
19 Q_OBJECT
20 QML_NAMED_ELEMENT(ColorSet)
21
22 public:
27 Q_PROPERTY(QColor base READ base WRITE setBase NOTIFY baseChanged)
28
29
34 Q_PROPERTY(QColor fill READ fill WRITE setFill NOTIFY fillChanged)
35
36
39 Q_PROPERTY(QColor tint READ tint WRITE setTint NOTIFY tintChanged)
40
41
44 Q_PROPERTY(QColor shade READ shade WRITE setShade NOTIFY shadeChanged)
45
46
53 Q_PROPERTY(QColor background READ background WRITE setBackground NOTIFY backgroundChanged)
54
55
62 Q_PROPERTY(QColor foreground READ foreground WRITE setForeground NOTIFY foregroundChanged)
63
64
69 Q_PROPERTY(QColor stroke READ stroke WRITE setStroke NOTIFY strokeChanged)
70
71
75 Q_PROPERTY(QColor blank READ blank WRITE setBlank NOTIFY blankChanged)
76
77
81 ColorSet(QObject * parent = nullptr);
82
87 QColor base() const;
88
93 void setBase(QColor base);
94
99 QColor fill() const;
100
105 void setFill(QColor fill);
106
111 QColor tint() const;
112
117 void setTint(QColor tint);
118
123 QColor shade() const;
124
129 void setShade(QColor shade);
130
135 QColor background() const;
136
141 void setBackground(QColor background);
142
147 QColor foreground() const;
148
153 void setForeground(QColor foreground);
154
159 QColor stroke() const;
160
165 void setStroke(QColor stroke);
166
171 QColor blank() const;
172
177 void setBlank(QColor blank);
178
179 signals:
184
189
194
199
204
209
214
219
220 private:
221 struct Members
222 {
223 QColor base;
224 QColor fill;
225 QColor tint;
226 QColor shade;
227 QColor background;
228 QColor foreground;
229 QColor stroke;
230 QColor blank;
231 };
232
234};
235
236}
237}
238
239#endif
240
241//(c)C: Copyright © 2020-2022, Michał Policht <michal@policht.pl>. All rights reserved.
242//(c)C: SPDX-License-Identifier: LGPL-3.0-or-later OR MIT
243//(c)C: This file is a part of CuteHMI.
244//(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
245//(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
246//(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
247//(c)C: Additionally, this file is licensed under terms of MIT license as expressed below.
248//(c)C: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
249//(c)C: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
250//(c)C: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Color set.
Definition: ColorSet.hpp:18
void tintChanged()
This signal is emitted whenever tint color has changed.
void strokeChanged()
This signal is emitted whenever stroke color has changed.
void foregroundChanged()
This signal is emitted whenever foreground color has changed.
void blankChanged()
This signal is emitted whenever blank color has changed.
void shadeChanged()
This signal is emitted whenever shade color has changed.
void baseChanged()
This signal is emitted whenever base color has changed.
void backgroundChanged()
This signal is emitted whenever background color has changed.
void fillChanged()
This signal is emitted whenever fill color has changed.