styles/qstylesheetstyle_default.cpp

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
1/**************************************************************************** -
2** -
3** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -
4** Contact: http://www.qt-project.org/legal -
5** -
6** This file is part of the QtGui module of the Qt Toolkit. -
7** -
8** $QT_BEGIN_LICENSE:LGPL$ -
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 Digia. For licensing terms and -
14** conditions see http://qt.digia.com/licensing. For further information -
15** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software -
20** Foundation and appearing in the file LICENSE.LGPL included in the -
21** packaging of this file. Please review the following information to -
22** ensure the GNU Lesser General Public License version 2.1 requirements -
23** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -
24** -
25** In addition, as a special exception, Digia gives you certain additional -
26** rights. These rights are described in the Digia Qt LGPL Exception -
27** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -
28** -
29** GNU General Public License Usage -
30** Alternatively, this file may be used under the terms of the GNU -
31** General Public License version 3.0 as published by the Free Software -
32** Foundation and appearing in the file LICENSE.GPL included in the -
33** packaging of this file. Please review the following information to -
34** ensure the GNU General Public License version 3.0 requirements will be -
35** met: http://www.gnu.org/copyleft/gpl.html. -
36** -
37** -
38** $QT_END_LICENSE$ -
39** -
40****************************************************************************/ -
41 -
42/* This is the default Qt style sheet. -
43 -
44 IMPORTANT: This style sheet is primarily meant for defining feature -
45 capablities of styles. Do NOT add default styling rules here. When in -
46 doubt ask the stylesheet maintainer. -
47 -
48 The stylesheet in here used to be in a CSS file, but was moved here to -
49 avoid parsing overhead. -
50*/ -
51 -
52#include "private/qcssparser_p.h" -
53#include "qstylesheetstyle_p.h" -
54 -
55#ifndef QT_NO_STYLE_STYLESHEET -
56 -
57QT_BEGIN_NAMESPACE -
58 -
59using namespace QCss; -
60 -
61// This is the class name of the selector. -
62// Use an empty string where you would use '*' in CSS. -
63// Ex. QHeaderView -
64 -
65#define SET_ELEMENT_NAME(x) \ -
66 bSelector.elementName = (x) -
67 -
68// This acts as both pseudo state and sub control. The first parameter is the -
69// string name, and the second is the PseudoClass_* constant. -
70// The sub control specifier is always the first, and has the type -
71// PseudoClass_Unknown. -
72// If there is no PseudoClass_Unknown as the first pseudo, it is assumed to be -
73// a pseudo state. -
74// Ex. QComboBox::drop-down:enabled -
75// ^ ^ -
76 -
77#define ADD_PSEUDO(x, y) \ -
78 pseudo.type = (y); \ -
79 pseudo.name = (x); \ -
80 bSelector.pseudos << pseudo -
81 -
82// This is attributes. The third parameter is AttributeSelector::* -
83// Ex. QComboBox[style="QWindowsXPStyle"] -
84// ^ ^ -
85 -
86#define ADD_ATTRIBUTE_SELECTOR(x, y, z) \ -
87 attr.name = (x); \ -
88 attr.value = (y); \ -
89 attr.valueMatchCriterium = (z); \ -
90 bSelector.attributeSelectors << attr -
91 -
92// Adds the current basic selector to the rule. -
93// Several basic selectors behave as AND (space in CSS). -
94 -
95#define ADD_BASIC_SELECTOR \ -
96 selector.basicSelectors << bSelector; \ -
97 bSelector.ids.clear(); \ -
98 bSelector.pseudos.clear(); \ -
99 bSelector.attributeSelectors.clear() -
100 -
101// Adds the current selector to the rule. -
102// Several selectors behave as OR (comma in CSS). -
103 -
104#define ADD_SELECTOR \ -
105 styleRule.selectors << selector; \ -
106 selector.basicSelectors.clear() -
107 -
108// Sets the name of a property. -
109// Ex. background: red; -
110// ^ -
111 -
112#define SET_PROPERTY(x, y) \ -
113 decl.d->property = (x); \ -
114 decl.d->propertyId = (y) -
115 -
116// Adds a value to the current property. -
117// The first parameter should be Value::KnownIdentifier if the value can be -
118// found among the Value_* constants, in which case the second should be that -
119// constant. Otherwise the first parameter is Value::Identifier and the second -
120// is a string. -
121// Adding more values is the same as seperating by spaces in CSS. -
122// Ex. border: 2px solid black; -
123// ^ ^ ^ -
124 -
125#define ADD_VALUE(x, y) \ -
126 value.type = (x); \ -
127 value.variant = (y); \ -
128 decl.d->values << value -
129 -
130// Adds the current declaration to the rule. -
131// Ex. border: 2px solid black; -
132// \----------------------/ -
133 -
134#define ADD_DECLARATION \ -
135 styleRule.declarations << decl; \ -
136 decl.d.detach(); \ -
137 decl.d->values.clear() -
138 -
139// Adds the rule to the stylesheet. -
140// Use at the end of every CSS block. -
141 -
142#define ADD_STYLE_RULE \ -
143 sheet.styleRules << styleRule; \ -
144 styleRule.selectors.clear(); \ -
145 styleRule.declarations.clear() -
146 -
147StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const -
148{ -
149 StyleSheet sheet;
executed (the execution status of this line is deduced): StyleSheet sheet;
-
150 StyleRule styleRule;
executed (the execution status of this line is deduced): StyleRule styleRule;
-
151 BasicSelector bSelector;
executed (the execution status of this line is deduced): BasicSelector bSelector;
-
152 Selector selector;
executed (the execution status of this line is deduced): Selector selector;
-
153 Declaration decl;
executed (the execution status of this line is deduced): Declaration decl;
-
154 QCss::Value value;
executed (the execution status of this line is deduced): QCss::Value value;
-
155 Pseudo pseudo;
executed (the execution status of this line is deduced): Pseudo pseudo;
-
156 AttributeSelector attr;
executed (the execution status of this line is deduced): AttributeSelector attr;
-
157 -
158 // pixmap based style doesn't support any features -
159 bool styleIsPixmapBased = baseStyle()->inherits("QMacStyle")
partially evaluated: baseStyle()->inherits("QMacStyle")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
0-401
160 || baseStyle()->inherits("QWindowsXPStyle")
partially evaluated: baseStyle()->inherits("QWindowsXPStyle")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
0-401
161 || baseStyle()->inherits("QGtkStyle");
partially evaluated: baseStyle()->inherits("QGtkStyle")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
0-401
162 -
163 -
164 /*QLineEdit { -
165 -qt-background-role: base; -
166 border: native; -
167 -qt-style-features: background-color; -
168 }*/ -
169 { -
170 SET_ELEMENT_NAME(QLatin1String("QLineEdit"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QLineEdit"));
-
171 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
172 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
173 -
174 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
175 ADD_VALUE(Value::KnownIdentifier, Value_Base);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;
-
176 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
177 -
178 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
179 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
180 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
181 -
182 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
183 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
184 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
185 -
186 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
187 } -
188 -
189 /*QLineEdit:no-frame { -
190 border: none; -
191 }*/ -
192 { -
193 SET_ELEMENT_NAME(QLatin1String("QLineEdit"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QLineEdit"));
-
194 ADD_PSEUDO(QLatin1String("no-frame"), PseudoClass_Frameless);
executed (the execution status of this line is deduced): pseudo.type = (PseudoClass_Frameless); pseudo.name = (QLatin1String("no-frame")); bSelector.pseudos << pseudo;
-
195 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
196 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
197 -
198 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
199 ADD_VALUE(Value::KnownIdentifier, Value_None);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;
-
200 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
201 -
202 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
203 } -
204 -
205 /*QFrame { -
206 border: native; -
207 }*/ -
208 { -
209 SET_ELEMENT_NAME(QLatin1String("QFrame"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QFrame"));
-
210 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
211 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
212 -
213 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
214 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
215 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
216 -
217 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
218 } -
219 -
220 /*QLabel, QToolBox { -
221 background: none; -
222 border-image: none; -
223 }*/ -
224 { -
225 SET_ELEMENT_NAME(QLatin1String("QLabel"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QLabel"));
-
226 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
227 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
228 -
229 SET_ELEMENT_NAME(QLatin1String("QToolBox"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QToolBox"));
-
230 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
231 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
232 -
233 SET_PROPERTY(QLatin1String("background"), Background);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("background")); decl.d->propertyId = (Background);
-
234 ADD_VALUE(Value::KnownIdentifier, Value_None);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;
-
235 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
236 -
237 SET_PROPERTY(QLatin1String("border-image"), BorderImage);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border-image")); decl.d->propertyId = (BorderImage);
-
238 ADD_VALUE(Value::KnownIdentifier, Value_None);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;
-
239 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
240 -
241 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
242 } -
243 -
244 /*QGroupBox { -
245 border: native; -
246 }*/ -
247 { -
248 SET_ELEMENT_NAME(QLatin1String("QGroupBox"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QGroupBox"));
-
249 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
250 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
251 -
252 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
253 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
254 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
255 -
256 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
257 } -
258 -
259 -
260 /*QToolTip { -
261 -qt-background-role: window; -
262 border: native; -
263 }*/ -
264 { -
265 SET_ELEMENT_NAME(QLatin1String("QToolTip"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QToolTip"));
-
266 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
267 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
268 -
269 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
270 ADD_VALUE(Value::KnownIdentifier, Value_Window);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;
-
271 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
272 -
273 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
274 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
275 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
276 -
277 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
278 } -
279 -
280 /*QPushButton, QToolButton { -
281 border-style: native; -
282 -qt-style-features: background-color; //only for not pixmap based styles -
283 }*/ -
284 { -
285 SET_ELEMENT_NAME(QLatin1String("QPushButton"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QPushButton"));
-
286 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
287 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
288 -
289 SET_ELEMENT_NAME(QLatin1String("QToolButton"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QToolButton"));
-
290 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
291 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
292 -
293 SET_PROPERTY(QLatin1String("border-style"), BorderStyles);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border-style")); decl.d->propertyId = (BorderStyles);
-
294 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
295 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
296 -
297 if (!styleIsPixmapBased) {
partially evaluated: !styleIsPixmapBased
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
0-401
298 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
299 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
300 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
301 }
executed: }
Execution Count:401
401
302 -
303 -
304 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
305 } -
306 -
307 -
308 /*QComboBox { -
309 border: native; -
310 -qt-style-features: background-color background-gradient; //only for not pixmap based styles -
311 -qt-background-role: base; -
312 }*/ -
313 -
314 { -
315 SET_ELEMENT_NAME(QLatin1String("QComboBox"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QComboBox"));
-
316 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
317 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
318 -
319 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
320 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
321 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
322 -
323 if (!styleIsPixmapBased) {
partially evaluated: !styleIsPixmapBased
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
0-401
324 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
325 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
326 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-gradient"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-gradient")); decl.d->values << value;
-
327 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
328 }
executed: }
Execution Count:401
401
329 -
330 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
331 ADD_VALUE(Value::KnownIdentifier, Value_Base);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;
-
332 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
333 -
334 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
335 } -
336 -
337 /*QComboBox[style="QPlastiqueStyle"][readOnly="true"], -
338 QComboBox[style="QFusionStyle"][readOnly="true"], -
339 QComboBox[style="QCleanlooksStyle"][readOnly="true"] -
340 { -
341 -qt-background-role: button; -
342 }*/ -
343 if (baseStyle()->inherits("QPlastiqueStyle") || baseStyle()->inherits("QCleanlooksStyle") || baseStyle()->inherits("QFusionStyle"))
partially evaluated: baseStyle()->inherits("QPlastiqueStyle")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
partially evaluated: baseStyle()->inherits("QCleanlooksStyle")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
evaluated: baseStyle()->inherits("QFusionStyle")
TRUEFALSE
yes
Evaluation Count:192
yes
Evaluation Count:209
0-401
344 { -
345 SET_ELEMENT_NAME(QLatin1String("QComboBox"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QComboBox"));
-
346 ADD_ATTRIBUTE_SELECTOR(QLatin1String("readOnly"), QLatin1String("true"), AttributeSelector::MatchEqual);
executed (the execution status of this line is deduced): attr.name = (QLatin1String("readOnly")); attr.value = (QLatin1String("true")); attr.valueMatchCriterium = (AttributeSelector::MatchEqual); bSelector.attributeSelectors << attr;
-
347 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
348 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
349 -
350 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
351 ADD_VALUE(Value::KnownIdentifier, Value_Button);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Button); decl.d->values << value;
-
352 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
353 -
354 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
355 }
executed: }
Execution Count:192
192
356 -
357 /*QAbstractSpinBox { -
358 border: native; -
359 -qt-style-features: background-color; -
360 -qt-background-role: base; -
361 }*/ -
362 { -
363 SET_ELEMENT_NAME(QLatin1String("QAbstractSpinBox"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QAbstractSpinBox"));
-
364 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
365 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
366 -
367 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
368 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
369 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
370 -
371 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
372 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
373 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
374 -
375 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
376 ADD_VALUE(Value::KnownIdentifier, Value_Base);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;
-
377 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
378 -
379 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
380 } -
381 -
382 /*QMenu { -
383 -qt-background-role: window; -
384 }*/ -
385 { -
386 SET_ELEMENT_NAME(QLatin1String("QMenu"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QMenu"));
-
387 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
388 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
389 -
390 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
391 ADD_VALUE(Value::KnownIdentifier, Value_Window);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;
-
392 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
393 -
394 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
395 } -
396 /*QMenu::item { -
397 -qt-style-features: background-color; -
398 }*/ -
399 if (!styleIsPixmapBased) {
partially evaluated: !styleIsPixmapBased
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
0-401
400 SET_ELEMENT_NAME(QLatin1String("QMenu"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QMenu"));
-
401 ADD_PSEUDO(QLatin1String("item"), PseudoClass_Unknown);
executed (the execution status of this line is deduced): pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("item")); bSelector.pseudos << pseudo;
-
402 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
403 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
404 -
405 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
406 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
407 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
408 -
409 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
410 }
executed: }
Execution Count:401
401
411 -
412 /*QHeaderView { -
413 -qt-background-role: window; -
414 }*/ -
415 { -
416 SET_ELEMENT_NAME(QLatin1String("QHeaderView"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QHeaderView"));
-
417 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
418 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
419 -
420 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
421 ADD_VALUE(Value::KnownIdentifier, Value_Window);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;
-
422 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
423 -
424 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
425 } -
426 -
427 /*QTableCornerButton::section, QHeaderView::section { -
428 -qt-background-role: button; -
429 -qt-style-features: background-color; //if style is not pixmap based -
430 border: native; -
431 }*/ -
432 { -
433 SET_ELEMENT_NAME(QLatin1String("QTableCornerButton"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QTableCornerButton"));
-
434 ADD_PSEUDO(QLatin1String("section"), PseudoClass_Unknown);
executed (the execution status of this line is deduced): pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("section")); bSelector.pseudos << pseudo;
-
435 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
436 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
437 -
438 SET_ELEMENT_NAME(QLatin1String("QHeaderView"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QHeaderView"));
-
439 ADD_PSEUDO(QLatin1String("section"), PseudoClass_Unknown);
executed (the execution status of this line is deduced): pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("section")); bSelector.pseudos << pseudo;
-
440 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
441 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
442 -
443 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
444 ADD_VALUE(Value::KnownIdentifier, Value_Button);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Button); decl.d->values << value;
-
445 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
446 -
447 if (!styleIsPixmapBased) {
partially evaluated: !styleIsPixmapBased
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
0-401
448 SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);
-
449 ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
executed (the execution status of this line is deduced): value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;
-
450 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
451 }
executed: }
Execution Count:401
401
452 -
453 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
454 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
455 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
456 -
457 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
458 } -
459 -
460 /*QProgressBar { -
461 -qt-background-role: base; -
462 }*/ -
463 { -
464 SET_ELEMENT_NAME(QLatin1String("QProgressBar"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QProgressBar"));
-
465 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
466 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
467 -
468 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
469 ADD_VALUE(Value::KnownIdentifier, Value_Base);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;
-
470 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
471 -
472 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
473 } -
474 -
475 /*QScrollBar { -
476 -qt-background-role: window; -
477 }*/ -
478 { -
479 SET_ELEMENT_NAME(QLatin1String("QScrollBar"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QScrollBar"));
-
480 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
481 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
482 -
483 SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);
-
484 ADD_VALUE(Value::KnownIdentifier, Value_Window);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;
-
485 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
486 -
487 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
488 } -
489 -
490 /*QDockWidget { -
491 border: native; -
492 }*/ -
493 { -
494 SET_ELEMENT_NAME(QLatin1String("QDockWidget"));
executed (the execution status of this line is deduced): bSelector.elementName = (QLatin1String("QDockWidget"));
-
495 ADD_BASIC_SELECTOR;
executed (the execution status of this line is deduced): selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();
-
496 ADD_SELECTOR;
executed (the execution status of this line is deduced): styleRule.selectors << selector; selector.basicSelectors.clear();
-
497 -
498 SET_PROPERTY(QLatin1String("border"), Border);
executed (the execution status of this line is deduced): decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);
-
499 ADD_VALUE(Value::KnownIdentifier, Value_Native);
executed (the execution status of this line is deduced): value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;
-
500 ADD_DECLARATION;
executed (the execution status of this line is deduced): styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();
-
501 -
502 ADD_STYLE_RULE;
executed (the execution status of this line is deduced): sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();
-
503 } -
504 -
505 sheet.origin = StyleSheetOrigin_UserAgent;
executed (the execution status of this line is deduced): sheet.origin = StyleSheetOrigin_UserAgent;
-
506 sheet.buildIndexes();
executed (the execution status of this line is deduced): sheet.buildIndexes();
-
507 return sheet;
executed: return sheet;
Execution Count:401
401
508} -
509 -
510#endif // #ifndef QT_NO_STYLE_STYLESHEET -
511 -
512QT_END_NAMESPACE -
513 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial