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 
9 namespace cutehmi {
10 namespace gui {
11 
15 class CUTEHMI_GUI_API ColorSet:
16  public QObject
17 {
18  Q_OBJECT
19 
20  public:
25  Q_PROPERTY(QColor base READ base WRITE setBase NOTIFY baseChanged)
26 
27 
32  Q_PROPERTY(QColor fill READ fill WRITE setFill NOTIFY fillChanged)
33 
37  Q_PROPERTY(QColor tint READ tint WRITE setTint NOTIFY tintChanged)
38 
42  Q_PROPERTY(QColor shade READ shade WRITE setShade NOTIFY shadeChanged)
43 
51  Q_PROPERTY(QColor background READ background WRITE setBackground NOTIFY backgroundChanged)
52 
60  Q_PROPERTY(QColor foreground READ foreground WRITE setForeground NOTIFY foregroundChanged)
61 
67  Q_PROPERTY(QColor stroke READ stroke WRITE setStroke NOTIFY strokeChanged)
68 
73  Q_PROPERTY(QColor blank READ blank WRITE setBlank NOTIFY blankChanged)
74 
79  ColorSet(QObject * parent = nullptr);
80 
85  QColor base() const;
86 
91  void setBase(QColor base);
92 
97  QColor fill() const;
98 
103  void setFill(QColor fill);
104 
109  QColor tint() const;
110 
115  void setTint(QColor tint);
116 
121  QColor shade() const;
122 
127  void setShade(QColor shade);
128 
133  QColor background() const;
134 
139  void setBackground(QColor background);
140 
145  QColor foreground() const;
146 
151  void setForeground(QColor foreground);
152 
157  QColor stroke() const;
158 
163  void setStroke(QColor stroke);
164 
169  QColor blank() const;
170 
175  void setBlank(QColor blank);
176 
177  signals:
181  void baseChanged();
182 
186  void fillChanged();
187 
191  void tintChanged();
192 
196  void shadeChanged();
197 
201  void backgroundChanged();
202 
206  void foregroundChanged();
207 
211  void strokeChanged();
212 
216  void blankChanged();
217 
218  private:
219  struct Members
220  {
221  QColor base;
222  QColor fill;
223  QColor tint;
224  QColor shade;
225  QColor background;
226  QColor foreground;
227  QColor stroke;
228  QColor blank;
229  };
230 
231  MPtr<Members> m;
232 };
233 
234 }
235 }
236 
237 #endif
238 
239 //(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
240 //(c)C: SPDX-License-Identifier: LGPL-3.0-or-later OR MIT
241 //(c)C: This file is a part of CuteHMI.
242 //(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.
243 //(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.
244 //(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/>.
245 //(c)C: Additionally, this file is licensed under terms of MIT license as expressed below.
246 //(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:
247 //(c)C: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
248 //(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.
QColor
cutehmi::MPtr< Members >
QObject
cutehmi
cutehmi::gui::ColorSet
Color set.
Definition: ColorSet.hpp:15