Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
banner_shader_config.h
Go to the documentation of this file.
1#ifndef BANNER_SHADER_CONFIG_H
2#define BANNER_SHADER_CONFIG_H
3
4#include <QColor>
5#include <QObject>
6
22class BannerShaderConfig : public QObject
23{
24 Q_OBJECT
25 Q_PROPERTY(qreal time READ time WRITE setTime NOTIFY timeChanged)
26 Q_PROPERTY(qreal aspect READ aspect WRITE setAspect NOTIFY aspectChanged)
27
28 Q_PROPERTY(qreal modeA READ modeA WRITE setModeA NOTIFY modeAChanged)
29 Q_PROPERTY(qreal speedA READ speedA WRITE setSpeedA NOTIFY speedAChanged)
30 Q_PROPERTY(qreal seedA READ seedA WRITE setSeedA NOTIFY seedAChanged)
31
32 Q_PROPERTY(qreal modeB READ modeB WRITE setModeB NOTIFY modeBChanged)
33 Q_PROPERTY(qreal speedB READ speedB WRITE setSpeedB NOTIFY speedBChanged)
34 Q_PROPERTY(qreal seedB READ seedB WRITE setSeedB NOTIFY seedBChanged)
35
36 Q_PROPERTY(bool frontIsA READ frontIsA WRITE setFrontIsA NOTIFY frontIsAChanged)
37
38 Q_PROPERTY(QColor colorA READ colorA WRITE setColorA NOTIFY colorAChanged)
39 Q_PROPERTY(QColor colorB READ colorB WRITE setColorB NOTIFY colorBChanged)
40 Q_PROPERTY(QColor accent READ accent WRITE setAccent NOTIFY accentChanged)
41
42 Q_PROPERTY(bool logoVisible READ logoVisible WRITE setLogoVisible NOTIFY logoVisibleChanged)
43 Q_PROPERTY(qreal logoGlow READ logoGlow WRITE setLogoGlow NOTIFY logoGlowChanged)
44
45public:
46 explicit BannerShaderConfig(QObject *parent = nullptr) : QObject(parent)
47 {
48 }
49
50 qreal time() const
51 {
52 return m_time;
53 }
54 void setTime(qreal v)
55 {
56 if (v != m_time) {
57 m_time = v;
58 emit timeChanged();
59 }
60 }
61
62 qreal aspect() const
63 {
64 return m_aspect;
65 }
66 void setAspect(qreal v)
67 {
68 if (v != m_aspect) {
69 m_aspect = v;
70 emit aspectChanged();
71 }
72 }
73
74 qreal modeA() const
75 {
76 return m_modeA;
77 }
78 void setModeA(qreal v)
79 {
80 if (v != m_modeA) {
81 m_modeA = v;
82 emit modeAChanged();
83 }
84 }
85 qreal speedA() const
86 {
87 return m_speedA;
88 }
89 void setSpeedA(qreal v)
90 {
91 if (v != m_speedA) {
92 m_speedA = v;
93 emit speedAChanged();
94 }
95 }
96 qreal seedA() const
97 {
98 return m_seedA;
99 }
100 void setSeedA(qreal v)
101 {
102 if (v != m_seedA) {
103 m_seedA = v;
104 emit seedAChanged();
105 }
106 }
107
108 qreal modeB() const
109 {
110 return m_modeB;
111 }
112 void setModeB(qreal v)
113 {
114 if (v != m_modeB) {
115 m_modeB = v;
116 emit modeBChanged();
117 }
118 }
119 qreal speedB() const
120 {
121 return m_speedB;
122 }
123 void setSpeedB(qreal v)
124 {
125 if (v != m_speedB) {
126 m_speedB = v;
127 emit speedBChanged();
128 }
129 }
130 qreal seedB() const
131 {
132 return m_seedB;
133 }
134 void setSeedB(qreal v)
135 {
136 if (v != m_seedB) {
137 m_seedB = v;
138 emit seedBChanged();
139 }
140 }
141
142 bool frontIsA() const
143 {
144 return m_frontIsA;
145 }
146 void setFrontIsA(bool v)
147 {
148 if (v != m_frontIsA) {
149 m_frontIsA = v;
150 emit frontIsAChanged();
151 }
152 }
153
154 QColor colorA() const
155 {
156 return m_colorA;
157 }
158 void setColorA(const QColor &c)
159 {
160 if (c != m_colorA) {
161 m_colorA = c;
162 emit colorAChanged();
163 }
164 }
165 QColor colorB() const
166 {
167 return m_colorB;
168 }
169 void setColorB(const QColor &c)
170 {
171 if (c != m_colorB) {
172 m_colorB = c;
173 emit colorBChanged();
174 }
175 }
176 QColor accent() const
177 {
178 return m_accent;
179 }
180 void setAccent(const QColor &c)
181 {
182 if (c != m_accent) {
183 m_accent = c;
184 emit accentChanged();
185 }
186 }
187
188 bool logoVisible() const
189 {
190 return m_logoVisible;
191 }
192 void setLogoVisible(bool v)
193 {
194 if (v != m_logoVisible) {
195 m_logoVisible = v;
196 emit logoVisibleChanged();
197 }
198 }
199
200 qreal logoGlow() const
201 {
202 return m_logoGlow;
203 }
204 void setLogoGlow(qreal v)
205 {
206 if (v != m_logoGlow) {
207 m_logoGlow = v;
208 emit logoGlowChanged();
209 }
210 }
211
212signals:
227
228private:
229 qreal m_time = 0.0;
230 qreal m_aspect = 16.0 / 9.0;
231
232 qreal m_modeA = 0.0;
233 qreal m_speedA = 1.0;
234 qreal m_seedA = 0.0;
235
236 qreal m_modeB = 0.0;
237 qreal m_speedB = 1.0;
238 qreal m_seedB = 0.0;
239
240 bool m_frontIsA = true;
241
242 QColor m_colorA{0x1A, 0x1A, 0x20};
243 QColor m_colorB{0x0E, 0x0E, 0x12};
244 QColor m_accent{0x8B, 0xDD, 0x6B};
245
246 bool m_logoVisible = false;
247 qreal m_logoGlow = 1.0;
248};
249
250#endif // BANNER_SHADER_CONFIG_H
QColor accent() const
Definition banner_shader_config.h:176
void setFrontIsA(bool v)
Definition banner_shader_config.h:146
QColor colorA() const
Definition banner_shader_config.h:154
qreal m_seedA
Definition banner_shader_config.h:234
QColor colorB() const
Definition banner_shader_config.h:165
qreal logoGlow
Definition banner_shader_config.h:43
bool m_logoVisible
Definition banner_shader_config.h:246
qreal speedB
Definition banner_shader_config.h:33
qreal m_modeA
Definition banner_shader_config.h:232
qreal modeA
Definition banner_shader_config.h:28
qreal speedB() const
Definition banner_shader_config.h:119
qreal speedA() const
Definition banner_shader_config.h:85
qreal time
Definition banner_shader_config.h:25
QColor colorA
Definition banner_shader_config.h:38
void setAspect(qreal v)
Definition banner_shader_config.h:66
qreal time() const
Definition banner_shader_config.h:50
QColor m_colorB
Definition banner_shader_config.h:243
bool logoVisible() const
Definition banner_shader_config.h:188
void setModeB(qreal v)
Definition banner_shader_config.h:112
qreal m_time
Definition banner_shader_config.h:229
void setTime(qreal v)
Definition banner_shader_config.h:54
void setColorA(const QColor &c)
Definition banner_shader_config.h:158
qreal m_modeB
Definition banner_shader_config.h:236
qreal modeA() const
Definition banner_shader_config.h:74
void setModeA(qreal v)
Definition banner_shader_config.h:78
qreal seedB() const
Definition banner_shader_config.h:130
qreal modeB() const
Definition banner_shader_config.h:108
bool frontIsA
Definition banner_shader_config.h:36
qreal m_logoGlow
Definition banner_shader_config.h:247
qreal modeB
Definition banner_shader_config.h:32
void setSeedA(qreal v)
Definition banner_shader_config.h:100
qreal seedA() const
Definition banner_shader_config.h:96
qreal logoGlow() const
Definition banner_shader_config.h:200
QColor m_accent
Definition banner_shader_config.h:244
qreal aspect() const
Definition banner_shader_config.h:62
bool m_frontIsA
Definition banner_shader_config.h:240
bool frontIsA() const
Definition banner_shader_config.h:142
qreal m_speedB
Definition banner_shader_config.h:237
qreal speedA
Definition banner_shader_config.h:29
void setLogoVisible(bool v)
Definition banner_shader_config.h:192
qreal aspect
Definition banner_shader_config.h:26
QColor m_colorA
Definition banner_shader_config.h:242
QColor colorB
Definition banner_shader_config.h:39
QColor accent
Definition banner_shader_config.h:40
void setLogoGlow(qreal v)
Definition banner_shader_config.h:204
qreal seedA
Definition banner_shader_config.h:30
void setColorB(const QColor &c)
Definition banner_shader_config.h:169
qreal m_aspect
Definition banner_shader_config.h:230
void setSeedB(qreal v)
Definition banner_shader_config.h:134
void setSpeedA(qreal v)
Definition banner_shader_config.h:89
qreal m_speedA
Definition banner_shader_config.h:233
qreal m_seedB
Definition banner_shader_config.h:238
qreal seedB
Definition banner_shader_config.h:34
bool logoVisible
Definition banner_shader_config.h:42
void setAccent(const QColor &c)
Definition banner_shader_config.h:180
void setSpeedB(qreal v)
Definition banner_shader_config.h:123
BannerShaderConfig(QObject *parent=nullptr)
Definition banner_shader_config.h:46