1 /****************************************************************************
2 **
3 ** Copyright (C) 2017 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
5 **
6 ** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL3$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or later as published by the Free
28 ** Software Foundation and appearing in the file LICENSE.GPL included in
29 ** the packaging of this file. Please review the following information to
30 ** ensure the GNU General Public License version 2.0 requirements will be
31 ** met: http://www.gnu.org/licenses/gpl-2.0.html.
32 **
33 ** $QT_END_LICENSE$
34 **
35 ****************************************************************************/
36 
37 #include "qquickpalette_p.h"
38 
39 QT_BEGIN_NAMESPACE
40 
alternateBase() const41 QColor QQuickPalette::alternateBase() const
42 {
43     return v.color(QPalette::AlternateBase);
44 }
45 
setAlternateBase(const QColor & color)46 void QQuickPalette::setAlternateBase(const QColor &color)
47 {
48     v.setColor(QPalette::All, QPalette::AlternateBase, color);
49 }
50 
resetAlternateBase()51 void QQuickPalette::resetAlternateBase()
52 {
53     v.resolve(v.resolve() & ~(1 << QPalette::AlternateBase));
54 }
55 
base() const56 QColor QQuickPalette::base() const
57 {
58     return v.color(QPalette::Base);
59 }
60 
setBase(const QColor & color)61 void QQuickPalette::setBase(const QColor &color)
62 {
63     v.setColor(QPalette::All, QPalette::Base, color);
64 }
65 
resetBase()66 void QQuickPalette::resetBase()
67 {
68     v.resolve(v.resolve() & ~(1 << QPalette::Base));
69 }
70 
brightText() const71 QColor QQuickPalette::brightText() const
72 {
73     return v.color(QPalette::BrightText);
74 }
75 
setBrightText(const QColor & color)76 void QQuickPalette::setBrightText(const QColor &color)
77 {
78     v.setColor(QPalette::All, QPalette::BrightText, color);
79 }
80 
resetBrightText()81 void QQuickPalette::resetBrightText()
82 {
83     v.resolve(v.resolve() & ~(1 << QPalette::BrightText));
84 }
85 
button() const86 QColor QQuickPalette::button() const
87 {
88     return v.color(QPalette::Button);
89 }
90 
setButton(const QColor & color)91 void QQuickPalette::setButton(const QColor &color)
92 {
93     v.setColor(QPalette::All, QPalette::Button, color);
94 }
95 
resetButton()96 void QQuickPalette::resetButton()
97 {
98     v.resolve(v.resolve() & ~(1 << QPalette::Button));
99 }
100 
buttonText() const101 QColor QQuickPalette::buttonText() const
102 {
103     return v.color(QPalette::ButtonText);
104 }
105 
setButtonText(const QColor & color)106 void QQuickPalette::setButtonText(const QColor &color)
107 {
108     v.setColor(QPalette::All, QPalette::ButtonText, color);
109 }
110 
resetButtonText()111 void QQuickPalette::resetButtonText()
112 {
113     v.resolve(v.resolve() & ~(1 << QPalette::ButtonText));
114 }
115 
dark() const116 QColor QQuickPalette::dark() const
117 {
118     return v.color(QPalette::Dark);
119 }
120 
setDark(const QColor & color)121 void QQuickPalette::setDark(const QColor &color)
122 {
123     v.setColor(QPalette::All, QPalette::Dark, color);
124 }
125 
resetDark()126 void QQuickPalette::resetDark()
127 {
128     v.resolve(v.resolve() & ~(1 << QPalette::Dark));
129 }
130 
highlight() const131 QColor QQuickPalette::highlight() const
132 {
133     return v.color(QPalette::Highlight);
134 }
135 
setHighlight(const QColor & color)136 void QQuickPalette::setHighlight(const QColor &color)
137 {
138     v.setColor(QPalette::All, QPalette::Highlight, color);
139 }
140 
resetHighlight()141 void QQuickPalette::resetHighlight()
142 {
143     v.resolve(v.resolve() & ~(1 << QPalette::Highlight));
144 }
145 
highlightedText() const146 QColor QQuickPalette::highlightedText() const
147 {
148     return v.color(QPalette::HighlightedText);
149 }
150 
setHighlightedText(const QColor & color)151 void QQuickPalette::setHighlightedText(const QColor &color)
152 {
153     v.setColor(QPalette::All, QPalette::HighlightedText, color);
154 }
155 
resetHighlightedText()156 void QQuickPalette::resetHighlightedText()
157 {
158     v.resolve(v.resolve() & ~(1 << QPalette::HighlightedText));
159 }
160 
light() const161 QColor QQuickPalette::light() const
162 {
163     return v.color(QPalette::Light);
164 }
165 
setLight(const QColor & color)166 void QQuickPalette::setLight(const QColor &color)
167 {
168     v.setColor(QPalette::All, QPalette::Light, color);
169 }
170 
resetLight()171 void QQuickPalette::resetLight()
172 {
173     v.resolve(v.resolve() & ~(1 << QPalette::Light));
174 }
175 
link() const176 QColor QQuickPalette::link() const
177 {
178     return v.color(QPalette::Link);
179 }
180 
setLink(const QColor & color)181 void QQuickPalette::setLink(const QColor &color)
182 {
183     v.setColor(QPalette::All, QPalette::Link, color);
184 }
185 
resetLink()186 void QQuickPalette::resetLink()
187 {
188     v.resolve(v.resolve() & ~(1 << QPalette::Link));
189 }
190 
linkVisited() const191 QColor QQuickPalette::linkVisited() const
192 {
193     return v.color(QPalette::LinkVisited);
194 }
195 
setLinkVisited(const QColor & color)196 void QQuickPalette::setLinkVisited(const QColor &color)
197 {
198     v.setColor(QPalette::All, QPalette::LinkVisited, color);
199 }
200 
resetLinkVisited()201 void QQuickPalette::resetLinkVisited()
202 {
203     v.resolve(v.resolve() & ~(1 << QPalette::LinkVisited));
204 }
205 
mid() const206 QColor QQuickPalette::mid() const
207 {
208     return v.color(QPalette::Mid);
209 }
210 
setMid(const QColor & color)211 void QQuickPalette::setMid(const QColor &color)
212 {
213     v.setColor(QPalette::All, QPalette::Mid, color);
214 }
215 
resetMid()216 void QQuickPalette::resetMid()
217 {
218     v.resolve(v.resolve() & ~(1 << QPalette::Mid));
219 }
220 
midlight() const221 QColor QQuickPalette::midlight() const
222 {
223     return v.color(QPalette::Midlight);
224 }
225 
setMidlight(const QColor & color)226 void QQuickPalette::setMidlight(const QColor &color)
227 {
228     v.setColor(QPalette::All, QPalette::Midlight, color);
229 }
230 
resetMidlight()231 void QQuickPalette::resetMidlight()
232 {
233     v.resolve(v.resolve() & ~(1 << QPalette::Midlight));
234 }
235 
shadow() const236 QColor QQuickPalette::shadow() const
237 {
238     return v.color(QPalette::Shadow);
239 }
240 
setShadow(const QColor & color)241 void QQuickPalette::setShadow(const QColor &color)
242 {
243     v.setColor(QPalette::All, QPalette::Shadow, color);
244 }
245 
resetShadow()246 void QQuickPalette::resetShadow()
247 {
248     v.resolve(v.resolve() & ~(1 << QPalette::Shadow));
249 }
250 
text() const251 QColor QQuickPalette::text() const
252 {
253     return v.color(QPalette::Text);
254 }
255 
setText(const QColor & color)256 void QQuickPalette::setText(const QColor &color)
257 {
258     v.setColor(QPalette::All, QPalette::Text, color);
259 }
260 
resetText()261 void QQuickPalette::resetText()
262 {
263     v.resolve(v.resolve() & ~(1 << QPalette::Text));
264 }
265 
toolTipBase() const266 QColor QQuickPalette::toolTipBase() const
267 {
268     return v.color(QPalette::ToolTipBase);
269 }
270 
setToolTipBase(const QColor & color)271 void QQuickPalette::setToolTipBase(const QColor &color)
272 {
273     v.setColor(QPalette::All, QPalette::ToolTipBase, color);
274 }
275 
resetToolTipBase()276 void QQuickPalette::resetToolTipBase()
277 {
278     v.resolve(v.resolve() & ~(1 << QPalette::ToolTipBase));
279 }
280 
toolTipText() const281 QColor QQuickPalette::toolTipText() const
282 {
283     return v.color(QPalette::ToolTipText);
284 }
285 
setToolTipText(const QColor & color)286 void QQuickPalette::setToolTipText(const QColor &color)
287 {
288     v.setColor(QPalette::All, QPalette::ToolTipText, color);
289 }
290 
resetToolTipText()291 void QQuickPalette::resetToolTipText()
292 {
293     v.resolve(v.resolve() & ~(1 << QPalette::ToolTipText));
294 }
295 
window() const296 QColor QQuickPalette::window() const
297 {
298     return v.color(QPalette::Window);
299 }
300 
setWindow(const QColor & color)301 void QQuickPalette::setWindow(const QColor &color)
302 {
303     v.setColor(QPalette::All, QPalette::Window, color);
304 }
305 
resetWindow()306 void QQuickPalette::resetWindow()
307 {
308     v.resolve(v.resolve() & ~(1 << QPalette::Window));
309 }
310 
windowText() const311 QColor QQuickPalette::windowText() const
312 {
313     return v.color(QPalette::WindowText);
314 }
315 
setWindowText(const QColor & color)316 void QQuickPalette::setWindowText(const QColor &color)
317 {
318     v.setColor(QPalette::All, QPalette::WindowText, color);
319 }
320 
resetWindowText()321 void QQuickPalette::resetWindowText()
322 {
323     v.resolve(v.resolve() & ~(1 << QPalette::WindowText));
324 }
325 
326 QT_END_NAMESPACE
327