CuteHMI - Graphical User Interface (CuteHMI.GUI.0)
ColorSet.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_GUI_0_INCLUDE_CUTEHMI_GUI_COLORSET_HPP
2 #define H_EXTENSIONS_CUTEHMI_GUI_0_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  ColorSet(QObject * parent = nullptr);
74 
79  QColor base() const;
80 
85  void setBase(QColor base);
86 
91  QColor fill() const;
92 
97  void setFill(QColor fill);
98 
103  QColor tint() const;
104 
109  void setTint(QColor tint);
110 
115  QColor shade() const;
116 
121  void setShade(QColor shade);
122 
127  QColor background() const;
128 
133  void setBackground(QColor background);
134 
139  QColor foreground() const;
140 
145  void setForeground(QColor foreground);
146 
151  QColor stroke() const;
152 
157  void setStroke(QColor stroke);
158 
159  signals:
163  void baseChanged();
164 
168  void fillChanged();
169 
173  void tintChanged();
174 
178  void shadeChanged();
179 
183  void backgroundChanged();
184 
188  void foregroundChanged();
189 
193  void strokeChanged();
194 
195  private:
196  struct Members
197  {
198  QColor base;
199  QColor fill;
200  QColor tint;
201  QColor shade;
202  QColor background;
203  QColor foreground;
204  QColor stroke;
205  };
206 
207  MPtr<Members> m;
208 };
209 
210 }
211 }
212 
213 #endif
214 
215 //(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
216 //(c)C: This file is a part of CuteHMI.
217 //(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.
218 //(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.
219 //(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/>.
QColor
cutehmi::MPtr< Members >
QObject
cutehmi
cutehmi::gui::ColorSet
Color set.
Definition: ColorSet.hpp:15