qstylesheetstyle_default.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylesheetstyle_default.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6using namespace QCss;-
7StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const-
8{-
9 StyleSheet sheet;-
10 StyleRule styleRule;-
11 BasicSelector bSelector;-
12 Selector selector;-
13 Declaration decl;-
14 QCss::Value value;-
15 Pseudo pseudo;-
16 AttributeSelector attr;-
17-
18-
19 bool styleIsPixmapBased = baseStyle()->inherits("QMacStyle")
baseStyle()->i...s("QMacStyle")Description
TRUEnever evaluated
FALSEnever evaluated
0
20 || baseStyle()->inherits("QWindowsXPStyle")
baseStyle()->i...ndowsXPStyle")Description
TRUEnever evaluated
FALSEnever evaluated
;
0
21-
22-
23-
24-
25-
26-
27-
28 {-
29 bSelector.elementName = (QLatin1String("QLineEdit"));-
30 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
31 styleRule.selectors << selector; selector.basicSelectors.clear();-
32-
33 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
34 value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;-
35 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
36-
37 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
38 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
39 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
40-
41 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
42 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
43 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
44-
45 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
46 }-
47-
48-
49-
50-
51 {-
52 bSelector.elementName = (QLatin1String("QLineEdit"));-
53 pseudo.type = (PseudoClass_Frameless); pseudo.name = (QLatin1String("no-frame")); bSelector.pseudos << pseudo;-
54 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
55 styleRule.selectors << selector; selector.basicSelectors.clear();-
56-
57 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
58 value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;-
59 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
60-
61 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
62 }-
63-
64-
65-
66-
67 {-
68 bSelector.elementName = (QLatin1String("QFrame"));-
69 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
70 styleRule.selectors << selector; selector.basicSelectors.clear();-
71-
72 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
73 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
74 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
75-
76 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
77 }-
78-
79-
80-
81-
82-
83 {-
84 bSelector.elementName = (QLatin1String("QLabel"));-
85 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
86 styleRule.selectors << selector; selector.basicSelectors.clear();-
87-
88 bSelector.elementName = (QLatin1String("QToolBox"));-
89 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
90 styleRule.selectors << selector; selector.basicSelectors.clear();-
91-
92 decl.d->property = (QLatin1String("background")); decl.d->propertyId = (Background);-
93 value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;-
94 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
95-
96 decl.d->property = (QLatin1String("border-image")); decl.d->propertyId = (BorderImage);-
97 value.type = (Value::KnownIdentifier); value.variant = (Value_None); decl.d->values << value;-
98 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
99-
100 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
101 }-
102-
103-
104-
105-
106 {-
107 bSelector.elementName = (QLatin1String("QGroupBox"));-
108 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
109 styleRule.selectors << selector; selector.basicSelectors.clear();-
110-
111 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
112 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
113 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
114-
115 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
116 }-
117-
118-
119-
120-
121-
122-
123 {-
124 bSelector.elementName = (QLatin1String("QToolTip"));-
125 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
126 styleRule.selectors << selector; selector.basicSelectors.clear();-
127-
128 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
129 value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;-
130 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
131-
132 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
133 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
134 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
135-
136 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
137 }-
138-
139-
140-
141-
142-
143 {-
144 bSelector.elementName = (QLatin1String("QPushButton"));-
145 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
146 styleRule.selectors << selector; selector.basicSelectors.clear();-
147-
148 bSelector.elementName = (QLatin1String("QToolButton"));-
149 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
150 styleRule.selectors << selector; selector.basicSelectors.clear();-
151-
152 decl.d->property = (QLatin1String("border-style")); decl.d->propertyId = (BorderStyles);-
153 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
154 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
155-
156 if (!styleIsPixmapBased
!styleIsPixmapBasedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
157 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
158 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
159 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
160 }
never executed: end of block
0
161-
162-
163 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
164 }-
165 {-
166 bSelector.elementName = (QLatin1String("QComboBox"));-
167 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
168 styleRule.selectors << selector; selector.basicSelectors.clear();-
169-
170 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
171 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
172 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
173-
174 if (!styleIsPixmapBased
!styleIsPixmapBasedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
175 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
176 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
177 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-gradient")); decl.d->values << value;-
178 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
179 }
never executed: end of block
0
180-
181 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
182 value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;-
183 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
184-
185 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
186 }-
187-
188-
189-
190-
191-
192-
193-
194 if (baseStyle()->inherits("QPlastiqueStyle")
baseStyle()->i...astiqueStyle")Description
TRUEnever evaluated
FALSEnever evaluated
|| baseStyle()->inherits("QCleanlooksStyle")
baseStyle()->i...anlooksStyle")Description
TRUEnever evaluated
FALSEnever evaluated
|| baseStyle()->inherits("QFusionStyle")
baseStyle()->i...QFusionStyle")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
195 {-
196 bSelector.elementName = (QLatin1String("QComboBox"));-
197 attr.name = (QLatin1String("readOnly")); attr.value = (QLatin1String("true")); attr.valueMatchCriterium = (AttributeSelector::MatchEqual); bSelector.attributeSelectors << attr;-
198 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
199 styleRule.selectors << selector; selector.basicSelectors.clear();-
200-
201 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
202 value.type = (Value::KnownIdentifier); value.variant = (Value_Button); decl.d->values << value;-
203 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
204-
205 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
206 }
never executed: end of block
0
207-
208-
209-
210-
211-
212-
213 {-
214 bSelector.elementName = (QLatin1String("QAbstractSpinBox"));-
215 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
216 styleRule.selectors << selector; selector.basicSelectors.clear();-
217-
218 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
219 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
220 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
221-
222 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
223 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
224 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
225-
226 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
227 value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;-
228 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
229-
230 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
231 }-
232-
233-
234-
235-
236 {-
237 bSelector.elementName = (QLatin1String("QMenu"));-
238 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
239 styleRule.selectors << selector; selector.basicSelectors.clear();-
240-
241 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
242 value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;-
243 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
244-
245 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
246 }-
247-
248-
249-
250 if (!styleIsPixmapBased
!styleIsPixmapBasedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
251 bSelector.elementName = (QLatin1String("QMenu"));-
252 pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("item")); bSelector.pseudos << pseudo;-
253 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
254 styleRule.selectors << selector; selector.basicSelectors.clear();-
255-
256 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
257 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
258 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
259-
260 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
261 }
never executed: end of block
0
262-
263-
264-
265-
266 {-
267 bSelector.elementName = (QLatin1String("QHeaderView"));-
268 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
269 styleRule.selectors << selector; selector.basicSelectors.clear();-
270-
271 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
272 value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;-
273 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
274-
275 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
276 }-
277-
278-
279-
280-
281-
282-
283 {-
284 bSelector.elementName = (QLatin1String("QTableCornerButton"));-
285 pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("section")); bSelector.pseudos << pseudo;-
286 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
287 styleRule.selectors << selector; selector.basicSelectors.clear();-
288-
289 bSelector.elementName = (QLatin1String("QHeaderView"));-
290 pseudo.type = (PseudoClass_Unknown); pseudo.name = (QLatin1String("section")); bSelector.pseudos << pseudo;-
291 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
292 styleRule.selectors << selector; selector.basicSelectors.clear();-
293-
294 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
295 value.type = (Value::KnownIdentifier); value.variant = (Value_Button); decl.d->values << value;-
296 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
297-
298 if (!styleIsPixmapBased
!styleIsPixmapBasedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
299 decl.d->property = (QLatin1String("-qt-style-features")); decl.d->propertyId = (QtStyleFeatures);-
300 value.type = (Value::Identifier); value.variant = (QString::fromLatin1("background-color")); decl.d->values << value;-
301 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
302 }
never executed: end of block
0
303-
304 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
305 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
306 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
307-
308 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
309 }-
310-
311-
312-
313-
314 {-
315 bSelector.elementName = (QLatin1String("QProgressBar"));-
316 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
317 styleRule.selectors << selector; selector.basicSelectors.clear();-
318-
319 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
320 value.type = (Value::KnownIdentifier); value.variant = (Value_Base); decl.d->values << value;-
321 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
322-
323 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
324 }-
325-
326-
327-
328-
329 {-
330 bSelector.elementName = (QLatin1String("QScrollBar"));-
331 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
332 styleRule.selectors << selector; selector.basicSelectors.clear();-
333-
334 decl.d->property = (QLatin1String("-qt-background-role")); decl.d->propertyId = (QtBackgroundRole);-
335 value.type = (Value::KnownIdentifier); value.variant = (Value_Window); decl.d->values << value;-
336 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
337-
338 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
339 }-
340-
341-
342-
343-
344 {-
345 bSelector.elementName = (QLatin1String("QDockWidget"));-
346 selector.basicSelectors << bSelector; bSelector.ids.clear(); bSelector.pseudos.clear(); bSelector.attributeSelectors.clear();-
347 styleRule.selectors << selector; selector.basicSelectors.clear();-
348-
349 decl.d->property = (QLatin1String("border")); decl.d->propertyId = (Border);-
350 value.type = (Value::KnownIdentifier); value.variant = (Value_Native); decl.d->values << value;-
351 styleRule.declarations << decl; decl.d.detach(); decl.d->values.clear();-
352-
353 sheet.styleRules << styleRule; styleRule.selectors.clear(); styleRule.declarations.clear();-
354 }-
355-
356 sheet.origin = StyleSheetOrigin_UserAgent;-
357 sheet.buildIndexes();-
358 return
never executed: return sheet;
sheet;
never executed: return sheet;
0
359}-
360-
361-
362-
363-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9