qcommonstyle.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qcommonstyle.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static QWindow *qt_getWindow(const QWidget *widget)-
11{-
12 return
never executed: return widget ? widget->window()->windowHandle() : 0;
widget ? widget->window()->windowHandle() : 0;
never executed: return widget ? widget->window()->windowHandle() : 0;
0
13}-
14QCommonStyle::QCommonStyle()-
15 : QStyle(*new QCommonStylePrivate)-
16{ }
never executed: end of block
0
17-
18-
19-
20QCommonStyle::QCommonStyle(QCommonStylePrivate &dd)-
21 : QStyle(dd)-
22{ }
never executed: end of block
0
23-
24-
25-
26-
27QCommonStyle::~QCommonStyle()-
28{ }-
29-
30-
31-
32-
33-
34void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,-
35 const QWidget *widget) const-
36{-
37 const QCommonStylePrivate * const d = d_func();-
38 switch (pe) {-
39 case
never executed: case PE_FrameButtonBevel:
PE_FrameButtonBevel:
never executed: case PE_FrameButtonBevel:
0
40 case
never executed: case PE_FrameButtonTool:
PE_FrameButtonTool:
never executed: case PE_FrameButtonTool:
0
41 qDrawShadeRect(p, opt->rect, opt->palette,-
42 opt->state & (State_Sunken | State_On), 1, 0);-
43 break;
never executed: break;
0
44 case
never executed: case PE_PanelButtonCommand:
PE_PanelButtonCommand:
never executed: case PE_PanelButtonCommand:
0
45 case
never executed: case PE_PanelButtonBevel:
PE_PanelButtonBevel:
never executed: case PE_PanelButtonBevel:
0
46 case
never executed: case PE_PanelButtonTool:
PE_PanelButtonTool:
never executed: case PE_PanelButtonTool:
0
47 case
never executed: case PE_IndicatorButtonDropDown:
PE_IndicatorButtonDropDown:
never executed: case PE_IndicatorButtonDropDown:
0
48 qDrawShadePanel(p, opt->rect, opt->palette,-
49 opt->state & (State_Sunken | State_On), 1,-
50 &opt->palette.brush(QPalette::Button));-
51 break;
never executed: break;
0
52 case
never executed: case PE_IndicatorViewItemCheck:
PE_IndicatorViewItemCheck:
never executed: case PE_IndicatorViewItemCheck:
0
53 proxy()->drawPrimitive(PE_IndicatorCheckBox, opt, p, widget);-
54 break;
never executed: break;
0
55 case
never executed: case PE_IndicatorCheckBox:
PE_IndicatorCheckBox:
never executed: case PE_IndicatorCheckBox:
0
56 if (opt->state & State_NoChange
opt->state & State_NoChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
57 p->setPen(opt->palette.foreground().color());-
58 p->fillRect(opt->rect, opt->palette.brush(QPalette::Button));-
59 p->drawRect(opt->rect);-
60 p->drawLine(opt->rect.topLeft(), opt->rect.bottomRight());-
61 }
never executed: end of block
else {
0
62 qDrawShadePanel(p, opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height(),-
63 opt->palette, opt->state & (State_Sunken | State_On), 1,-
64 &opt->palette.brush(QPalette::Button));-
65 }
never executed: end of block
0
66 break;
never executed: break;
0
67 case
never executed: case PE_IndicatorRadioButton:
PE_IndicatorRadioButton:
never executed: case PE_IndicatorRadioButton:
{
0
68 QRect ir = opt->rect;-
69 p->setPen(opt->palette.dark().color());-
70 p->drawArc(opt->rect, 0, 5760);-
71 if (opt->state & (State_Sunken | State_On)
opt->state & (...en | State_On)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
72 ir.adjust(2, 2, -2, -2);-
73 p->setBrush(opt->palette.foreground());-
74 bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);-
75 p->setRenderHint(QPainter::Qt4CompatiblePainting);-
76 p->drawEllipse(ir);-
77 p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);-
78 }
never executed: end of block
0
79 break;
never executed: break;
}
0
80 case
never executed: case PE_FrameFocusRect:
PE_FrameFocusRect:
never executed: case PE_FrameFocusRect:
0
81 if (const
const QStyleOp...usRect *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)
const QStyleOp...usRect *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
82 QColor bg = fropt->backgroundColor;-
83 QPen oldPen = p->pen();-
84 if (bg.isValid()
bg.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
85 int h, s, v;-
86 bg.getHsv(&h, &s, &v);-
87 if (v >= 128
v >= 128Description
TRUEnever evaluated
FALSEnever evaluated
)
0
88 p->setPen(Qt::black);
never executed: p->setPen(Qt::black);
0
89 else-
90 p->setPen(Qt::white);
never executed: p->setPen(Qt::white);
0
91 } else {-
92 p->setPen(opt->palette.foreground().color());-
93 }
never executed: end of block
0
94 QRect focusRect = opt->rect.adjusted(1, 1, -1, -1);-
95 p->drawRect(focusRect.adjusted(0, 0, -1, -1));-
96 p->setPen(oldPen);-
97 }
never executed: end of block
0
98 break;
never executed: break;
0
99 case
never executed: case PE_IndicatorMenuCheckMark:
PE_IndicatorMenuCheckMark:
never executed: case PE_IndicatorMenuCheckMark:
{
0
100 const int markW = opt->rect.width() > 7
opt->rect.width() > 7Description
TRUEnever evaluated
FALSEnever evaluated
? 7 : opt->rect.width();
0
101 const int markH = markW;-
102 int posX = opt->rect.x() + (opt->rect.width() - markW)/2 + 1;-
103 int posY = opt->rect.y() + (opt->rect.height() - markH)/2;-
104-
105 QVector<QLineF> a;-
106 a.reserve(markH);-
107-
108 int i, xx, yy;-
109 xx = posX;-
110 yy = 3 + posY;-
111 for (i = 0; i < markW/2
i < markW/2Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
112 a << QLineF(xx, yy, xx, yy + 2);-
113 ++xx;-
114 ++yy;-
115 }
never executed: end of block
0
116 yy -= 2;-
117 for (; i < markH
i < markHDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
118 a << QLineF(xx, yy, xx, yy + 2);-
119 ++xx;-
120 --yy;-
121 }
never executed: end of block
0
122 if (!(opt->state & State_Enabled)
!(opt->state & State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
&& !(opt->state & State_On)
!(opt->state & State_On)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
123 p->save();-
124 p->translate(1, 1);-
125 p->setPen(opt->palette.light().color());-
126 p->drawLines(a);-
127 p->restore();-
128 }
never executed: end of block
0
129 p->setPen((opt->state & State_On) ? opt->palette.highlightedText().color() : opt->palette.text().color());-
130 p->drawLines(a);-
131 break;
never executed: break;
}
0
132 case
never executed: case PE_Frame:
PE_Frame:
never executed: case PE_Frame:
0
133 case
never executed: case PE_FrameMenu:
PE_FrameMenu:
never executed: case PE_FrameMenu:
0
134 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
135 if (pe == PE_FrameMenu
pe == PE_FrameMenuDescription
TRUEnever evaluated
FALSEnever evaluated
|| (
(frame->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
frame->state & State_Sunken)
(frame->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(frame->state & State_Raised)Description
TRUEnever evaluated
FALSEnever evaluated
frame->state & State_Raised)
(frame->state & State_Raised)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
136 qDrawShadePanel(p, frame->rect, frame->palette, frame->state & State_Sunken,-
137 frame->lineWidth);-
138 }
never executed: end of block
else {
0
139 qDrawPlainRect(p, frame->rect, frame->palette.foreground().color(), frame->lineWidth);-
140 }
never executed: end of block
0
141 }-
142 break;
never executed: break;
0
143-
144 case
never executed: case PE_PanelMenuBar:
PE_PanelMenuBar:
never executed: case PE_PanelMenuBar:
0
145 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& qobject_cast<QToolBar *>(widget->parentWidget())
qobject_cast<Q...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
146 break;
never executed: break;
0
147 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
){
0
148 qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth,-
149 &frame->palette.brush(QPalette::Button));-
150-
151 }
never executed: end of block
0
152 else if (const
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBar *frame = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
){
0
153 qDrawShadePanel(p, frame->rect, frame->palette, false, frame->lineWidth,-
154 &frame->palette.brush(QPalette::Button));-
155 }
never executed: end of block
0
156-
157 break;
never executed: break;
0
158 case
never executed: case PE_PanelMenu:
PE_PanelMenu:
never executed: case PE_PanelMenu:
0
159 break;
never executed: break;
0
160 case
never executed: case PE_PanelToolBar:
PE_PanelToolBar:
never executed: case PE_PanelToolBar:
0
161 break;
never executed: break;
0
162-
163-
164 case
never executed: case PE_IndicatorProgressChunk:
PE_IndicatorProgressChunk:
never executed: case PE_IndicatorProgressChunk:
0
165 {-
166 bool vertical = false;-
167 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
168 vertical = pb->orientation == Qt::Vertical;
never executed: vertical = pb->orientation == Qt::Vertical;
0
169 if (!vertical
!verticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
170 p->fillRect(opt->rect.x(), opt->rect.y() + 3, opt->rect.width() -2, opt->rect.height() - 6,-
171 opt->palette.brush(QPalette::Highlight));-
172 }
never executed: end of block
else {
0
173 p->fillRect(opt->rect.x() + 2, opt->rect.y(), opt->rect.width() -6, opt->rect.height() - 2,-
174 opt->palette.brush(QPalette::Highlight));-
175 }
never executed: end of block
0
176 }-
177 break;
never executed: break;
0
178-
179 case
never executed: case PE_IndicatorBranch:
PE_IndicatorBranch:
never executed: case PE_IndicatorBranch:
{
0
180 static const int decoration_size = 9;-
181 int mid_h = opt->rect.x() + opt->rect.width() / 2;-
182 int mid_v = opt->rect.y() + opt->rect.height() / 2;-
183 int bef_h = mid_h;-
184 int bef_v = mid_v;-
185 int aft_h = mid_h;-
186 int aft_v = mid_v;-
187 if (opt->state & State_Children
opt->state & State_ChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
188 int delta = decoration_size / 2;-
189 bef_h -= delta;-
190 bef_v -= delta;-
191 aft_h += delta;-
192 aft_v += delta;-
193 p->drawLine(bef_h + 2, bef_v + 4, bef_h + 6, bef_v + 4);-
194 if (!(opt->state & State_Open)
!(opt->state & State_Open)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
195 p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6);
never executed: p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6);
0
196 QPen oldPen = p->pen();-
197 p->setPen(opt->palette.dark().color());-
198 p->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1);-
199 p->setPen(oldPen);-
200 }
never executed: end of block
0
201 QBrush brush(opt->palette.dark().color(), Qt::Dense4Pattern);-
202 if (opt->state & State_Item
opt->state & State_ItemDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
203 if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
204 p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush);
never executed: p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush);
0
205 else-
206 p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush);
never executed: p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush);
0
207 }-
208 if (opt->state & State_Sibling
opt->state & State_SiblingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
209 p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush);
never executed: p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush);
0
210 if (opt->state & (State_Open | State_Children | State_Item | State_Sibling)
opt->state & (...State_Sibling)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
211 p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush);
never executed: p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush);
0
212 break;
never executed: break;
}
0
213 case
never executed: case PE_FrameStatusBarItem:
PE_FrameStatusBarItem:
never executed: case PE_FrameStatusBarItem:
0
214 qDrawShadeRect(p, opt->rect, opt->palette, true, 1, 0, 0);-
215 break;
never executed: break;
0
216 case
never executed: case PE_IndicatorHeaderArrow:
PE_IndicatorHeaderArrow:
never executed: case PE_IndicatorHeaderArrow:
0
217 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
218 QPen oldPen = p->pen();-
219 if (header->sortIndicator & QStyleOptionHeader::SortUp
header->sortIn...Header::SortUpDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
220 p->setPen(QPen(opt->palette.light(), 0));-
221 p->drawLine(opt->rect.x() + opt->rect.width(), opt->rect.y(),-
222 opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height());-
223 p->setPen(QPen(opt->palette.dark(), 0));-
224 const QPoint points[] = {-
225 QPoint(opt->rect.x() + opt->rect.width() / 2, opt->rect.y() + opt->rect.height()),-
226 QPoint(opt->rect.x(), opt->rect.y()),-
227 QPoint(opt->rect.x() + opt->rect.width(), opt->rect.y()),-
228 };-
229 p->drawPolyline(points, sizeof points / sizeof *points);-
230 }
never executed: end of block
else if (header->sortIndicator & QStyleOptionHeader::SortDown
header->sortIn...ader::SortDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
231 p->setPen(QPen(opt->palette.light(), 0));-
232 const QPoint points[] = {-
233 QPoint(opt->rect.x(), opt->rect.y() + opt->rect.height()),-
234 QPoint(opt->rect.x() + opt->rect.width(), opt->rect.y() + opt->rect.height()),-
235 QPoint(opt->rect.x() + opt->rect.width() / 2, opt->rect.y()),-
236 };-
237 p->drawPolyline(points, sizeof points / sizeof *points);-
238 p->setPen(QPen(opt->palette.dark(), 0));-
239 p->drawLine(opt->rect.x(), opt->rect.y() + opt->rect.height(),-
240 opt->rect.x() + opt->rect.width() / 2, opt->rect.y());-
241 }
never executed: end of block
0
242 p->setPen(oldPen);-
243 }
never executed: end of block
0
244 break;
never executed: break;
0
245-
246 case
never executed: case PE_FrameTabBarBase:
PE_FrameTabBarBase:
never executed: case PE_FrameTabBarBase:
0
247 if (const
const QStyleOp...arBase *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabBarBase *tbb
const QStyleOp...arBase *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
0
248 = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)
const QStyleOp...arBase *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
249 p->save();-
250 switch (tbb->shape) {-
251 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
252 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
253 p->setPen(QPen(tbb->palette.light(), 0));-
254 p->drawLine(tbb->rect.topLeft(), tbb->rect.topRight());-
255 break;
never executed: break;
0
256 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
257 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
258 p->setPen(QPen(tbb->palette.light(), 0));-
259 p->drawLine(tbb->rect.topLeft(), tbb->rect.bottomLeft());-
260 break;
never executed: break;
0
261 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
262 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
263 p->setPen(QPen(tbb->palette.shadow(), 0));-
264 p->drawLine(tbb->rect.left(), tbb->rect.bottom(),-
265 tbb->rect.right(), tbb->rect.bottom());-
266 p->setPen(QPen(tbb->palette.dark(), 0));-
267 p->drawLine(tbb->rect.left(), tbb->rect.bottom() - 1,-
268 tbb->rect.right() - 1, tbb->rect.bottom() - 1);-
269 break;
never executed: break;
0
270 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
271 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
272 p->setPen(QPen(tbb->palette.dark(), 0));-
273 p->drawLine(tbb->rect.topRight(), tbb->rect.bottomRight());-
274 break;
never executed: break;
0
275 }-
276 p->restore();-
277 }
never executed: end of block
0
278 break;
never executed: break;
0
279 case
never executed: case PE_IndicatorTabClose:
PE_IndicatorTabClose:
never executed: case PE_IndicatorTabClose:
{
0
280 if (d->tabBarcloseButtonIcon.isNull()
d->tabBarclose...nIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
281 d->tabBarcloseButtonIcon.addPixmap(QPixmap(-
282 QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-16.png")),-
283 QIcon::Normal, QIcon::Off);-
284 d->tabBarcloseButtonIcon.addPixmap(QPixmap(-
285 QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-down-16.png")),-
286 QIcon::Normal, QIcon::On);-
287 d->tabBarcloseButtonIcon.addPixmap(QPixmap(-
288 QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-closetab-hover-16.png")),-
289 QIcon::Active, QIcon::Off);-
290 }
never executed: end of block
0
291-
292 int size = proxy()->pixelMetric(QStyle::PM_SmallIconSize);-
293 QIcon::Mode mode = opt->state & State_Enabled
opt->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
?
0
294 (opt->state & State_Raised
opt->state & State_RaisedDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Active : QIcon::Normal)
0
295 : QIcon::Disabled;-
296 if (!(opt->state & State_Raised)
!(opt->state & State_Raised)Description
TRUEnever evaluated
FALSEnever evaluated
0
297 && !(opt->state & State_Sunken)
!(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
0
298 && !(opt->state & QStyle::State_Selected)
!(opt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
299 mode = QIcon::Disabled;
never executed: mode = QIcon::Disabled;
0
300-
301 QIcon::State state = opt->state & State_Sunken
opt->state & State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::On : QIcon::Off;
0
302 QPixmap pixmap = d->tabBarcloseButtonIcon.pixmap(qt_getWindow(widget), QSize(size, size), mode, state);-
303 proxy()->drawItemPixmap(p, opt->rect, Qt::AlignCenter, pixmap);-
304 break;
never executed: break;
0
305 }-
306-
307 case
never executed: case PE_FrameTabWidget:
PE_FrameTabWidget:
never executed: case PE_FrameTabWidget:
0
308 case
never executed: case PE_FrameWindow:
PE_FrameWindow:
never executed: case PE_FrameWindow:
0
309 qDrawWinPanel(p, opt->rect, opt->palette, false, 0);-
310 break;
never executed: break;
0
311 case
never executed: case PE_FrameLineEdit:
PE_FrameLineEdit:
never executed: case PE_FrameLineEdit:
0
312 proxy()->drawPrimitive(PE_Frame, opt, p, widget);-
313 break;
never executed: break;
0
314-
315 case
never executed: case PE_FrameGroupBox:
PE_FrameGroupBox:
never executed: case PE_FrameGroupBox:
0
316 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
317 if (frame->features & QStyleOptionFrame::Flat
frame->feature...ionFrame::FlatDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
318 QRect fr = frame->rect;-
319 QPoint p1(fr.x(), fr.y() + 1);-
320 QPoint p2(fr.x() + fr.width(), p1.y());-
321 qDrawShadeLine(p, p1, p2, frame->palette, true,-
322 frame->lineWidth, frame->midLineWidth);-
323 }
never executed: end of block
else {
0
324 qDrawShadeRect(p, frame->rect.x(), frame->rect.y(), frame->rect.width(),-
325 frame->rect.height(), frame->palette, true,-
326 frame->lineWidth, frame->midLineWidth);-
327 }
never executed: end of block
0
328 }-
329 break;
never executed: break;
0
330-
331-
332 case
never executed: case PE_FrameDockWidget:
PE_FrameDockWidget:
never executed: case PE_FrameDockWidget:
0
333 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
334 int lw = frame->lineWidth;-
335 if (lw <= 0
lw <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
336 lw = proxy()->pixelMetric(PM_DockWidgetFrameWidth);
never executed: lw = proxy()->pixelMetric(PM_DockWidgetFrameWidth);
0
337-
338 qDrawShadePanel(p, frame->rect, frame->palette, false, lw);-
339 }
never executed: end of block
0
340 break;
never executed: break;
0
341-
342-
343 case
never executed: case PE_IndicatorToolBarHandle:
PE_IndicatorToolBarHandle:
never executed: case PE_IndicatorToolBarHandle:
0
344 p->save();-
345 p->translate(opt->rect.x(), opt->rect.y());-
346 if (opt->state & State_Horizontal
opt->state & State_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
347 int x = opt->rect.width() / 3;-
348 if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
349 x -= 2;
never executed: x -= 2;
0
350 if (opt->rect.height() > 4
opt->rect.height() > 4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
351 qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4,-
352 opt->palette, false, 1, 0);-
353 qDrawShadePanel(p, x+3, 2, 3, opt->rect.height() - 4,-
354 opt->palette, false, 1, 0);-
355 }
never executed: end of block
0
356 }
never executed: end of block
else {
0
357 if (opt->rect.width() > 4
opt->rect.width() > 4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
358 int y = opt->rect.height() / 3;-
359 qDrawShadePanel(p, 2, y, opt->rect.width() - 4, 3,-
360 opt->palette, false, 1, 0);-
361 qDrawShadePanel(p, 2, y+3, opt->rect.width() - 4, 3,-
362 opt->palette, false, 1, 0);-
363 }
never executed: end of block
0
364 }
never executed: end of block
0
365 p->restore();-
366 break;
never executed: break;
0
367 case
never executed: case PE_IndicatorToolBarSeparator:
PE_IndicatorToolBarSeparator:
never executed: case PE_IndicatorToolBarSeparator:
0
368 {-
369 QPoint p1, p2;-
370 if (opt->state & State_Horizontal
opt->state & State_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
371 p1 = QPoint(opt->rect.width()/2, 0);-
372 p2 = QPoint(p1.x(), opt->rect.height());-
373 }
never executed: end of block
else {
0
374 p1 = QPoint(0, opt->rect.height()/2);-
375 p2 = QPoint(opt->rect.width(), p1.y());-
376 }
never executed: end of block
0
377 qDrawShadeLine(p, p1, p2, opt->palette, 1, 1, 0);-
378 break;
never executed: break;
0
379 }-
380-
381-
382 case
never executed: case PE_IndicatorSpinPlus:
PE_IndicatorSpinPlus:
never executed: case PE_IndicatorSpinPlus:
0
383 case
never executed: case PE_IndicatorSpinMinus:
PE_IndicatorSpinMinus:
never executed: case PE_IndicatorSpinMinus:
{
0
384 QRect r = opt->rect;-
385 int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);-
386 QRect br = r.adjusted(fw, fw, -fw, -fw);-
387-
388 int offset = (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
0
389 int step = (br.width() + 4) / 5;-
390 p->fillRect(br.x() + offset, br.y() + offset +br.height() / 2 - step / 2,-
391 br.width(), step,-
392 opt->palette.buttonText());-
393 if (pe == PE_IndicatorSpinPlus
pe == PE_IndicatorSpinPlusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
394 p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset,
never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText());
0
395 step, br.height(),
never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText());
0
396 opt->palette.buttonText());
never executed: p->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset, step, br.height(), opt->palette.buttonText());
0
397-
398 break;
never executed: break;
}
0
399 case
never executed: case PE_IndicatorSpinUp:
PE_IndicatorSpinUp:
never executed: case PE_IndicatorSpinUp:
0
400 case
never executed: case PE_IndicatorSpinDown:
PE_IndicatorSpinDown:
never executed: case PE_IndicatorSpinDown:
{
0
401 QRect r = opt->rect;-
402 int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);-
403-
404 int x = r.x(), y = r.y(), w = r.width(), h = r.height();-
405 int sw = w-4;-
406 if (sw < 3
sw < 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
407 break;
never executed: break;
0
408 else if (!(sw & 1)
!(sw & 1)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
409 sw--;
never executed: sw--;
0
410 sw -= (sw / 7) * 2;-
411 int sh = sw/2 + 2;-
412-
413 int sx = x + w / 2 - sw / 2;-
414 int sy = y + h / 2 - sh / 2;-
415-
416 if (pe == PE_IndicatorSpinUp
pe == PE_IndicatorSpinUpDescription
TRUEnever evaluated
FALSEnever evaluated
&& fw
fwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
417 --
never executed: --sy;
sy;
never executed: --sy;
0
418-
419 int bsx = 0;-
420 int bsy = 0;-
421 if (opt->state & State_Sunken
opt->state & State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
422 bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal);-
423 bsy = proxy()->pixelMetric(PM_ButtonShiftVertical);-
424 }
never executed: end of block
0
425 p->save();-
426 p->translate(sx + bsx, sy + bsy);-
427 p->setPen(opt->palette.buttonText().color());-
428 p->setBrush(opt->palette.buttonText());-
429 p->setRenderHint(QPainter::Qt4CompatiblePainting);-
430 if (pe == PE_IndicatorSpinDown
pe == PE_IndicatorSpinDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
431 const QPoint points[] = { QPoint(0, 1), QPoint(sw-1, 1), QPoint(sh-2, sh-1) };-
432 p->drawPolygon(points, sizeof points / sizeof *points);-
433 }
never executed: end of block
else {
0
434 const QPoint points[] = { QPoint(0, sh-1), QPoint(sw-1, sh-1), QPoint(sh-2, 1) };-
435 p->drawPolygon(points, sizeof points / sizeof *points);-
436 }
never executed: end of block
0
437 p->restore();-
438 break;
never executed: break;
}
0
439-
440 case
never executed: case PE_PanelTipLabel:
PE_PanelTipLabel:
never executed: case PE_PanelTipLabel:
{
0
441 QBrush oldBrush = p->brush();-
442 QPen oldPen = p->pen();-
443 p->setPen(QPen(opt->palette.toolTipText(), 0));-
444 p->setBrush(opt->palette.toolTipBase());-
445 p->drawRect(opt->rect.adjusted(0, 0, -1, -1));-
446 p->setPen(oldPen);-
447 p->setBrush(oldBrush);-
448 break;
never executed: break;
0
449 }-
450-
451 case
never executed: case PE_IndicatorTabTear:
PE_IndicatorTabTear:
never executed: case PE_IndicatorTabTear:
0
452 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
453 bool rtl = tab->direction == Qt::RightToLeft;-
454 const bool horizontal = tab->rect.height() > tab->rect.width();-
455 const int margin = 4;-
456 QPainterPath path;-
457-
458 if (horizontal
horizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
459 QRect rect = tab->rect.adjusted(rtl ? margin : 0, 0, rtl ? 1 : -margin, 0);-
460 rect.setTop(rect.top() + ((tab->state & State_Selected) ? 1 : 3));-
461 rect.setBottom(rect.bottom() - ((tab->state & State_Selected) ? 0 : 2));-
462-
463 path.moveTo(QPoint(rtl ? rect.right() : rect.left(), rect.top()));-
464 int count = 4;-
465 for (int jags = 1; jags <= count
jags <= countDescription
TRUEnever evaluated
FALSEnever evaluated
; ++jags, rtl = !rtl)
0
466 path.lineTo(QPoint(rtl ? rect.left() : rect.right(), rect.top() + jags * rect.height()/count));
never executed: path.lineTo(QPoint(rtl ? rect.left() : rect.right(), rect.top() + jags * rect.height()/count));
0
467 }
never executed: end of block
else {
0
468 QRect rect = tab->rect.adjusted(0, 0, 0, -margin);-
469 rect.setLeft(rect.left() + ((tab->state & State_Selected) ? 1 : 3));-
470 rect.setRight(rect.right() - ((tab->state & State_Selected) ? 0 : 2));-
471-
472 path.moveTo(QPoint(rect.left(), rect.top()));-
473 int count = 4;-
474 for (int jags = 1; jags <= count
jags <= countDescription
TRUEnever evaluated
FALSEnever evaluated
; ++jags, rtl = !rtl)
0
475 path.lineTo(QPoint(rect.left() + jags * rect.width()/count, rtl ? rect.top() : rect.bottom()));
never executed: path.lineTo(QPoint(rect.left() + jags * rect.width()/count, rtl ? rect.top() : rect.bottom()));
0
476 }
never executed: end of block
0
477-
478 p->setPen(QPen(tab->palette.dark(), qreal(.8)));-
479 p->setBrush(tab->palette.background());-
480 p->setRenderHint(QPainter::Antialiasing);-
481 p->drawPath(path);-
482 }
never executed: end of block
0
483 break;
never executed: break;
0
484-
485-
486 case
never executed: case PE_PanelLineEdit:
PE_PanelLineEdit:
never executed: case PE_PanelLineEdit:
0
487 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
488 p->fillRect(panel->rect.adjusted(panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth),-
489 panel->palette.brush(QPalette::Base));-
490-
491 if (panel->lineWidth > 0
panel->lineWidth > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
492 proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget);
never executed: proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget);
0
493 }
never executed: end of block
0
494 break;
never executed: break;
0
495-
496-
497 case
never executed: case PE_IndicatorColumnViewArrow:
PE_IndicatorColumnViewArrow:
never executed: case PE_IndicatorColumnViewArrow:
{
0
498 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
499 bool reverse = (viewOpt->direction == Qt::RightToLeft);-
500 p->save();-
501 QPainterPath path;-
502 int x = viewOpt->rect.x() + 1;-
503 int offset = (viewOpt->rect.height() / 3);-
504 int height = (viewOpt->rect.height()) - offset * 2;-
505 if (height % 2 == 1
height % 2 == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
506 --
never executed: --height;
height;
never executed: --height;
0
507 int x2 = x + height - 1;-
508 if (reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
509 x = viewOpt->rect.x() + viewOpt->rect.width() - 1;-
510 x2 = x - height + 1;-
511 }
never executed: end of block
0
512 path.moveTo(x, viewOpt->rect.y() + offset);-
513 path.lineTo(x, viewOpt->rect.y() + offset + height);-
514 path.lineTo(x2, viewOpt->rect.y() + offset+height/2);-
515 path.closeSubpath();-
516 if (viewOpt->state & QStyle::State_Selected
viewOpt->state...State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
517 if (viewOpt->showDecorationSelected
viewOpt->showD...rationSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
518 QColor color = viewOpt->palette.color(QPalette::Active, QPalette::HighlightedText);-
519 p->setPen(color);-
520 p->setBrush(color);-
521 }
never executed: end of block
else {
0
522 QColor color = viewOpt->palette.color(QPalette::Active, QPalette::WindowText);-
523 p->setPen(color);-
524 p->setBrush(color);-
525 }
never executed: end of block
0
526-
527 } else {-
528 QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Mid);-
529 p->setPen(color);-
530 p->setBrush(color);-
531 }
never executed: end of block
0
532 p->drawPath(path);-
533-
534-
535 if (!(viewOpt->state & QStyle::State_Selected)
!(viewOpt->sta...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
536 QPainterPath lines;-
537 lines.moveTo(x, viewOpt->rect.y() + offset);-
538 lines.lineTo(x, viewOpt->rect.y() + offset + height);-
539 lines.moveTo(x, viewOpt->rect.y() + offset);-
540 lines.lineTo(x2, viewOpt->rect.y() + offset+height/2);-
541 QColor color = viewOpt->palette.color(QPalette::Active, QPalette::Dark);-
542 p->setPen(color);-
543 p->drawPath(lines);-
544 }
never executed: end of block
0
545 p->restore();-
546 }
never executed: end of block
0
547 break;
never executed: break;
}
0
548-
549 case
never executed: case PE_IndicatorItemViewItemDrop:
PE_IndicatorItemViewItemDrop:
never executed: case PE_IndicatorItemViewItemDrop:
{
0
550 QRect rect = opt->rect;-
551 if (opt->rect.height() == 0
opt->rect.height() == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
552 p->drawLine(rect.topLeft(), rect.topRight());
never executed: p->drawLine(rect.topLeft(), rect.topRight());
0
553 else-
554 p->drawRect(rect);
never executed: p->drawRect(rect);
0
555 break;
never executed: break;
}
0
556-
557 case
never executed: case PE_PanelItemViewRow:
PE_PanelItemViewRow:
never executed: case PE_PanelItemViewRow:
0
558 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
559 QPalette::ColorGroup cg = (
(widget ? widg...tate_Enabled))Description
TRUEnever evaluated
FALSEnever evaluated
widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
(widget ? widg...tate_Enabled))Description
TRUEnever evaluated
FALSEnever evaluated
0
560 ? QPalette::Normal : QPalette::Disabled;-
561 if (cg == QPalette::Normal
cg == QPalette::NormalDescription
TRUEnever evaluated
FALSEnever evaluated
&& !(vopt->state & QStyle::State_Active)
!(vopt->state ...:State_Active)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
562 cg = QPalette::Inactive;
never executed: cg = QPalette::Inactive;
0
563-
564 if ((
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
vopt->state & QStyle::State_Selected)
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
&& proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, opt, widget)
proxy()->style..., opt, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
565 p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight));
never executed: p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight));
0
566 else if (vopt->features & QStyleOptionViewItem::Alternate
vopt->features...tem::AlternateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
567 p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase));
never executed: p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase));
0
568 }
never executed: end of block
0
569 break;
never executed: break;
0
570 case
never executed: case PE_PanelItemViewItem:
PE_PanelItemViewItem:
never executed: case PE_PanelItemViewItem:
0
571 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
572 QPalette::ColorGroup cg = (
(widget ? widg...tate_Enabled))Description
TRUEnever evaluated
FALSEnever evaluated
widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
(widget ? widg...tate_Enabled))Description
TRUEnever evaluated
FALSEnever evaluated
0
573 ? QPalette::Normal : QPalette::Disabled;-
574 if (cg == QPalette::Normal
cg == QPalette::NormalDescription
TRUEnever evaluated
FALSEnever evaluated
&& !(vopt->state & QStyle::State_Active)
!(vopt->state ...:State_Active)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
575 cg = QPalette::Inactive;
never executed: cg = QPalette::Inactive;
0
576-
577 if (vopt->showDecorationSelected
vopt->showDecorationSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
vopt->state & QStyle::State_Selected)
(vopt->state &...tate_Selected)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
578 p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight));-
579 }
never executed: end of block
else {
0
580 if (vopt->backgroundBrush.style() != Qt::NoBrush
vopt->backgrou...!= Qt::NoBrushDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
581 QPointF oldBO = p->brushOrigin();-
582 p->setBrushOrigin(vopt->rect.topLeft());-
583 p->fillRect(vopt->rect, vopt->backgroundBrush);-
584 p->setBrushOrigin(oldBO);-
585 }
never executed: end of block
0
586-
587 if (vopt->state & QStyle::State_Selected
vopt->state & ...State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
588 QRect textRect = subElementRect(QStyle::SE_ItemViewItemText, opt, widget);-
589 p->fillRect(textRect, vopt->palette.brush(cg, QPalette::Highlight));-
590 }
never executed: end of block
0
591 }
never executed: end of block
0
592 }-
593 break;
never executed: break;
0
594-
595 case
never executed: case PE_PanelScrollAreaCorner:
PE_PanelScrollAreaCorner:
never executed: case PE_PanelScrollAreaCorner:
{
0
596 const QBrush brush(opt->palette.brush(QPalette::Window));-
597 p->fillRect(opt->rect, brush);-
598 } break;
never executed: break;
0
599 case
never executed: case PE_IndicatorArrowUp:
PE_IndicatorArrowUp:
never executed: case PE_IndicatorArrowUp:
0
600 case
never executed: case PE_IndicatorArrowDown:
PE_IndicatorArrowDown:
never executed: case PE_IndicatorArrowDown:
0
601 case
never executed: case PE_IndicatorArrowRight:
PE_IndicatorArrowRight:
never executed: case PE_IndicatorArrowRight:
0
602 case
never executed: case PE_IndicatorArrowLeft:
PE_IndicatorArrowLeft:
never executed: case PE_IndicatorArrowLeft:
0
603 {-
604 if (opt->rect.width() <= 1
opt->rect.width() <= 1Description
TRUEnever evaluated
FALSEnever evaluated
|| opt->rect.height() <= 1
opt->rect.height() <= 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
605 break;
never executed: break;
0
606 QRect r = opt->rect;-
607 int size = qMin(r.height(), r.width());-
608 QPixmap pixmap;-
609 QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-")-
610 % QLatin1String(metaObject()->className()), opt, QSize(size, size))-
611 % HexString<uint>(pe);-
612 if (!QPixmapCache::find(pixmapName, pixmap)
!QPixmapCache:...pName, pixmap)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
613 int border = size/5;-
614 int sqsize = 2*(size/2);-
615 QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied);-
616 image.fill(0);-
617 QPainter imagePainter(&image);-
618-
619 QPolygon a;-
620 switch (pe) {-
621 case
never executed: case PE_IndicatorArrowUp:
PE_IndicatorArrowUp:
never executed: case PE_IndicatorArrowUp:
0
622 a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize - border, sqsize/2);-
623 break;
never executed: break;
0
624 case
never executed: case PE_IndicatorArrowDown:
PE_IndicatorArrowDown:
never executed: case PE_IndicatorArrowDown:
0
625 a.setPoints(3, border, sqsize/2, sqsize/2, sqsize - border, sqsize - border, sqsize/2);-
626 break;
never executed: break;
0
627 case
never executed: case PE_IndicatorArrowRight:
PE_IndicatorArrowRight:
never executed: case PE_IndicatorArrowRight:
0
628 a.setPoints(3, sqsize - border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border);-
629 break;
never executed: break;
0
630 case
never executed: case PE_IndicatorArrowLeft:
PE_IndicatorArrowLeft:
never executed: case PE_IndicatorArrowLeft:
0
631 a.setPoints(3, border, sqsize/2, sqsize/2, border, sqsize/2, sqsize - border);-
632 break;
never executed: break;
0
633 default
never executed: default:
:
never executed: default:
0
634 break;
never executed: break;
0
635 }-
636-
637 int bsx = 0;-
638 int bsy = 0;-
639-
640 if (opt->state & State_Sunken
opt->state & State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
641 bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget);-
642 bsy = proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget);-
643 }
never executed: end of block
0
644-
645 QRect bounds = a.boundingRect();-
646 int sx = sqsize / 2 - bounds.center().x() - 1;-
647 int sy = sqsize / 2 - bounds.center().y() - 1;-
648 imagePainter.translate(sx + bsx, sy + bsy);-
649 imagePainter.setPen(opt->palette.buttonText().color());-
650 imagePainter.setBrush(opt->palette.buttonText());-
651 imagePainter.setRenderHint(QPainter::Qt4CompatiblePainting);-
652-
653 if (!(opt->state & State_Enabled)
!(opt->state & State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
654 imagePainter.translate(1, 1);-
655 imagePainter.setBrush(opt->palette.light().color());-
656 imagePainter.setPen(opt->palette.light().color());-
657 imagePainter.drawPolygon(a);-
658 imagePainter.translate(-1, -1);-
659 imagePainter.setBrush(opt->palette.mid().color());-
660 imagePainter.setPen(opt->palette.mid().color());-
661 }
never executed: end of block
0
662-
663 imagePainter.drawPolygon(a);-
664 imagePainter.end();-
665 pixmap = QPixmap::fromImage(image);-
666 QPixmapCache::insert(pixmapName, pixmap);-
667 }
never executed: end of block
0
668 int xOffset = r.x() + (r.width() - size)/2;-
669 int yOffset = r.y() + (r.height() - size)/2;-
670 p->drawPixmap(xOffset, yOffset, pixmap);-
671 }-
672 break;
never executed: break;
0
673 default
never executed: default:
:
never executed: default:
0
674 break;
never executed: break;
0
675 }-
676}-
677-
678-
679static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton,-
680 const QRect &rect, QPainter *painter, const QWidget *widget = 0)-
681{-
682 QStyle::PrimitiveElement pe;-
683 switch (toolbutton->arrowType) {-
684 case
never executed: case Qt::LeftArrow:
Qt::LeftArrow:
never executed: case Qt::LeftArrow:
0
685 pe = QStyle::PE_IndicatorArrowLeft;-
686 break;
never executed: break;
0
687 case
never executed: case Qt::RightArrow:
Qt::RightArrow:
never executed: case Qt::RightArrow:
0
688 pe = QStyle::PE_IndicatorArrowRight;-
689 break;
never executed: break;
0
690 case
never executed: case Qt::UpArrow:
Qt::UpArrow:
never executed: case Qt::UpArrow:
0
691 pe = QStyle::PE_IndicatorArrowUp;-
692 break;
never executed: break;
0
693 case
never executed: case Qt::DownArrow:
Qt::DownArrow:
never executed: case Qt::DownArrow:
0
694 pe = QStyle::PE_IndicatorArrowDown;-
695 break;
never executed: break;
0
696 default
never executed: default:
:
never executed: default:
0
697 return;
never executed: return;
0
698 }-
699 QStyleOption arrowOpt = *toolbutton;-
700 arrowOpt.rect = rect;-
701 style->drawPrimitive(pe, &arrowOpt, painter, widget);-
702}
never executed: end of block
0
703-
704-
705-
706-
707static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth)-
708{-
709 qreal height = 0;-
710 qreal widthUsed = 0;-
711 textLayout.beginLayout();-
712 while (true) {-
713 QTextLine line = textLayout.createLine();-
714 if (!line.isValid()
!line.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
715 break;
never executed: break;
0
716 line.setLineWidth(lineWidth);-
717 line.setPosition(QPointF(0, height));-
718 height += line.height();-
719 widthUsed = qMax(widthUsed, line.naturalTextWidth());-
720 }
never executed: end of block
0
721 textLayout.endLayout();-
722 return
never executed: return QSizeF(widthUsed, height);
QSizeF(widthUsed, height);
never executed: return QSizeF(widthUsed, height);
0
723}-
724-
725QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItem *option, int role) const-
726{-
727 const QWidget *widget = option->widget;-
728 switch (role) {-
729 case
never executed: case Qt::CheckStateRole:
Qt::CheckStateRole:
never executed: case Qt::CheckStateRole:
0
730 if (option->features & QStyleOptionViewItem::HasCheckIndicator
option->featur...CheckIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
731 return
never executed: return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget));
QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget),
never executed: return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget));
0
732 proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget));
never executed: return QSize(proxyStyle->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), proxyStyle->pixelMetric(QStyle::PM_IndicatorHeight, option, widget));
0
733 break;
never executed: break;
0
734 case
never executed: case Qt::DisplayRole:
Qt::DisplayRole:
never executed: case Qt::DisplayRole:
0
735 if (option->features & QStyleOptionViewItem::HasDisplay
option->featur...em::HasDisplayDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
736 QTextOption textOption;-
737 textOption.setWrapMode(QTextOption::WordWrap);-
738 QTextLayout textLayout(option->text, option->font);-
739 textLayout.setTextOption(textOption);-
740 const bool wrapText = option->features & QStyleOptionViewItem::WrapText;-
741 const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1;-
742 QRect bounds = option->rect;-
743 switch (option->decorationPosition) {-
744 case
never executed: case QStyleOptionViewItem::Left:
QStyleOptionViewItem::Left:
never executed: case QStyleOptionViewItem::Left:
0
745 case
never executed: case QStyleOptionViewItem::Right:
QStyleOptionViewItem::Right:
never executed: case QStyleOptionViewItem::Right:
0
746 bounds.setWidth(wrapText && bounds.isValid() ? bounds.width() - 2 * textMargin : (2147483647/256));-
747 break;
never executed: break;
0
748 case
never executed: case QStyleOptionViewItem::Top:
QStyleOptionViewItem::Top:
never executed: case QStyleOptionViewItem::Top:
0
749 case
never executed: case QStyleOptionViewItem::Bottom:
QStyleOptionViewItem::Bottom:
never executed: case QStyleOptionViewItem::Bottom:
0
750 if (wrapText
wrapTextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
751 bounds.setWidth(bounds.isValid() ? bounds.width() - 2 * textMargin : option->decorationSize.width());
never executed: bounds.setWidth(bounds.isValid() ? bounds.width() - 2 * textMargin : option->decorationSize.width());
0
752 else-
753 bounds.setWidth((2147483647/256));
never executed: bounds.setWidth((2147483647/256));
0
754 break;
never executed: break;
0
755 default
never executed: default:
:
never executed: default:
0
756 break;
never executed: break;
0
757 }-
758-
759 const int lineWidth = bounds.width();-
760 const QSizeF size = viewItemTextLayout(textLayout, lineWidth);-
761 return
never executed: return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height()));
QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height()));
never executed: return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height()));
0
762 }-
763 break;
never executed: break;
0
764 case
never executed: case Qt::DecorationRole:
Qt::DecorationRole:
never executed: case Qt::DecorationRole:
0
765 if (option->features & QStyleOptionViewItem::HasDecoration
option->featur...:HasDecorationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
766 return
never executed: return option->decorationSize;
option->decorationSize;
never executed: return option->decorationSize;
0
767 }-
768 break;
never executed: break;
0
769 default
never executed: default:
:
never executed: default:
0
770 break;
never executed: break;
0
771 }-
772-
773 return
never executed: return QSize(0, 0);
QSize(0, 0);
never executed: return QSize(0, 0);
0
774}-
775-
776void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewItem *option, const QRect &rect) const-
777{-
778 const QWidget *widget = option->widget;-
779 const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1;-
780-
781 QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0);-
782 const bool wrapText = option->features & QStyleOptionViewItem::WrapText;-
783 QTextOption textOption;-
784 textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap);-
785 textOption.setTextDirection(option->direction);-
786 textOption.setAlignment(QStyle::visualAlignment(option->direction, option->displayAlignment));-
787 QTextLayout textLayout(option->text, option->font);-
788 textLayout.setTextOption(textOption);-
789-
790 viewItemTextLayout(textLayout, textRect.width());-
791-
792 QString elidedText;-
793 qreal height = 0;-
794 qreal width = 0;-
795 int elidedIndex = -1;-
796 const int lineCount = textLayout.lineCount();-
797 for (int j = 0; j < lineCount
j < lineCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++j) {
0
798 const QTextLine line = textLayout.lineAt(j);-
799 if (j + 1 <= lineCount - 1
j + 1 <= lineCount - 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
800 const QTextLine nextLine = textLayout.lineAt(j + 1);-
801 if ((
(nextLine.y() ...tRect.height()Description
TRUEnever evaluated
FALSEnever evaluated
nextLine.y() + nextLine.height()) > textRect.height()
(nextLine.y() ...tRect.height()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
802 int start = line.textStart();-
803 int length = line.textLength() + nextLine.textLength();-
804 const QStackTextEngine engine(textLayout.text().mid(start, length), option->font);-
805 elidedText = engine.elidedText(option->textElideMode, textRect.width());-
806 height += line.height();-
807 width = textRect.width();-
808 elidedIndex = j;-
809 break;
never executed: break;
0
810 }-
811 }
never executed: end of block
0
812 if (line.naturalTextWidth() > textRect.width()
line.naturalTe...xtRect.width()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
813 int start = line.textStart();-
814 int length = line.textLength();-
815 const QStackTextEngine engine(textLayout.text().mid(start, length), option->font);-
816 elidedText = engine.elidedText(option->textElideMode, textRect.width());-
817 height += line.height();-
818 width = textRect.width();-
819 elidedIndex = j;-
820 break;
never executed: break;
0
821 }-
822 width = qMax<qreal>(width, line.width());-
823 height += line.height();-
824 }
never executed: end of block
0
825-
826 const QRect layoutRect = QStyle::alignedRect(option->direction, option->displayAlignment,-
827 QSize(int(width), int(height)), textRect);-
828 const QPointF position = layoutRect.topLeft();-
829 for (int i = 0; i < lineCount
i < lineCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
830 const QTextLine line = textLayout.lineAt(i);-
831 if (i == elidedIndex
i == elidedIndexDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
832 qreal x = position.x() + line.x();-
833 qreal y = position.y() + line.y() + line.ascent();-
834 p->save();-
835 p->setFont(option->font);-
836 p->drawText(QPointF(x, y), elidedText);-
837 p->restore();-
838 break;
never executed: break;
0
839 }-
840 line.draw(p, position);-
841 }
never executed: end of block
0
842}
never executed: end of block
0
843void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItem *opt, QRect *checkRect,-
844 QRect *pixmapRect, QRect *textRect, bool sizehint) const-
845{-
846 ((!(checkRect && pixmapRect && textRect)) ? qt_assert("checkRect && pixmapRect && textRect",__FILE__,962) : qt_noop());-
847 *pixmapRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DecorationRole));-
848 *textRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::DisplayRole));-
849 *checkRect = QRect(QPoint(0, 0), viewItemSize(opt, Qt::CheckStateRole));-
850-
851 const QWidget *widget = opt->widget;-
852 const bool hasCheck = checkRect->isValid();-
853 const bool hasPixmap = pixmapRect->isValid();-
854 const bool hasText = textRect->isValid();-
855 const int textMargin = hasText
hasTextDescription
TRUEnever evaluated
FALSEnever evaluated
? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0;
0
856 const int pixmapMargin = hasPixmap
hasPixmapDescription
TRUEnever evaluated
FALSEnever evaluated
? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0;
0
857 const int checkMargin = hasCheck
hasCheckDescription
TRUEnever evaluated
FALSEnever evaluated
? proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, widget) + 1 : 0;
0
858 int x = opt->rect.left();-
859 int y = opt->rect.top();-
860 int w, h;-
861-
862 if (textRect->height() == 0
textRect->height() == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& (!hasPixmap
!hasPixmapDescription
TRUEnever evaluated
FALSEnever evaluated
|| !sizehint
!sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
863-
864 textRect->setHeight(opt->fontMetrics.height());-
865 }
never executed: end of block
0
866-
867 QSize pm(0, 0);-
868 if (hasPixmap
hasPixmapDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
869 pm = pixmapRect->size();-
870 pm.rwidth() += 2 * pixmapMargin;-
871 }
never executed: end of block
0
872 if (sizehint
sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
873 h = qMax(checkRect->height(), qMax(textRect->height(), pm.height()));-
874 if (opt->decorationPosition == QStyleOptionViewItem::Left
opt->decoratio...ViewItem::LeftDescription
TRUEnever evaluated
FALSEnever evaluated
0
875 || opt->decorationPosition == QStyleOptionViewItem::Right
opt->decoratio...iewItem::RightDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
876 w = textRect->width() + pm.width();-
877 }
never executed: end of block
else {
0
878 w = qMax(textRect->width(), pm.width());-
879 }
never executed: end of block
0
880 } else {-
881 w = opt->rect.width();-
882 h = opt->rect.height();-
883 }
never executed: end of block
0
884-
885 int cw = 0;-
886 QRect check;-
887 if (hasCheck
hasCheckDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
888 cw = checkRect->width() + 2 * checkMargin;-
889 if (sizehint
sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
) w += cw;
never executed: w += cw;
0
890 if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
891 check.setRect(x + w - cw, y, cw, h);-
892 }
never executed: end of block
else {
0
893 check.setRect(x, y, cw, h);-
894 }
never executed: end of block
0
895 }-
896-
897 QRect display;-
898 QRect decoration;-
899 switch (opt->decorationPosition) {-
900 case
never executed: case QStyleOptionViewItem::Top:
QStyleOptionViewItem::Top:
never executed: case QStyleOptionViewItem::Top:
{
0
901 if (hasPixmap
hasPixmapDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
902 pm.setHeight(pm.height() + pixmapMargin);
never executed: pm.setHeight(pm.height() + pixmapMargin);
0
903 h = sizehint
sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
? textRect->height() : h - pm.height();
0
904-
905 if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
906 decoration.setRect(x, y, w - cw, pm.height());-
907 display.setRect(x, y + pm.height(), w - cw, h);-
908 }
never executed: end of block
else {
0
909 decoration.setRect(x + cw, y, w - cw, pm.height());-
910 display.setRect(x + cw, y + pm.height(), w - cw, h);-
911 }
never executed: end of block
0
912 break;
never executed: break;
}
0
913 case
never executed: case QStyleOptionViewItem::Bottom:
QStyleOptionViewItem::Bottom:
never executed: case QStyleOptionViewItem::Bottom:
{
0
914 if (hasText
hasTextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
915 textRect->setHeight(textRect->height() + textMargin);
never executed: textRect->setHeight(textRect->height() + textMargin);
0
916 h = sizehint
sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
? textRect->height() + pm.height() : h;
0
917-
918 if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
919 display.setRect(x, y, w - cw, textRect->height());-
920 decoration.setRect(x, y + textRect->height(), w - cw, h - textRect->height());-
921 }
never executed: end of block
else {
0
922 display.setRect(x + cw, y, w - cw, textRect->height());-
923 decoration.setRect(x + cw, y + textRect->height(), w - cw, h - textRect->height());-
924 }
never executed: end of block
0
925 break;
never executed: break;
}
0
926 case
never executed: case QStyleOptionViewItem::Left:
QStyleOptionViewItem::Left:
never executed: case QStyleOptionViewItem::Left:
{
0
927 if (opt->direction == Qt::LeftToRight
opt->direction...t::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
928 decoration.setRect(x + cw, y, pm.width(), h);-
929 display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h);-
930 }
never executed: end of block
else {
0
931 display.setRect(x, y, w - pm.width() - cw, h);-
932 decoration.setRect(display.right() + 1, y, pm.width(), h);-
933 }
never executed: end of block
0
934 break;
never executed: break;
}
0
935 case
never executed: case QStyleOptionViewItem::Right:
QStyleOptionViewItem::Right:
never executed: case QStyleOptionViewItem::Right:
{
0
936 if (opt->direction == Qt::LeftToRight
opt->direction...t::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
937 display.setRect(x + cw, y, w - pm.width() - cw, h);-
938 decoration.setRect(display.right() + 1, y, pm.width(), h);-
939 }
never executed: end of block
else {
0
940 decoration.setRect(x, y, pm.width(), h);-
941 display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h);-
942 }
never executed: end of block
0
943 break;
never executed: break;
}
0
944 default
never executed: default:
:
never executed: default:
0
945 QMessageLogger(__FILE__, 1061, __PRETTY_FUNCTION__).warning("doLayout: decoration position is invalid");-
946 decoration = *pixmapRect;-
947 break;
never executed: break;
0
948 }-
949-
950 if (!sizehint
!sizehintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
951 *checkRect = QStyle::alignedRect(opt->direction, Qt::AlignCenter,-
952 checkRect->size(), check);-
953 *pixmapRect = QStyle::alignedRect(opt->direction, opt->decorationAlignment,-
954 pixmapRect->size(), decoration);-
955-
956 if (opt->showDecorationSelected
opt->showDecorationSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
957 *
never executed: *textRect = display;
textRect = display;
never executed: *textRect = display;
0
958 else-
959 *
never executed: *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, textRect->size().boundedTo(display.size()), display);
textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment,
never executed: *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, textRect->size().boundedTo(display.size()), display);
0
960 textRect->size().boundedTo(display.size()), display);
never executed: *textRect = QStyle::alignedRect(opt->direction, opt->displayAlignment, textRect->size().boundedTo(display.size()), display);
0
961 } else {-
962 *checkRect = check;-
963 *pixmapRect = decoration;-
964 *textRect = display;-
965 }
never executed: end of block
0
966}-
967void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const-
968{-
969 ((!(textRect)) ? qt_assert("textRect",__FILE__,1094) : qt_noop());-
970 ((!(iconRect)) ? qt_assert("iconRect",__FILE__,1095) : qt_noop());-
971 QRect tr = opt->rect;-
972 bool verticalTabs = opt->shape == QTabBar::RoundedEast
opt->shape == ...r::RoundedEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
973 || opt->shape == QTabBar::RoundedWest
opt->shape == ...r::RoundedWestDescription
TRUEnever evaluated
FALSEnever evaluated
0
974 || opt->shape == QTabBar::TriangularEast
opt->shape == ...TriangularEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
975 || opt->shape == QTabBar::TriangularWest
opt->shape == ...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
976 if (verticalTabs
verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
977 tr.setRect(0, 0, tr.height(), tr.width());
never executed: tr.setRect(0, 0, tr.height(), tr.width());
0
978-
979 int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget);-
980 int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget);-
981 int hpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;-
982 int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2;-
983 if (opt->shape == QTabBar::RoundedSouth
opt->shape == ...::RoundedSouthDescription
TRUEnever evaluated
FALSEnever evaluated
|| opt->shape == QTabBar::TriangularSouth
opt->shape == ...riangularSouthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
984 verticalShift = -verticalShift;
never executed: verticalShift = -verticalShift;
0
985 tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding);-
986 bool selected = opt->state & QStyle::State_Selected;-
987 if (selected
selectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
988 tr.setTop(tr.top() - verticalShift);-
989 tr.setRight(tr.right() - horizontalShift);-
990 }
never executed: end of block
0
991-
992-
993 if (!opt->leftButtonSize.isEmpty()
!opt->leftButtonSize.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
994 tr.setLeft(tr.left() + 4 +-
995 (verticalTabs ? opt->leftButtonSize.height() : opt->leftButtonSize.width()));-
996 }
never executed: end of block
0
997-
998 if (!opt->rightButtonSize.isEmpty()
!opt->rightBut...Size.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
999 tr.setRight(tr.right() - 4 --
1000 (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width()));-
1001 }
never executed: end of block
0
1002-
1003-
1004 if (!opt->icon.isNull()
!opt->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1005 QSize iconSize = opt->iconSize;-
1006 if (!iconSize.isValid()
!iconSize.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1007 int iconExtent = proxyStyle->pixelMetric(QStyle::PM_SmallIconSize);-
1008 iconSize = QSize(iconExtent, iconExtent);-
1009 }
never executed: end of block
0
1010 QSize tabIconSize = opt->icon.actualSize(iconSize,-
1011 (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled,-
1012 (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off );-
1013-
1014 tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height()));-
1015-
1016 *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2,-
1017 tabIconSize.width(), tabIconSize .height());-
1018 if (!verticalTabs
!verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1019 *
never executed: *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
never executed: *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
0
1020 tr.setLeft(tr.left() + tabIconSize.width() + 4);-
1021 }
never executed: end of block
0
1022-
1023 if (!verticalTabs
!verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1024 tr = proxyStyle->visualRect(opt->direction, opt->rect, tr);
never executed: tr = proxyStyle->visualRect(opt->direction, opt->rect, tr);
0
1025-
1026 *textRect = tr;-
1027}
never executed: end of block
0
1028-
1029-
1030-
1031-
1032QList<const QObject*> QCommonStylePrivate::animationTargets() const-
1033{-
1034 return
never executed: return animations.keys();
animations.keys();
never executed: return animations.keys();
0
1035}-
1036-
1037-
1038QStyleAnimation * QCommonStylePrivate::animation(const QObject *target) const-
1039{-
1040 return
never executed: return animations.value(target);
animations.value(target);
never executed: return animations.value(target);
0
1041}-
1042-
1043-
1044void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const-
1045{-
1046 const QCommonStyle * const q = q_func();-
1047 stopAnimation(animation->target());-
1048 q->connect(animation, qFlagLocation("2""destroyed()" "\0" __FILE__ ":" "1173"), qFlagLocation("1""_q_removeAnimation()" "\0" __FILE__ ":" "1173"), Qt::UniqueConnection);-
1049 animations.insert(animation->target(), animation);-
1050 animation->start();-
1051}
never executed: end of block
0
1052-
1053-
1054void QCommonStylePrivate::stopAnimation(const QObject *target) const-
1055{-
1056 QStyleAnimation *animation = animations.take(target);-
1057 if (animation
animationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1058 animation->stop();-
1059 delete animation;-
1060 }
never executed: end of block
0
1061}
never executed: end of block
0
1062-
1063-
1064void QCommonStylePrivate::_q_removeAnimation()-
1065{-
1066 QCommonStyle * const q = q_func();-
1067 QObject *animation = q->sender();-
1068 if (animation
animationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1069 animations.remove(animation->parent());
never executed: animations.remove(animation->parent());
0
1070}
never executed: end of block
0
1071-
1072-
1073-
1074-
1075-
1076void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,-
1077 QPainter *p, const QWidget *widget) const-
1078{-
1079 const QCommonStylePrivate * const d = d_func();-
1080 switch (element) {-
1081-
1082 case
never executed: case CE_PushButton:
CE_PushButton:
never executed: case CE_PushButton:
0
1083 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1084 proxy()->drawControl(CE_PushButtonBevel, btn, p, widget);-
1085 QStyleOptionButton subopt = *btn;-
1086 subopt.rect = subElementRect(SE_PushButtonContents, btn, widget);-
1087 proxy()->drawControl(CE_PushButtonLabel, &subopt, p, widget);-
1088 if (btn->state & State_HasFocus
btn->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1089 QStyleOptionFocusRect fropt;-
1090 fropt.QStyleOption::operator=(*btn);-
1091 fropt.rect = subElementRect(SE_PushButtonFocusRect, btn, widget);-
1092 proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);-
1093 }
never executed: end of block
0
1094 }
never executed: end of block
0
1095 break;
never executed: break;
0
1096 case
never executed: case CE_PushButtonBevel:
CE_PushButtonBevel:
never executed: case CE_PushButtonBevel:
0
1097 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1098 QRect br = btn->rect;-
1099 int dbi = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);-
1100 if (btn->features & QStyleOptionButton::DefaultButton
btn->features ...:DefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1101 proxy()->drawPrimitive(PE_FrameDefaultButton, opt, p, widget);
never executed: proxy()->drawPrimitive(PE_FrameDefaultButton, opt, p, widget);
0
1102 if (btn->features & QStyleOptionButton::AutoDefaultButton
btn->features ...oDefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1103 br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi);
never executed: br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi);
0
1104 if (!(btn->features & (QStyleOptionButton::Flat | QStyleOptionButton::CommandLinkButton))
!(btn->feature...ndLinkButton))Description
TRUEnever evaluated
FALSEnever evaluated
0
1105 || btn->state & (State_Sunken | State_On)
btn->state & (...en | State_On)Description
TRUEnever evaluated
FALSEnever evaluated
0
1106 || (btn->features & QStyleOptionButton::CommandLinkButton
btn->features ...mandLinkButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& btn->state & State_MouseOver
btn->state & State_MouseOverDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1107 QStyleOptionButton tmpBtn = *btn;-
1108 tmpBtn.rect = br;-
1109 proxy()->drawPrimitive(PE_PanelButtonCommand, &tmpBtn, p, widget);-
1110 }
never executed: end of block
0
1111 if (btn->features & QStyleOptionButton::HasMenu
btn->features ...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1112 int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, btn, widget);-
1113 QRect ir = btn->rect;-
1114 QStyleOptionButton newBtn = *btn;-
1115 newBtn.rect = QRect(ir.right() - mbi + 2, ir.height()/2 - mbi/2 + 3, mbi - 6, mbi - 6);-
1116 proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget);-
1117 }
never executed: end of block
0
1118 }
never executed: end of block
0
1119 break;
never executed: break;
0
1120 case
never executed: case CE_PushButtonLabel:
CE_PushButtonLabel:
never executed: case CE_PushButtonLabel:
0
1121 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1122 QRect textRect = button->rect;-
1123 uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic;-
1124 if (!proxy()->styleHint(SH_UnderlineShortcut, button, widget)
!proxy()->styl...utton, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1125 tf |= Qt::TextHideMnemonic;
never executed: tf |= Qt::TextHideMnemonic;
0
1126-
1127 if (!button->icon.isNull()
!button->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1128-
1129 QRect iconRect;-
1130 QIcon::Mode mode = button->state & State_Enabled
button->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Normal : QIcon::Disabled;
0
1131 if (mode == QIcon::Normal
mode == QIcon::NormalDescription
TRUEnever evaluated
FALSEnever evaluated
&& button->state & State_HasFocus
button->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1132 mode = QIcon::Active;
never executed: mode = QIcon::Active;
0
1133 QIcon::State state = QIcon::Off;-
1134 if (button->state & State_On
button->state & State_OnDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1135 state = QIcon::On;
never executed: state = QIcon::On;
0
1136-
1137 QPixmap pixmap = button->icon.pixmap(qt_getWindow(widget), button->iconSize, mode, state);-
1138-
1139 int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio();-
1140 int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio();-
1141 int labelWidth = pixmapWidth;-
1142 int labelHeight = pixmapHeight;-
1143 int iconSpacing = 4;-
1144 int textWidth = button->fontMetrics.boundingRect(opt->rect, tf, button->text).width();-
1145 if (!button->text.isEmpty()
!button->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1146 labelWidth += (textWidth + iconSpacing);
never executed: labelWidth += (textWidth + iconSpacing);
0
1147-
1148 iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2,-
1149 textRect.y() + (textRect.height() - labelHeight) / 2,-
1150 pixmapWidth, pixmapHeight);-
1151-
1152 iconRect = visualRect(button->direction, textRect, iconRect);-
1153-
1154 tf |= Qt::AlignLeft;-
1155-
1156 if (button->direction == Qt::RightToLeft
button->direct...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1157 textRect.setRight(iconRect.left() - iconSpacing);
never executed: textRect.setRight(iconRect.left() - iconSpacing);
0
1158 else-
1159 textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing);
never executed: textRect.setLeft(iconRect.left() + iconRect.width() + iconSpacing);
0
1160-
1161 if (button->state & (State_On | State_Sunken)
button->state ... State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1162 iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget),
never executed: iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
0
1163 proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
never executed: iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
0
1164 p->drawPixmap(iconRect, pixmap);-
1165 }
never executed: end of block
else {
0
1166 tf |= Qt::AlignHCenter;-
1167 }
never executed: end of block
0
1168 if (button->state & (State_On | State_Sunken)
button->state ... State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1169 textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget),
never executed: textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
0
1170 proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
never executed: textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, opt, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, opt, widget));
0
1171-
1172 if (button->features & QStyleOptionButton::HasMenu
button->featur...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1173 int indicatorSize = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget);-
1174 if (button->direction == Qt::LeftToRight
button->direct...t::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1175 textRect = textRect.adjusted(0, 0, -indicatorSize, 0);
never executed: textRect = textRect.adjusted(0, 0, -indicatorSize, 0);
0
1176 else-
1177 textRect = textRect.adjusted(indicatorSize, 0, 0, 0);
never executed: textRect = textRect.adjusted(indicatorSize, 0, 0, 0);
0
1178 }-
1179 proxy()->drawItemText(p, textRect, tf, button->palette, (button->state & State_Enabled),-
1180 button->text, QPalette::ButtonText);-
1181 }
never executed: end of block
0
1182 break;
never executed: break;
0
1183 case
never executed: case CE_RadioButton:
CE_RadioButton:
never executed: case CE_RadioButton:
0
1184 case
never executed: case CE_CheckBox:
CE_CheckBox:
never executed: case CE_CheckBox:
0
1185 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1186 bool isRadio = (element == CE_RadioButton);-
1187 QStyleOptionButton subopt = *btn;-
1188 subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator-
1189 : SE_CheckBoxIndicator, btn, widget);-
1190 proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox,-
1191 &subopt, p, widget);-
1192 subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents-
1193 : SE_CheckBoxContents, btn, widget);-
1194 proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, widget);-
1195 if (btn->state & State_HasFocus
btn->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1196 QStyleOptionFocusRect fropt;-
1197 fropt.QStyleOption::operator=(*btn);-
1198 fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect-
1199 : SE_CheckBoxFocusRect, btn, widget);-
1200 proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);-
1201 }
never executed: end of block
0
1202 }
never executed: end of block
0
1203 break;
never executed: break;
0
1204 case
never executed: case CE_RadioButtonLabel:
CE_RadioButtonLabel:
never executed: case CE_RadioButtonLabel:
0
1205 case
never executed: case CE_CheckBoxLabel:
CE_CheckBoxLabel:
never executed: case CE_CheckBoxLabel:
0
1206 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1207 uint alignment = visualAlignment(btn->direction, Qt::AlignLeft | Qt::AlignVCenter);-
1208-
1209 if (!proxy()->styleHint(SH_UnderlineShortcut, btn, widget)
!proxy()->styl..., btn, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1210 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1211 QPixmap pix;-
1212 QRect textRect = btn->rect;-
1213 if (!btn->icon.isNull()
!btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1214 pix = btn->icon.pixmap(qt_getWindow(widget), btn->iconSize, btn->state & State_Enabled ? QIcon::Normal : QIcon::Disabled);-
1215 proxy()->drawItemPixmap(p, btn->rect, alignment, pix);-
1216 if (btn->direction == Qt::RightToLeft
btn->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1217 textRect.setRight(textRect.right() - btn->iconSize.width() - 4);
never executed: textRect.setRight(textRect.right() - btn->iconSize.width() - 4);
0
1218 else-
1219 textRect.setLeft(textRect.left() + btn->iconSize.width() + 4);
never executed: textRect.setLeft(textRect.left() + btn->iconSize.width() + 4);
0
1220 }-
1221 if (!btn->text.isEmpty()
!btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
){
0
1222 proxy()->drawItemText(p, textRect, alignment | Qt::TextShowMnemonic,-
1223 btn->palette, btn->state & State_Enabled, btn->text, QPalette::WindowText);-
1224 }
never executed: end of block
0
1225 }
never executed: end of block
0
1226 break;
never executed: break;
0
1227-
1228 case
never executed: case CE_MenuScroller:
CE_MenuScroller:
never executed: case CE_MenuScroller:
{
0
1229 QStyleOption arrowOpt = *opt;-
1230 arrowOpt.state |= State_Enabled;-
1231 proxy()->drawPrimitive(((opt->state & State_DownArrow) ? PE_IndicatorArrowDown : PE_IndicatorArrowUp),-
1232 &arrowOpt, p, widget);-
1233 break;
never executed: break;
}
0
1234 case
never executed: case CE_MenuTearoff:
CE_MenuTearoff:
never executed: case CE_MenuTearoff:
0
1235 if (opt->state & State_Selected
opt->state & State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1236 p->fillRect(opt->rect, opt->palette.brush(QPalette::Highlight));
never executed: p->fillRect(opt->rect, opt->palette.brush(QPalette::Highlight));
0
1237 else-
1238 p->fillRect(opt->rect, opt->palette.brush(QPalette::Button));
never executed: p->fillRect(opt->rect, opt->palette.brush(QPalette::Button));
0
1239 p->setPen(QPen(opt->palette.dark().color(), 1, Qt::DashLine));-
1240 p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2 - 1,-
1241 opt->rect.x() + opt->rect.width() - 4,-
1242 opt->rect.y() + opt->rect.height() / 2 - 1);-
1243 p->setPen(QPen(opt->palette.light().color(), 1, Qt::DashLine));-
1244 p->drawLine(opt->rect.x() + 2, opt->rect.y() + opt->rect.height() / 2,-
1245 opt->rect.x() + opt->rect.width() - 4, opt->rect.y() + opt->rect.height() / 2);-
1246 break;
never executed: break;
0
1247-
1248-
1249 case
never executed: case CE_MenuBarItem:
CE_MenuBarItem:
never executed: case CE_MenuBarItem:
0
1250 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1251 uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip-
1252 | Qt::TextSingleLine;-
1253 if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget)
!proxy()->styl..., mbi, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1254 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1255 int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);-
1256 QPixmap pix = mbi->icon.pixmap(qt_getWindow(widget), QSize(iconExtent, iconExtent), (mbi->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled);-
1257 if (!pix.isNull()
!pix.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1258 proxy()->drawItemPixmap(p,mbi->rect, alignment, pix);
never executed: proxy()->drawItemPixmap(p,mbi->rect, alignment, pix);
0
1259 else-
1260 proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled,
never executed: proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, QPalette::ButtonText);
0
1261 mbi->text, QPalette::ButtonText);
never executed: proxy()->drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, QPalette::ButtonText);
0
1262 }-
1263 break;
never executed: break;
0
1264 case
never executed: case CE_MenuBarEmptyArea:
CE_MenuBarEmptyArea:
never executed: case CE_MenuBarEmptyArea:
0
1265 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget->testAttribute(Qt::WA_NoSystemBackground)
!widget->testA...temBackground)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1266 p->eraseRect(opt->rect);
never executed: p->eraseRect(opt->rect);
0
1267 break;
never executed: break;
0
1268-
1269-
1270 case
never executed: case CE_ProgressBar:
CE_ProgressBar:
never executed: case CE_ProgressBar:
0
1271 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
0
1272 = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1273 QStyleOptionProgressBar subopt = *pb;-
1274 subopt.rect = subElementRect(SE_ProgressBarGroove, pb, widget);-
1275 proxy()->drawControl(CE_ProgressBarGroove, &subopt, p, widget);-
1276 subopt.rect = subElementRect(SE_ProgressBarContents, pb, widget);-
1277 proxy()->drawControl(CE_ProgressBarContents, &subopt, p, widget);-
1278 if (pb->textVisible
pb->textVisibleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1279 subopt.rect = subElementRect(SE_ProgressBarLabel, pb, widget);-
1280 proxy()->drawControl(CE_ProgressBarLabel, &subopt, p, widget);-
1281 }
never executed: end of block
0
1282 }
never executed: end of block
0
1283 break;
never executed: break;
0
1284 case
never executed: case CE_ProgressBarGroove:
CE_ProgressBarGroove:
never executed: case CE_ProgressBarGroove:
0
1285 if (opt->rect.isValid()
opt->rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1286 qDrawShadePanel(p, opt->rect, opt->palette, true, 1,
never executed: qDrawShadePanel(p, opt->rect, opt->palette, true, 1, &opt->palette.brush(QPalette::Window));
0
1287 &opt->palette.brush(QPalette::Window));
never executed: qDrawShadePanel(p, opt->rect, opt->palette, true, 1, &opt->palette.brush(QPalette::Window));
0
1288 break;
never executed: break;
0
1289 case
never executed: case CE_ProgressBarLabel:
CE_ProgressBarLabel:
never executed: case CE_ProgressBarLabel:
0
1290 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1291 const bool vertical = pb->orientation == Qt::Vertical;-
1292 if (!vertical
!verticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1293 QPalette::ColorRole textRole = QPalette::NoRole;-
1294 if ((
(pb->textAlign...::AlignCenter)Description
TRUEnever evaluated
FALSEnever evaluated
pb->textAlignment & Qt::AlignCenter)
(pb->textAlign...::AlignCenter)Description
TRUEnever evaluated
FALSEnever evaluated
&& pb->textVisible
pb->textVisibleDescription
TRUEnever evaluated
FALSEnever evaluated
0
1295 && ((
((qint64(pb->p...pb->minimum)))Description
TRUEnever evaluated
FALSEnever evaluated
qint64(pb->progress) - qint64(pb->minimum)) * 2 >= (qint64(pb->maximum) - qint64(pb->minimum)))
((qint64(pb->p...pb->minimum)))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1296 textRole = QPalette::HighlightedText;-
1297-
1298 QRect shadowRect(pb->rect);-
1299 shadowRect.translate(1,1);-
1300 QColor shadowColor = (
(pb->palette.c...alue() <= 128)Description
TRUEnever evaluated
FALSEnever evaluated
pb->palette.color(textRole).value() <= 128)
(pb->palette.c...alue() <= 128)Description
TRUEnever evaluated
FALSEnever evaluated
0
1301 ? QColor(255,255,255,160) : QColor(0,0,0,160);-
1302 QPalette shadowPalette = pb->palette;-
1303 shadowPalette.setColor(textRole, shadowColor);-
1304 proxy()->drawItemText(p, shadowRect, Qt::AlignCenter | Qt::TextSingleLine, shadowPalette,-
1305 pb->state & State_Enabled, pb->text, textRole);-
1306 }
never executed: end of block
0
1307 proxy()->drawItemText(p, pb->rect, Qt::AlignCenter | Qt::TextSingleLine, pb->palette,-
1308 pb->state & State_Enabled, pb->text, textRole);-
1309 }
never executed: end of block
0
1310 }
never executed: end of block
0
1311 break;
never executed: break;
0
1312 case
never executed: case CE_ProgressBarContents:
CE_ProgressBarContents:
never executed: case CE_ProgressBarContents:
0
1313 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1314-
1315 QRect rect = pb->rect;-
1316 const bool vertical = pb->orientation == Qt::Vertical;-
1317 const bool inverted = pb->invertedAppearance;-
1318 qint64 minimum = qint64(pb->minimum);-
1319 qint64 maximum = qint64(pb->maximum);-
1320 qint64 progress = qint64(pb->progress);-
1321-
1322 QMatrix m;-
1323-
1324 if (vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1325 rect = QRect(rect.y(), rect.x(), rect.height(), rect.width());-
1326 m.rotate(90);-
1327 m.translate(0, -(rect.height() + rect.y()*2));-
1328 }
never executed: end of block
0
1329-
1330 QPalette pal2 = pb->palette;-
1331-
1332 if (pal2.highlight() == pal2.background()
pal2.highlight...2.background()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1333 pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active,
never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight));
0
1334 QPalette::Highlight));
never executed: pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, QPalette::Highlight));
0
1335 bool reverse = ((!vertical
!verticalDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(pb->direction...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
pb->direction == Qt::RightToLeft)
(pb->direction...::RightToLeft)Description
TRUEnever evaluated
FALSEnever evaluated
) || vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1336 if (inverted
invertedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1337 reverse = !reverse;
never executed: reverse = !reverse;
0
1338 int w = rect.width();-
1339 if (pb->minimum == 0
pb->minimum == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& pb->maximum == 0
pb->maximum == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1340-
1341 int x = (progress - minimum) % (w * 2);-
1342 if (x > w
x > wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1343 x = 2 * w - x;
never executed: x = 2 * w - x;
0
1344 x = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? rect.right() - x : x + rect.x();
0
1345 p->setPen(QPen(pal2.highlight().color(), 4));-
1346 p->drawLine(x, rect.y(), x, rect.height());-
1347 }
never executed: end of block
else {
0
1348 const int unit_width = proxy()->pixelMetric(PM_ProgressBarChunkWidth, pb, widget);-
1349 if (!unit_width
!unit_widthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1350 return;
never executed: return;
0
1351-
1352 int u;-
1353 if (unit_width > 1
unit_width > 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1354 u = ((rect.width() + unit_width) / unit_width);
never executed: u = ((rect.width() + unit_width) / unit_width);
0
1355 else-
1356 u = w / unit_width;
never executed: u = w / unit_width;
0
1357 qint64 p_v = progress - minimum;-
1358 qint64 t_s = (
(maximum - minimum)Description
TRUEnever evaluated
FALSEnever evaluated
maximum - minimum)
(maximum - minimum)Description
TRUEnever evaluated
FALSEnever evaluated
? (maximum - minimum) : qint64(1);
0
1359-
1360 if (u > 0
u > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& p_v >= 2147483647 / u
p_v >= 2147483647 / uDescription
TRUEnever evaluated
FALSEnever evaluated
&& t_s >= u
t_s >= uDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1361-
1362 p_v /= u;-
1363 t_s /= u;-
1364 }
never executed: end of block
0
1365-
1366-
1367 int tnu, nu;-
1368 tnu = nu = p_v * u / t_s;-
1369-
1370 if (nu * unit_width > w
nu * unit_width > wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1371 --
never executed: --nu;
nu;
never executed: --nu;
0
1372-
1373-
1374-
1375-
1376-
1377 int x = 0;-
1378 int x0 = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? rect.right() - ((
(unit_width > 1)Description
TRUEnever evaluated
FALSEnever evaluated
unit_width > 1)
(unit_width > 1)Description
TRUEnever evaluated
FALSEnever evaluated
? unit_width : 0)
0
1379 : rect.x();-
1380-
1381 QStyleOptionProgressBar pbBits = *pb;-
1382 pbBits.rect = rect;-
1383 pbBits.palette = pal2;-
1384 int myY = pbBits.rect.y();-
1385 int myHeight = pbBits.rect.height();-
1386 pbBits.state = State_None;-
1387 for (int i = 0; i < nu
i < nuDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1388 pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight);-
1389 pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect();-
1390 proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);-
1391 x += reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? -unit_width : unit_width;
0
1392 }
never executed: end of block
0
1393-
1394-
1395-
1396 if (nu < tnu
nu < tnuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1397 int pixels_left = w - (nu * unit_width);-
1398 int offset = reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? x0 + x + unit_width-pixels_left : x0 + x;
0
1399 pbBits.rect.setRect(offset, myY, pixels_left, myHeight);-
1400 pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect();-
1401 proxy()->drawPrimitive(PE_IndicatorProgressChunk, &pbBits, p, widget);-
1402 }
never executed: end of block
0
1403 }
never executed: end of block
0
1404 }-
1405 break;
never executed: break;
0
1406-
1407 case
never executed: case CE_HeaderLabel:
CE_HeaderLabel:
never executed: case CE_HeaderLabel:
0
1408 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1409 QRect rect = header->rect;-
1410 if (!header->icon.isNull()
!header->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1411 int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);-
1412 QPixmap pixmap-
1413 = header->icon.pixmap(qt_getWindow(widget), QSize(iconExtent, iconExtent), (header->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled);-
1414 int pixw = pixmap.width() / pixmap.devicePixelRatio();-
1415-
1416 QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size() / pixmap.devicePixelRatio(), rect);-
1417 QRect inter = aligned.intersected(rect);-
1418 p->drawPixmap(inter.x(), inter.y(), pixmap,-
1419 inter.x() - aligned.x(), inter.y() - aligned.y(),-
1420 aligned.width() * pixmap.devicePixelRatio(),-
1421 pixmap.height() * pixmap.devicePixelRatio());-
1422-
1423 if (header->direction == Qt::LeftToRight
header->direct...t::LeftToRightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1424 rect.setLeft(rect.left() + pixw + 2);
never executed: rect.setLeft(rect.left() + pixw + 2);
0
1425 else-
1426 rect.setRight(rect.right() - pixw - 2);
never executed: rect.setRight(rect.right() - pixw - 2);
0
1427 }-
1428 if (header->state & QStyle::State_On
header->state ...tyle::State_OnDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1429 QFont fnt = p->font();-
1430 fnt.setBold(true);-
1431 p->setFont(fnt);-
1432 }
never executed: end of block
0
1433 proxy()->drawItemText(p, rect, header->textAlignment, header->palette,-
1434 (header->state & State_Enabled), header->text, QPalette::ButtonText);-
1435 }
never executed: end of block
0
1436 break;
never executed: break;
0
1437-
1438 case
never executed: case CE_ToolButtonLabel:
CE_ToolButtonLabel:
never executed: case CE_ToolButtonLabel:
0
1439 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *toolbutton
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
0
1440 = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1441 QRect rect = toolbutton->rect;-
1442 int shiftX = 0;-
1443 int shiftY = 0;-
1444 if (toolbutton->state & (State_Sunken | State_On)
toolbutton->st...en | State_On)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1445 shiftX = proxy()->pixelMetric(PM_ButtonShiftHorizontal, toolbutton, widget);-
1446 shiftY = proxy()->pixelMetric(PM_ButtonShiftVertical, toolbutton, widget);-
1447 }
never executed: end of block
0
1448-
1449 bool hasArrow = toolbutton->features & QStyleOptionToolButton::Arrow;-
1450 if (((!hasArrow
!hasArrowDescription
TRUEnever evaluated
FALSEnever evaluated
&& toolbutton->icon.isNull()
toolbutton->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) && !toolbutton->text.isEmpty()
!toolbutton->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1451 || toolbutton->toolButtonStyle == Qt::ToolButtonTextOnly
toolbutton->to...ButtonTextOnlyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1452 int alignment = Qt::AlignCenter | Qt::TextShowMnemonic;-
1453 if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)
!proxy()->styl..., opt, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1454 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1455 rect.translate(shiftX, shiftY);-
1456 p->setFont(toolbutton->font);-
1457 proxy()->drawItemText(p, rect, alignment, toolbutton->palette,-
1458 opt->state & State_Enabled, toolbutton->text,-
1459 QPalette::ButtonText);-
1460 }
never executed: end of block
else {
0
1461 QPixmap pm;-
1462 QSize pmSize = toolbutton->iconSize;-
1463 if (!toolbutton->icon.isNull()
!toolbutton->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1464 QIcon::State state = toolbutton->state & State_On
toolbutton->state & State_OnDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::On : QIcon::Off;
0
1465 QIcon::Mode mode;-
1466 if (!(toolbutton->state & State_Enabled)
!(toolbutton->...State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1467 mode = QIcon::Disabled;
never executed: mode = QIcon::Disabled;
0
1468 else if ((
(opt->state & State_MouseOver)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_MouseOver)
(opt->state & State_MouseOver)Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_AutoRaise)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_AutoRaise)
(opt->state & State_AutoRaise)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1469 mode = QIcon::Active;
never executed: mode = QIcon::Active;
0
1470 else-
1471 mode = QIcon::Normal;
never executed: mode = QIcon::Normal;
0
1472 pm = toolbutton->icon.pixmap(qt_getWindow(widget), toolbutton->rect.size().boundedTo(toolbutton->iconSize),-
1473 mode, state);-
1474 pmSize = pm.size() / pm.devicePixelRatio();-
1475 }
never executed: end of block
0
1476-
1477 if (toolbutton->toolButtonStyle != Qt::ToolButtonIconOnly
toolbutton->to...ButtonIconOnlyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1478 p->setFont(toolbutton->font);-
1479 QRect pr = rect,-
1480 tr = rect;-
1481 int alignment = Qt::TextShowMnemonic;-
1482 if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)
!proxy()->styl..., opt, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1483 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1484-
1485 if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon
toolbutton->to...nTextUnderIconDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1486 pr.setHeight(pmSize.height() + 6);-
1487 tr.adjust(0, pr.height() - 1, 0, -1);-
1488 pr.translate(shiftX, shiftY);-
1489 if (!hasArrow
!hasArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1490 proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm);-
1491 }
never executed: end of block
else {
0
1492 drawArrow(proxy(), toolbutton, pr, p, widget);-
1493 }
never executed: end of block
0
1494 alignment |= Qt::AlignCenter;-
1495 }
never executed: end of block
else {
0
1496 pr.setWidth(pmSize.width() + 8);-
1497 tr.adjust(pr.width(), 0, 0, 0);-
1498 pr.translate(shiftX, shiftY);-
1499 if (!hasArrow
!hasArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1500 proxy()->drawItemPixmap(p, QStyle::visualRect(opt->direction, rect, pr), Qt::AlignCenter, pm);-
1501 }
never executed: end of block
else {
0
1502 drawArrow(proxy(), toolbutton, pr, p, widget);-
1503 }
never executed: end of block
0
1504 alignment |= Qt::AlignLeft | Qt::AlignVCenter;-
1505 }
never executed: end of block
0
1506 tr.translate(shiftX, shiftY);-
1507 proxy()->drawItemText(p, QStyle::visualRect(opt->direction, rect, tr), alignment, toolbutton->palette,-
1508 toolbutton->state & State_Enabled, toolbutton->text,-
1509 QPalette::ButtonText);-
1510 }
never executed: end of block
else {
0
1511 rect.translate(shiftX, shiftY);-
1512 if (hasArrow
hasArrowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1513 drawArrow(proxy(), toolbutton, rect, p, widget);-
1514 }
never executed: end of block
else {
0
1515 proxy()->drawItemPixmap(p, rect, Qt::AlignCenter, pm);-
1516 }
never executed: end of block
0
1517 }-
1518 }-
1519 }-
1520 break;
never executed: break;
0
1521-
1522-
1523 case
never executed: case CE_ToolBoxTab:
CE_ToolBoxTab:
never executed: case CE_ToolBoxTab:
0
1524 if (const
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1525 proxy()->drawControl(CE_ToolBoxTabShape, tb, p, widget);-
1526 proxy()->drawControl(CE_ToolBoxTabLabel, tb, p, widget);-
1527 }
never executed: end of block
0
1528 break;
never executed: break;
0
1529 case
never executed: case CE_ToolBoxTabShape:
CE_ToolBoxTabShape:
never executed: case CE_ToolBoxTabShape:
0
1530 if (const
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1531 p->setPen(tb->palette.mid().color().darker(150));-
1532 bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);-
1533 p->setRenderHint(QPainter::Qt4CompatiblePainting);-
1534 int d = 20 + tb->rect.height() - 3;-
1535 if (tb->direction != Qt::RightToLeft
tb->direction ...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1536 const QPoint points[] = {-
1537 QPoint(-1, tb->rect.height() + 1),-
1538 QPoint(-1, 1),-
1539 QPoint(tb->rect.width() - d, 1),-
1540 QPoint(tb->rect.width() - 20, tb->rect.height() - 2),-
1541 QPoint(tb->rect.width() - 1, tb->rect.height() - 2),-
1542 QPoint(tb->rect.width() - 1, tb->rect.height() + 1),-
1543 QPoint(-1, tb->rect.height() + 1),-
1544 };-
1545 p->drawPolygon(points, sizeof points / sizeof *points);-
1546 }
never executed: end of block
else {
0
1547 const QPoint points[] = {-
1548 QPoint(tb->rect.width(), tb->rect.height() + 1),-
1549 QPoint(tb->rect.width(), 1),-
1550 QPoint(d - 1, 1),-
1551 QPoint(20 - 1, tb->rect.height() - 2),-
1552 QPoint(0, tb->rect.height() - 2),-
1553 QPoint(0, tb->rect.height() + 1),-
1554 QPoint(tb->rect.width(), tb->rect.height() + 1),-
1555 };-
1556 p->drawPolygon(points, sizeof points / sizeof *points);-
1557 }
never executed: end of block
0
1558 p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);-
1559 p->setPen(tb->palette.light().color());-
1560 if (tb->direction != Qt::RightToLeft
tb->direction ...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1561 p->drawLine(0, 2, tb->rect.width() - d, 2);-
1562 p->drawLine(tb->rect.width() - d - 1, 2, tb->rect.width() - 21, tb->rect.height() - 1);-
1563 p->drawLine(tb->rect.width() - 20, tb->rect.height() - 1,-
1564 tb->rect.width(), tb->rect.height() - 1);-
1565 }
never executed: end of block
else {
0
1566 p->drawLine(tb->rect.width() - 1, 2, d - 1, 2);-
1567 p->drawLine(d, 2, 20, tb->rect.height() - 1);-
1568 p->drawLine(19, tb->rect.height() - 1,-
1569 -1, tb->rect.height() - 1);-
1570 }
never executed: end of block
0
1571 p->setBrush(Qt::NoBrush);-
1572 }
never executed: end of block
0
1573 break;
never executed: break;
0
1574-
1575-
1576 case
never executed: case CE_TabBarTab:
CE_TabBarTab:
never executed: case CE_TabBarTab:
0
1577 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1578 proxy()->drawControl(CE_TabBarTabShape, tab, p, widget);-
1579 proxy()->drawControl(CE_TabBarTabLabel, tab, p, widget);-
1580 }
never executed: end of block
0
1581 break;
never executed: break;
0
1582 case
never executed: case CE_TabBarTabShape:
CE_TabBarTabShape:
never executed: case CE_TabBarTabShape:
0
1583 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1584 p->save();-
1585-
1586 QRect rect(tab->rect);-
1587 bool selected = tab->state & State_Selected;-
1588 bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab;-
1589 int tabOverlap = onlyOne
onlyOneDescription
TRUEnever evaluated
FALSEnever evaluated
? 0 : proxy()->pixelMetric(PM_TabBarTabOverlap, opt, widget);
0
1590-
1591 if (!selected
!selectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1592 switch (tab->shape) {-
1593 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
1594 rect.adjust(0, 0, 0, -tabOverlap);-
1595 if(!selected
!selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1596 rect.adjust(1, 1, -1, 0);
never executed: rect.adjust(1, 1, -1, 0);
0
1597 break;
never executed: break;
0
1598 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
1599 rect.adjust(0, tabOverlap, 0, 0);-
1600 if(!selected
!selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1601 rect.adjust(1, 0, -1, -1);
never executed: rect.adjust(1, 0, -1, -1);
0
1602 break;
never executed: break;
0
1603 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
1604 rect.adjust(tabOverlap, 0, 0, 0);-
1605 if(!selected
!selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1606 rect.adjust(0, 1, -1, -1);
never executed: rect.adjust(0, 1, -1, -1);
0
1607 break;
never executed: break;
0
1608 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
1609 rect.adjust(0, 0, -tabOverlap, 0);-
1610 if(!selected
!selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1611 rect.adjust(1, 1, 0, -1);
never executed: rect.adjust(1, 1, 0, -1);
0
1612 break;
never executed: break;
0
1613 default
never executed: default:
:
never executed: default:
0
1614 break;
never executed: break;
0
1615 }-
1616 }-
1617-
1618 p->setPen(QPen(tab->palette.foreground(), 0));-
1619 if (selected
selectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1620 p->setBrush(tab->palette.base());-
1621 }
never executed: end of block
else {
0
1622 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& widget->parentWidget()
widget->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1623 p->setBrush(widget->parentWidget()->palette().background());
never executed: p->setBrush(widget->parentWidget()->palette().background());
0
1624 else-
1625 p->setBrush(tab->palette.background());
never executed: p->setBrush(tab->palette.background());
0
1626 }-
1627-
1628 int y;-
1629 int x;-
1630 QPolygon a(10);-
1631 switch (tab->shape) {-
1632 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
1633 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
{
0
1634 a.setPoint(0, 0, -1);-
1635 a.setPoint(1, 0, 0);-
1636 y = rect.height() - 2;-
1637 x = y / 3;-
1638 a.setPoint(2, x++, y - 1);-
1639 ++x;-
1640 a.setPoint(3, x++, y++);-
1641 a.setPoint(4, x, y);-
1642-
1643 int i;-
1644 int right = rect.width() - 1;-
1645 for (i = 0; i < 5
i < 5Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1646 a.setPoint(9 - i, right - a.point(i).x(), a.point(i).y());
never executed: a.setPoint(9 - i, right - a.point(i).x(), a.point(i).y());
0
1647 if (tab->shape == QTabBar::TriangularNorth
tab->shape == ...riangularNorthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1648 for (i = 0; i < 10
i < 10Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1649 a.setPoint(i, a.point(i).x(), rect.height() - 1 - a.point(i).y());
never executed: a.setPoint(i, a.point(i).x(), rect.height() - 1 - a.point(i).y());
0
1650-
1651 a.translate(rect.left(), rect.top());-
1652 p->setRenderHint(QPainter::Antialiasing);-
1653 p->translate(0, 0.5);-
1654-
1655 QPainterPath path;-
1656 path.addPolygon(a);-
1657 p->drawPath(path);-
1658 break;
never executed: break;
}
0
1659 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
1660 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
{
0
1661 a.setPoint(0, -1, 0);-
1662 a.setPoint(1, 0, 0);-
1663 x = rect.width() - 2;-
1664 y = x / 3;-
1665 a.setPoint(2, x - 1, y++);-
1666 ++y;-
1667 a.setPoint(3, x++, y++);-
1668 a.setPoint(4, x, y);-
1669 int i;-
1670 int bottom = rect.height() - 1;-
1671 for (i = 0; i < 5
i < 5Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1672 a.setPoint(9 - i, a.point(i).x(), bottom - a.point(i).y());
never executed: a.setPoint(9 - i, a.point(i).x(), bottom - a.point(i).y());
0
1673 if (tab->shape == QTabBar::TriangularWest
tab->shape == ...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1674 for (i = 0; i < 10
i < 10Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1675 a.setPoint(i, rect.width() - 1 - a.point(i).x(), a.point(i).y());
never executed: a.setPoint(i, rect.width() - 1 - a.point(i).x(), a.point(i).y());
0
1676 a.translate(rect.left(), rect.top());-
1677 p->setRenderHint(QPainter::Antialiasing);-
1678 p->translate(0.5, 0);-
1679 QPainterPath path;-
1680 path.addPolygon(a);-
1681 p->drawPath(path);-
1682 break;
never executed: break;
}
0
1683 default
never executed: default:
:
never executed: default:
0
1684 break;
never executed: break;
0
1685 }-
1686 p->restore();-
1687 }
never executed: end of block
0
1688 break;
never executed: break;
0
1689 case
never executed: case CE_ToolBoxTabLabel:
CE_ToolBoxTabLabel:
never executed: case CE_ToolBoxTabLabel:
0
1690 if (const
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)
const QStyleOp...oolBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1691 bool enabled = tb->state & State_Enabled;-
1692 bool selected = tb->state & State_Selected;-
1693 int iconExtent = proxy()->pixelMetric(QStyle::PM_SmallIconSize, tb, widget);-
1694 QPixmap pm = tb->icon.pixmap(qt_getWindow(widget), QSize(iconExtent, iconExtent),-
1695 enabled ? QIcon::Normal : QIcon::Disabled);-
1696-
1697 QRect cr = subElementRect(QStyle::SE_ToolBoxTabContents, tb, widget);-
1698 QRect tr, ir;-
1699 int ih = 0;-
1700 if (pm.isNull()
pm.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1701 tr = cr;-
1702 tr.adjust(4, 0, -8, 0);-
1703 }
never executed: end of block
else {
0
1704 int iw = pm.width() / pm.devicePixelRatio() + 4;-
1705 ih = pm.height()/ pm.devicePixelRatio();-
1706 ir = QRect(cr.left() + 4, cr.top(), iw + 2, ih);-
1707 tr = QRect(ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height());-
1708 }
never executed: end of block
0
1709-
1710 if (selected
selectedDescription
TRUEnever evaluated
FALSEnever evaluated
&& proxy()->styleHint(QStyle::SH_ToolBox_SelectedPageTitleBold, tb, widget)
proxy()->style...d, tb, widget)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1711 QFont f(p->font());-
1712 f.setBold(true);-
1713 p->setFont(f);-
1714 }
never executed: end of block
0
1715-
1716 QString txt = tb->fontMetrics.elidedText(tb->text, Qt::ElideRight, tr.width());-
1717-
1718 if (ih
ihDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1719 p->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm);
never executed: p->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm);
0
1720-
1721 int alignment = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic;-
1722 if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, tb, widget)
!proxy()->styl...t, tb, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1723 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1724 proxy()->drawItemText(p, tr, alignment, tb->palette, enabled, txt, QPalette::ButtonText);-
1725-
1726 if (!txt.isEmpty()
!txt.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& opt->state & State_HasFocus
opt->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1727 QStyleOptionFocusRect opt;-
1728 opt.rect = tr;-
1729 opt.palette = tb->palette;-
1730 opt.state = QStyle::State_None;-
1731 proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, p, widget);-
1732 }
never executed: end of block
0
1733 }
never executed: end of block
0
1734 break;
never executed: break;
0
1735 case
never executed: case CE_TabBarTabLabel:
CE_TabBarTabLabel:
never executed: case CE_TabBarTabLabel:
0
1736 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1737 QRect tr = tab->rect;-
1738 bool verticalTabs = tab->shape == QTabBar::RoundedEast
tab->shape == ...r::RoundedEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
1739 || tab->shape == QTabBar::RoundedWest
tab->shape == ...r::RoundedWestDescription
TRUEnever evaluated
FALSEnever evaluated
0
1740 || tab->shape == QTabBar::TriangularEast
tab->shape == ...TriangularEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
1741 || tab->shape == QTabBar::TriangularWest
tab->shape == ...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1742-
1743 int alignment = Qt::AlignCenter | Qt::TextShowMnemonic;-
1744 if (!proxy()->styleHint(SH_UnderlineShortcut, opt, widget)
!proxy()->styl..., opt, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1745 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
1746-
1747 if (verticalTabs
verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1748 p->save();-
1749 int newX, newY, newRot;-
1750 if (tab->shape == QTabBar::RoundedEast
tab->shape == ...r::RoundedEastDescription
TRUEnever evaluated
FALSEnever evaluated
|| tab->shape == QTabBar::TriangularEast
tab->shape == ...TriangularEastDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1751 newX = tr.width() + tr.x();-
1752 newY = tr.y();-
1753 newRot = 90;-
1754 }
never executed: end of block
else {
0
1755 newX = tr.x();-
1756 newY = tr.y() + tr.height();-
1757 newRot = -90;-
1758 }
never executed: end of block
0
1759 QTransform m = QTransform::fromTranslate(newX, newY);-
1760 m.rotate(newRot);-
1761 p->setTransform(m, true);-
1762 }
never executed: end of block
0
1763 QRect iconRect;-
1764 d->tabLayout(tab, widget, &tr, &iconRect);-
1765 tr = proxy()->subElementRect(SE_TabBarTabText, opt, widget);-
1766-
1767 if (!tab->icon.isNull()
!tab->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1768 QPixmap tabIcon = tab->icon.pixmap(qt_getWindow(widget), tab->iconSize,-
1769 (tab->state & State_Enabled) ? QIcon::Normal-
1770 : QIcon::Disabled,-
1771 (tab->state & State_Selected) ? QIcon::On-
1772 : QIcon::Off);-
1773 p->drawPixmap(iconRect.x(), iconRect.y(), tabIcon);-
1774 }
never executed: end of block
0
1775-
1776 proxy()->drawItemText(p, tr, alignment, tab->palette, tab->state & State_Enabled, tab->text, QPalette::WindowText);-
1777 if (verticalTabs
verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1778 p->restore();
never executed: p->restore();
0
1779-
1780 if (tab->state & State_HasFocus
tab->state & State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1781 const int OFFSET = 1 + pixelMetric(PM_DefaultFrameWidth);-
1782-
1783 int x1, x2;-
1784 x1 = tab->rect.left();-
1785 x2 = tab->rect.right() - 1;-
1786-
1787 QStyleOptionFocusRect fropt;-
1788 fropt.QStyleOption::operator=(*tab);-
1789 fropt.rect.setRect(x1 + 1 + OFFSET, tab->rect.y() + OFFSET,-
1790 x2 - x1 - 2*OFFSET, tab->rect.height() - 2*OFFSET);-
1791 drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);-
1792 }
never executed: end of block
0
1793 }
never executed: end of block
0
1794 break;
never executed: break;
0
1795-
1796-
1797 case
never executed: case CE_SizeGrip:
CE_SizeGrip:
never executed: case CE_SizeGrip:
{
0
1798 p->save();-
1799 int x, y, w, h;-
1800 opt->rect.getRect(&x, &y, &w, &h);-
1801-
1802 int sw = qMin(h, w);-
1803 if (h > w
h > wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1804 p->translate(0, h - w);
never executed: p->translate(0, h - w);
0
1805 else-
1806 p->translate(w - h, 0);
never executed: p->translate(w - h, 0);
0
1807-
1808 int sx = x;-
1809 int sy = y;-
1810 int s = sw / 3;-
1811-
1812 Qt::Corner corner;-
1813 if (const
const QStyleOp...zeGrip *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSizeGrip *sgOpt = qstyleoption_cast<const QStyleOptionSizeGrip *>(opt)
const QStyleOp...zeGrip *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1814 corner = sgOpt->corner;
never executed: corner = sgOpt->corner;
0
1815 else if (opt->direction == Qt::RightToLeft
opt->direction...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1816 corner = Qt::BottomLeftCorner;
never executed: corner = Qt::BottomLeftCorner;
0
1817 else-
1818 corner = Qt::BottomRightCorner;
never executed: corner = Qt::BottomRightCorner;
0
1819-
1820 if (corner == Qt::BottomLeftCorner
corner == Qt::BottomLeftCornerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1821 sx = x + sw;-
1822 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1823 p->setPen(QPen(opt->palette.light().color(), 1));-
1824 p->drawLine(x, sy - 1 , sx + 1, sw);-
1825 p->setPen(QPen(opt->palette.dark().color(), 1));-
1826 p->drawLine(x, sy, sx, sw);-
1827 p->setPen(QPen(opt->palette.dark().color(), 1));-
1828 p->drawLine(x, sy + 1, sx - 1, sw);-
1829 sx -= s;-
1830 sy += s;-
1831 }
never executed: end of block
0
1832 }
never executed: end of block
else if (corner == Qt::BottomRightCorner
corner == Qt::...tomRightCornerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1833 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1834 p->setPen(QPen(opt->palette.light().color(), 1));-
1835 p->drawLine(sx - 1, sw, sw, sy - 1);-
1836 p->setPen(QPen(opt->palette.dark().color(), 1));-
1837 p->drawLine(sx, sw, sw, sy);-
1838 p->setPen(QPen(opt->palette.dark().color(), 1));-
1839 p->drawLine(sx + 1, sw, sw, sy + 1);-
1840 sx += s;-
1841 sy += s;-
1842 }
never executed: end of block
0
1843 }
never executed: end of block
else if (corner == Qt::TopRightCorner
corner == Qt::TopRightCornerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1844 sy = y + sw;-
1845 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1846 p->setPen(QPen(opt->palette.light().color(), 1));-
1847 p->drawLine(sx - 1, y, sw, sy + 1);-
1848 p->setPen(QPen(opt->palette.dark().color(), 1));-
1849 p->drawLine(sx, y, sw, sy);-
1850 p->setPen(QPen(opt->palette.dark().color(), 1));-
1851 p->drawLine(sx + 1, y, sw, sy - 1);-
1852 sx += s;-
1853 sy -= s;-
1854 }
never executed: end of block
0
1855 }
never executed: end of block
else if (corner == Qt::TopLeftCorner
corner == Qt::TopLeftCornerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1856 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1857 p->setPen(QPen(opt->palette.light().color(), 1));-
1858 p->drawLine(x, sy - 1, sx - 1, y);-
1859 p->setPen(QPen(opt->palette.dark().color(), 1));-
1860 p->drawLine(x, sy, sx, y);-
1861 p->setPen(QPen(opt->palette.dark().color(), 1));-
1862 p->drawLine(x, sy + 1, sx + 1, y);-
1863 sx += s;-
1864 sy += s;-
1865 }
never executed: end of block
0
1866 }
never executed: end of block
0
1867 p->restore();-
1868 break;
never executed: break;
}
0
1869-
1870-
1871 case
never executed: case CE_RubberBand:
CE_RubberBand:
never executed: case CE_RubberBand:
{
0
1872 if (const
const QStyleOp...erBand *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)
const QStyleOp...erBand *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1873 QPixmap tiledPixmap(16, 16);-
1874 QPainter pixmapPainter(&tiledPixmap);-
1875 pixmapPainter.setPen(Qt::NoPen);-
1876 pixmapPainter.setBrush(Qt::Dense4Pattern);-
1877 pixmapPainter.setBackground(QBrush(opt->palette.base()));-
1878 pixmapPainter.setBackgroundMode(Qt::OpaqueMode);-
1879 pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height());-
1880 pixmapPainter.end();-
1881-
1882 tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage());-
1883-
1884 p->save();-
1885 QRect r = opt->rect;-
1886 QStyleHintReturnMask mask;-
1887 if (proxy()->styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask)
proxy()->style...widget, &mask)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1888 p->setClipRegion(mask.region);
never executed: p->setClipRegion(mask.region);
0
1889 p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap);-
1890 p->setPen(opt->palette.color(QPalette::Active, QPalette::WindowText));-
1891 p->setBrush(Qt::NoBrush);-
1892 p->drawRect(r.adjusted(0, 0, -1, -1));-
1893 if (rbOpt->shape == QRubberBand::Rectangle
rbOpt->shape =...and::RectangleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1894 p->drawRect(r.adjusted(3, 3, -4, -4));
never executed: p->drawRect(r.adjusted(3, 3, -4, -4));
0
1895 p->restore();-
1896 }
never executed: end of block
0
1897 break;
never executed: break;
}
0
1898-
1899-
1900 case
never executed: case CE_DockWidgetTitle:
CE_DockWidgetTitle:
never executed: case CE_DockWidgetTitle:
0
1901 if (const
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)
const QStyleOp...Widget *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1902 QRect r = dwOpt->rect.adjusted(0, 0, -1, -1);-
1903 if (dwOpt->movable
dwOpt->movableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1904 p->setPen(dwOpt->palette.color(QPalette::Dark));-
1905 p->drawRect(r);-
1906 }
never executed: end of block
0
1907-
1908 if (!dwOpt->title.isEmpty()
!dwOpt->title.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1909 const bool verticalTitleBar = dwOpt->verticalTitleBar;-
1910-
1911 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1912 r = r.transposed();-
1913-
1914 p->save();-
1915 p->translate(r.left(), r.top() + r.width());-
1916 p->rotate(-90);-
1917 p->translate(-r.left(), -r.top());-
1918 }
never executed: end of block
0
1919-
1920 const int indent = p->fontMetrics().descent();-
1921 proxy()->drawItemText(p, r.adjusted(indent + 1, 1, -indent - 1, -1),-
1922 Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette,-
1923 dwOpt->state & State_Enabled, dwOpt->title,-
1924 QPalette::WindowText);-
1925-
1926 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1927 p->restore();
never executed: p->restore();
0
1928 }
never executed: end of block
0
1929 }
never executed: end of block
0
1930 break;
never executed: break;
0
1931-
1932 case
never executed: case CE_Header:
CE_Header:
never executed: case CE_Header:
0
1933 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1934 QRegion clipRegion = p->clipRegion();-
1935 p->setClipRect(opt->rect);-
1936 proxy()->drawControl(CE_HeaderSection, header, p, widget);-
1937 QStyleOptionHeader subopt = *header;-
1938 subopt.rect = subElementRect(SE_HeaderLabel, header, widget);-
1939 if (subopt.rect.isValid()
subopt.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1940 proxy()->drawControl(CE_HeaderLabel, &subopt, p, widget);
never executed: proxy()->drawControl(CE_HeaderLabel, &subopt, p, widget);
0
1941 if (header->sortIndicator != QStyleOptionHeader::None
header->sortIn...onHeader::NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1942 subopt.rect = subElementRect(SE_HeaderArrow, opt, widget);-
1943 proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, p, widget);-
1944 }
never executed: end of block
0
1945 p->setClipRegion(clipRegion);-
1946 }
never executed: end of block
0
1947 break;
never executed: break;
0
1948 case
never executed: case CE_FocusFrame:
CE_FocusFrame:
never executed: case CE_FocusFrame:
0
1949 p->fillRect(opt->rect, opt->palette.foreground());-
1950 break;
never executed: break;
0
1951 case
never executed: case CE_HeaderSection:
CE_HeaderSection:
never executed: case CE_HeaderSection:
0
1952 qDrawShadePanel(p, opt->rect, opt->palette,-
1953 opt->state & State_Sunken, 1,-
1954 &opt->palette.brush(QPalette::Button));-
1955 break;
never executed: break;
0
1956 case
never executed: case CE_HeaderEmptyArea:
CE_HeaderEmptyArea:
never executed: case CE_HeaderEmptyArea:
0
1957 p->fillRect(opt->rect, opt->palette.background());-
1958 break;
never executed: break;
0
1959-
1960 case
never executed: case CE_ComboBoxLabel:
CE_ComboBoxLabel:
never executed: case CE_ComboBoxLabel:
0
1961 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1962 QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget);-
1963 p->save();-
1964 p->setClipRect(editRect);-
1965 if (!cb->currentIcon.isNull()
!cb->currentIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1966 QIcon::Mode mode = cb->state & State_Enabled
cb->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::Normal
0
1967 : QIcon::Disabled;-
1968 QPixmap pixmap = cb->currentIcon.pixmap(qt_getWindow(widget), cb->iconSize, mode);-
1969 QRect iconRect(editRect);-
1970 iconRect.setWidth(cb->iconSize.width() + 4);-
1971 iconRect = alignedRect(cb->direction,-
1972 Qt::AlignLeft | Qt::AlignVCenter,-
1973 iconRect.size(), editRect);-
1974 if (cb->editable
cb->editableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1975 p->fillRect(iconRect, opt->palette.brush(QPalette::Base));
never executed: p->fillRect(iconRect, opt->palette.brush(QPalette::Base));
0
1976 proxy()->drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap);-
1977-
1978 if (cb->direction == Qt::RightToLeft
cb->direction ...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1979 editRect.translate(-4 - cb->iconSize.width(), 0);
never executed: editRect.translate(-4 - cb->iconSize.width(), 0);
0
1980 else-
1981 editRect.translate(cb->iconSize.width() + 4, 0);
never executed: editRect.translate(cb->iconSize.width() + 4, 0);
0
1982 }-
1983 if (!cb->currentText.isEmpty()
!cb->currentText.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& !cb->editable
!cb->editableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1984 proxy()->drawItemText(p, editRect.adjusted(1, 0, -1, 0),-
1985 visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter),-
1986 cb->palette, cb->state & State_Enabled, cb->currentText);-
1987 }
never executed: end of block
0
1988 p->restore();-
1989 }
never executed: end of block
0
1990 break;
never executed: break;
0
1991-
1992-
1993 case
never executed: case CE_ToolBar:
CE_ToolBar:
never executed: case CE_ToolBar:
0
1994 if (const
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1995-
1996 QStyleOptionFrame frame;-
1997 frame.QStyleOption::operator=(*toolBar);-
1998 frame.lineWidth = toolBar->lineWidth;-
1999 frame.midLineWidth = toolBar->midLineWidth;-
2000 proxy()->drawPrimitive(PE_PanelToolBar, opt, p, widget);-
2001-
2002 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& qobject_cast<QToolBar *>(widget->parentWidget())
qobject_cast<Q...arentWidget())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2003 break;
never executed: break;
0
2004 qDrawShadePanel(p, toolBar->rect, toolBar->palette, false, toolBar->lineWidth,-
2005 &toolBar->palette.brush(QPalette::Button));-
2006 }
never executed: end of block
0
2007 break;
never executed: break;
0
2008-
2009 case
never executed: case CE_ColumnViewGrip:
CE_ColumnViewGrip:
never executed: case CE_ColumnViewGrip:
{
0
2010-
2011 QLinearGradient g(0, 0, opt->rect.width(), 0);-
2012 g.setColorAt(0, opt->palette.color(QPalette::Active, QPalette::Mid));-
2013 g.setColorAt(0.5, Qt::white);-
2014 p->fillRect(QRect(0, 0, opt->rect.width(), opt->rect.height()), g);-
2015-
2016-
2017 QPen pen(p->pen());-
2018 pen.setWidth(opt->rect.width()/20);-
2019 pen.setColor(opt->palette.color(QPalette::Active, QPalette::Dark));-
2020 p->setPen(pen);-
2021-
2022 int line1starting = opt->rect.width()*8 / 20;-
2023 int line2starting = opt->rect.width()*13 / 20;-
2024 int top = opt->rect.height()*20/75;-
2025 int bottom = opt->rect.height() - 1 - top;-
2026 p->drawLine(line1starting, top, line1starting, bottom);-
2027 p->drawLine(line2starting, top, line2starting, bottom);-
2028 }-
2029 break;
never executed: break;
0
2030-
2031-
2032 case
never executed: case CE_ItemViewItem:
CE_ItemViewItem:
never executed: case CE_ItemViewItem:
0
2033 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2034 p->save();-
2035 p->setClipRect(opt->rect);-
2036-
2037 QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget);-
2038 QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, vopt, widget);-
2039 QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, vopt, widget);-
2040-
2041-
2042 proxy()->drawPrimitive(PE_PanelItemViewItem, opt, p, widget);-
2043-
2044-
2045 if (vopt->features & QStyleOptionViewItem::HasCheckIndicator
vopt->features...CheckIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2046 QStyleOptionViewItem option(*vopt);-
2047 option.rect = checkRect;-
2048 option.state = option.state & ~QStyle::State_HasFocus;-
2049-
2050 switch (vopt->checkState) {-
2051 case
never executed: case Qt::Unchecked:
Qt::Unchecked:
never executed: case Qt::Unchecked:
0
2052 option.state |= QStyle::State_Off;-
2053 break;
never executed: break;
0
2054 case
never executed: case Qt::PartiallyChecked:
Qt::PartiallyChecked:
never executed: case Qt::PartiallyChecked:
0
2055 option.state |= QStyle::State_NoChange;-
2056 break;
never executed: break;
0
2057 case
never executed: case Qt::Checked:
Qt::Checked:
never executed: case Qt::Checked:
0
2058 option.state |= QStyle::State_On;-
2059 break;
never executed: break;
0
2060 }-
2061 proxy()->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option, p, widget);-
2062 }
never executed: end of block
0
2063-
2064-
2065 QIcon::Mode mode = QIcon::Normal;-
2066 if (!(vopt->state & QStyle::State_Enabled)
!(vopt->state ...State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2067 mode = QIcon::Disabled;
never executed: mode = QIcon::Disabled;
0
2068 else if (vopt->state & QStyle::State_Selected
vopt->state & ...State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2069 mode = QIcon::Selected;
never executed: mode = QIcon::Selected;
0
2070 QIcon::State state = vopt->state & QStyle::State_Open
vopt->state & ...le::State_OpenDescription
TRUEnever evaluated
FALSEnever evaluated
? QIcon::On : QIcon::Off;
0
2071 vopt->icon.paint(p, iconRect, vopt->decorationAlignment, mode, state);-
2072-
2073-
2074 if (!vopt->text.isEmpty()
!vopt->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2075 QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
vopt->state & ...:State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
0
2076 ? QPalette::Normal : QPalette::Disabled;-
2077 if (cg == QPalette::Normal
cg == QPalette::NormalDescription
TRUEnever evaluated
FALSEnever evaluated
&& !(vopt->state & QStyle::State_Active)
!(vopt->state ...:State_Active)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2078 cg = QPalette::Inactive;
never executed: cg = QPalette::Inactive;
0
2079-
2080 if (vopt->state & QStyle::State_Selected
vopt->state & ...State_SelectedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2081 p->setPen(vopt->palette.color(cg, QPalette::HighlightedText));-
2082 }
never executed: end of block
else {
0
2083 p->setPen(vopt->palette.color(cg, QPalette::Text));-
2084 }
never executed: end of block
0
2085 if (vopt->state & QStyle::State_Editing
vopt->state & ...:State_EditingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2086 p->setPen(vopt->palette.color(cg, QPalette::Text));-
2087 p->drawRect(textRect.adjusted(0, 0, -1, -1));-
2088 }
never executed: end of block
0
2089-
2090 d->viewItemDrawText(p, vopt, textRect);-
2091 }
never executed: end of block
0
2092-
2093-
2094 if (vopt->state & QStyle::State_HasFocus
vopt->state & ...State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2095 QStyleOptionFocusRect o;-
2096 o.QStyleOption::operator=(*vopt);-
2097 o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vopt, widget);-
2098 o.state |= QStyle::State_KeyboardFocusChange;-
2099 o.state |= QStyle::State_Item;-
2100 QPalette::ColorGroup cg = (
(vopt->state &...State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
vopt->state & QStyle::State_Enabled)
(vopt->state &...State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
0
2101 ? QPalette::Normal : QPalette::Disabled;-
2102 o.backgroundColor = vopt->palette.color(cg, (vopt->state & QStyle::State_Selected)-
2103 ? QPalette::Highlight : QPalette::Window);-
2104 proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &o, p, widget);-
2105 }
never executed: end of block
0
2106-
2107 p->restore();-
2108 }
never executed: end of block
0
2109 break;
never executed: break;
0
2110-
2111-
2112-
2113 case
never executed: case CE_ShapedFrame:
CE_ShapedFrame:
never executed: case CE_ShapedFrame:
0
2114 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2115 int frameShape = f->frameShape;-
2116 int frameShadow = QFrame::Plain;-
2117 if (f->state & QStyle::State_Sunken
f->state & QSt...::State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2118 frameShadow = QFrame::Sunken;-
2119 }
never executed: end of block
else if (f->state & QStyle::State_Raised
f->state & QSt...::State_RaisedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2120 frameShadow = QFrame::Raised;-
2121 }
never executed: end of block
0
2122-
2123 int lw = f->lineWidth;-
2124 int mlw = f->midLineWidth;-
2125 QPalette::ColorRole foregroundRole = QPalette::WindowText;-
2126 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2127 foregroundRole = widget->foregroundRole();
never executed: foregroundRole = widget->foregroundRole();
0
2128-
2129 switch (frameShape) {-
2130 case
never executed: case QFrame::Box:
QFrame::Box:
never executed: case QFrame::Box:
0
2131 if (frameShadow == QFrame::Plain
frameShadow == QFrame::PlainDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2132 qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw);-
2133 }
never executed: end of block
else {
0
2134 qDrawShadeRect(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw, mlw);-
2135 }
never executed: end of block
0
2136 break;
never executed: break;
0
2137 case
never executed: case QFrame::StyledPanel:
QFrame::StyledPanel:
never executed: case QFrame::StyledPanel:
0
2138-
2139-
2140 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2141 widget->style()->drawPrimitive(QStyle::PE_Frame, opt, p, widget);-
2142 }
never executed: end of block
else {
0
2143 proxy()->drawPrimitive(QStyle::PE_Frame, opt, p, widget);-
2144 }
never executed: end of block
0
2145 break;
never executed: break;
0
2146 case
never executed: case QFrame::Panel:
QFrame::Panel:
never executed: case QFrame::Panel:
0
2147 if (frameShadow == QFrame::Plain
frameShadow == QFrame::PlainDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2148 qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw);-
2149 }
never executed: end of block
else {
0
2150 qDrawShadePanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken, lw);-
2151 }
never executed: end of block
0
2152 break;
never executed: break;
0
2153 case
never executed: case QFrame::WinPanel:
QFrame::WinPanel:
never executed: case QFrame::WinPanel:
0
2154 if (frameShadow == QFrame::Plain
frameShadow == QFrame::PlainDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2155 qDrawPlainRect(p, f->rect, f->palette.color(foregroundRole), lw);-
2156 }
never executed: end of block
else {
0
2157 qDrawWinPanel(p, f->rect, f->palette, frameShadow == QFrame::Sunken);-
2158 }
never executed: end of block
0
2159 break;
never executed: break;
0
2160 case
never executed: case QFrame::HLine:
QFrame::HLine:
never executed: case QFrame::HLine:
0
2161 case
never executed: case QFrame::VLine:
QFrame::VLine:
never executed: case QFrame::VLine:
{
0
2162 QPoint p1, p2;-
2163 if (frameShape == QFrame::HLine
frameShape == QFrame::HLineDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2164 p1 = QPoint(opt->rect.x(), opt->rect.y() + opt->rect.height() / 2);-
2165 p2 = QPoint(opt->rect.x() + opt->rect.width(), p1.y());-
2166 }
never executed: end of block
else {
0
2167 p1 = QPoint(opt->rect.x() + opt->rect.width() / 2, opt->rect.y());-
2168 p2 = QPoint(p1.x(), p1.y() + opt->rect.height());-
2169 }
never executed: end of block
0
2170 if (frameShadow == QFrame::Plain
frameShadow == QFrame::PlainDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2171 QPen oldPen = p->pen();-
2172 p->setPen(QPen(opt->palette.brush(foregroundRole), lw));-
2173 p->drawLine(p1, p2);-
2174 p->setPen(oldPen);-
2175 }
never executed: end of block
else {
0
2176 qDrawShadeLine(p, p1, p2, f->palette, frameShadow == QFrame::Sunken, lw, mlw);-
2177 }
never executed: end of block
0
2178 break;
never executed: break;
0
2179 }-
2180 }-
2181 }
never executed: end of block
0
2182 break;
never executed: break;
0
2183-
2184 default
never executed: default:
:
never executed: default:
0
2185 break;
never executed: break;
0
2186 }-
2187}-
2188-
2189-
2190-
2191-
2192QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,-
2193 const QWidget *widget) const-
2194{-
2195 const QCommonStylePrivate * const d = d_func();-
2196 QRect r;-
2197 switch (sr) {-
2198 case
never executed: case SE_PushButtonContents:
SE_PushButtonContents:
never executed: case SE_PushButtonContents:
0
2199 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2200 int dx1, dx2;-
2201 dx1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget);-
2202 if (btn->features & QStyleOptionButton::AutoDefaultButton
btn->features ...oDefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2203 dx1 += proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);
never executed: dx1 += proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);
0
2204 dx2 = dx1 * 2;-
2205 r.setRect(opt->rect.x() + dx1, opt->rect.y() + dx1, opt->rect.width() - dx2,-
2206 opt->rect.height() - dx2);-
2207 r = visualRect(opt->direction, opt->rect, r);-
2208 }
never executed: end of block
0
2209 break;
never executed: break;
0
2210 case
never executed: case SE_PushButtonFocusRect:
SE_PushButtonFocusRect:
never executed: case SE_PushButtonFocusRect:
0
2211 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2212 int dbw1 = 0, dbw2 = 0;-
2213 if (btn->features & QStyleOptionButton::AutoDefaultButton
btn->features ...oDefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
){
0
2214 dbw1 = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);-
2215 dbw2 = dbw1 * 2;-
2216 }
never executed: end of block
0
2217-
2218 int dfw1 = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) + 1,-
2219 dfw2 = dfw1 * 2;-
2220-
2221 r.setRect(btn->rect.x() + dfw1 + dbw1, btn->rect.y() + dfw1 + dbw1,-
2222 btn->rect.width() - dfw2 - dbw2, btn->rect.height()- dfw2 - dbw2);-
2223 r = visualRect(opt->direction, opt->rect, r);-
2224 }
never executed: end of block
0
2225 break;
never executed: break;
0
2226 case
never executed: case SE_CheckBoxIndicator:
SE_CheckBoxIndicator:
never executed: case SE_CheckBoxIndicator:
0
2227 {-
2228 int h = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget);-
2229 r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2),-
2230 proxy()->pixelMetric(PM_IndicatorWidth, opt, widget), h);-
2231 r = visualRect(opt->direction, opt->rect, r);-
2232 }-
2233 break;
never executed: break;
0
2234-
2235 case
never executed: case SE_CheckBoxContents:
SE_CheckBoxContents:
never executed: case SE_CheckBoxContents:
0
2236 {-
2237-
2238 QRect ir = visualRect(opt->direction, opt->rect,-
2239 subElementRect(SE_CheckBoxIndicator, opt, widget));-
2240 int spacing = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget);-
2241 r.setRect(ir.right() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing,-
2242 opt->rect.height());-
2243 r = visualRect(opt->direction, opt->rect, r);-
2244 }-
2245 break;
never executed: break;
0
2246-
2247 case
never executed: case SE_CheckBoxFocusRect:
SE_CheckBoxFocusRect:
never executed: case SE_CheckBoxFocusRect:
0
2248 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2249 if (btn->icon.isNull()
btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& btn->text.isEmpty()
btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2250 r = subElementRect(SE_CheckBoxIndicator, opt, widget);-
2251 r.adjust(1, 1, -1, -1);-
2252 break;
never executed: break;
0
2253 }-
2254-
2255 QRect cr = visualRect(btn->direction, btn->rect,-
2256 subElementRect(SE_CheckBoxContents, btn, widget));-
2257-
2258 QRect iconRect, textRect;-
2259 if (!btn->text.isEmpty()
!btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2260 textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft-
2261 | Qt::AlignVCenter | Qt::TextShowMnemonic,-
2262 btn->state & State_Enabled, btn->text);-
2263 }
never executed: end of block
0
2264 if (!btn->icon.isNull()
!btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2265 iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter-
2266 | Qt::TextShowMnemonic,-
2267 btn->icon.pixmap(qt_getWindow(widget), btn->iconSize, QIcon::Normal));-
2268 if (!textRect.isEmpty()
!textRect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2269 textRect.translate(iconRect.right() + 4, 0);
never executed: textRect.translate(iconRect.right() + 4, 0);
0
2270 }
never executed: end of block
0
2271 r = iconRect | textRect;-
2272 r.adjust(-3, -2, 3, 2);-
2273 r = r.intersected(btn->rect);-
2274 r = visualRect(btn->direction, btn->rect, r);-
2275 }
never executed: end of block
0
2276 break;
never executed: break;
0
2277-
2278 case
never executed: case SE_RadioButtonIndicator:
SE_RadioButtonIndicator:
never executed: case SE_RadioButtonIndicator:
0
2279 {-
2280 int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, opt, widget);-
2281 r.setRect(opt->rect.x(), opt->rect.y() + ((opt->rect.height() - h) / 2),-
2282 proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, opt, widget), h);-
2283 r = visualRect(opt->direction, opt->rect, r);-
2284 }-
2285 break;
never executed: break;
0
2286-
2287 case
never executed: case SE_RadioButtonContents:
SE_RadioButtonContents:
never executed: case SE_RadioButtonContents:
0
2288 {-
2289 QRect ir = visualRect(opt->direction, opt->rect,-
2290 subElementRect(SE_RadioButtonIndicator, opt, widget));-
2291 int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, opt, widget);-
2292 r.setRect(ir.left() + ir.width() + spacing, opt->rect.y(), opt->rect.width() - ir.width() - spacing,-
2293 opt->rect.height());-
2294 r = visualRect(opt->direction, opt->rect, r);-
2295 break;
never executed: break;
0
2296 }-
2297-
2298 case
never executed: case SE_RadioButtonFocusRect:
SE_RadioButtonFocusRect:
never executed: case SE_RadioButtonFocusRect:
0
2299 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2300 if (btn->icon.isNull()
btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& btn->text.isEmpty()
btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2301 r = subElementRect(SE_RadioButtonIndicator, opt, widget);-
2302 r.adjust(1, 1, -1, -1);-
2303 break;
never executed: break;
0
2304 }-
2305 QRect cr = visualRect(btn->direction, btn->rect,-
2306 subElementRect(SE_RadioButtonContents, opt, widget));-
2307-
2308 QRect iconRect, textRect;-
2309 if (!btn->text.isEmpty()
!btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
){
0
2310 textRect = itemTextRect(opt->fontMetrics, cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter-
2311 | Qt::TextShowMnemonic, btn->state & State_Enabled, btn->text);-
2312 }
never executed: end of block
0
2313 if (!btn->icon.isNull()
!btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2314 iconRect = itemPixmapRect(cr, Qt::AlignAbsolute | Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic,-
2315 btn->icon.pixmap(qt_getWindow(widget), btn->iconSize, QIcon::Normal));-
2316 if (!textRect.isEmpty()
!textRect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2317 textRect.translate(iconRect.right() + 4, 0);
never executed: textRect.translate(iconRect.right() + 4, 0);
0
2318 }
never executed: end of block
0
2319 r = iconRect | textRect;-
2320 r.adjust(-3, -2, 3, 2);-
2321 r = r.intersected(btn->rect);-
2322 r = visualRect(btn->direction, btn->rect, r);-
2323 }
never executed: end of block
0
2324 break;
never executed: break;
0
2325-
2326 case
never executed: case SE_SliderFocusRect:
SE_SliderFocusRect:
never executed: case SE_SliderFocusRect:
0
2327 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2328 int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget);-
2329 int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget);-
2330 if (slider->orientation == Qt::Horizontal
slider->orient...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2331 r.setRect(0, tickOffset - 1, slider->rect.width(), thickness + 2);
never executed: r.setRect(0, tickOffset - 1, slider->rect.width(), thickness + 2);
0
2332 else-
2333 r.setRect(tickOffset - 1, 0, thickness + 2, slider->rect.height());
never executed: r.setRect(tickOffset - 1, 0, thickness + 2, slider->rect.height());
0
2334 r = r.intersected(slider->rect);-
2335 r = visualRect(opt->direction, opt->rect, r);-
2336 }
never executed: end of block
0
2337 break;
never executed: break;
0
2338-
2339-
2340 case
never executed: case SE_ProgressBarGroove:
SE_ProgressBarGroove:
never executed: case SE_ProgressBarGroove:
0
2341 case
never executed: case SE_ProgressBarContents:
SE_ProgressBarContents:
never executed: case SE_ProgressBarContents:
0
2342 case
never executed: case SE_ProgressBarLabel:
SE_ProgressBarLabel:
never executed: case SE_ProgressBarLabel:
0
2343 if (const
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)
const QStyleOp...essBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2344 int textw = 0;-
2345 const bool vertical = pb->orientation == Qt::Vertical;-
2346 if (!vertical
!verticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2347 if (pb->textVisible
pb->textVisibleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2348 textw = qMax(pb->fontMetrics.width(pb->text), pb->fontMetrics.width(QLatin1String("100%"))) + 6;
never executed: textw = qMax(pb->fontMetrics.width(pb->text), pb->fontMetrics.width(QLatin1String("100%"))) + 6;
0
2349 }
never executed: end of block
0
2350-
2351 if ((
(pb->textAlign...gnCenter) == 0Description
TRUEnever evaluated
FALSEnever evaluated
pb->textAlignment & Qt::AlignCenter) == 0
(pb->textAlign...gnCenter) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2352 if (sr != SE_ProgressBarLabel
sr != SE_ProgressBarLabelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2353 r.setCoords(pb->rect.left(), pb->rect.top(),
never executed: r.setCoords(pb->rect.left(), pb->rect.top(), pb->rect.right() - textw, pb->rect.bottom());
0
2354 pb->rect.right() - textw, pb->rect.bottom());
never executed: r.setCoords(pb->rect.left(), pb->rect.top(), pb->rect.right() - textw, pb->rect.bottom());
0
2355 else-
2356 r.setCoords(pb->rect.right() - textw, pb->rect.top(),
never executed: r.setCoords(pb->rect.right() - textw, pb->rect.top(), pb->rect.right(), pb->rect.bottom());
0
2357 pb->rect.right(), pb->rect.bottom());
never executed: r.setCoords(pb->rect.right() - textw, pb->rect.top(), pb->rect.right(), pb->rect.bottom());
0
2358 } else {-
2359 r = pb->rect;-
2360 }
never executed: end of block
0
2361 r = visualRect(pb->direction, pb->rect, r);-
2362 }
never executed: end of block
0
2363 break;
never executed: break;
0
2364-
2365-
2366 case
never executed: case SE_ComboBoxFocusRect:
SE_ComboBoxFocusRect:
never executed: case SE_ComboBoxFocusRect:
0
2367 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2368 int margin = cb->frame
cb->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? 3 : 0;
0
2369 r.setRect(opt->rect.left() + margin, opt->rect.top() + margin,-
2370 opt->rect.width() - 2*margin - 16, opt->rect.height() - 2*margin);-
2371 r = visualRect(opt->direction, opt->rect, r);-
2372 }
never executed: end of block
0
2373 break;
never executed: break;
0
2374-
2375-
2376 case
never executed: case SE_ToolBoxTabContents:
SE_ToolBoxTabContents:
never executed: case SE_ToolBoxTabContents:
0
2377 r = opt->rect;-
2378 r.adjust(0, 0, -30, 0);-
2379 break;
never executed: break;
0
2380-
2381 case
never executed: case SE_HeaderLabel:
SE_HeaderLabel:
never executed: case SE_HeaderLabel:
{
0
2382 int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget);-
2383 r.setRect(opt->rect.x() + margin, opt->rect.y() + margin,-
2384 opt->rect.width() - margin * 2, opt->rect.height() - margin * 2);-
2385-
2386 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2387-
2388 if (header->sortIndicator != QStyleOptionHeader::None
header->sortIn...onHeader::NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2389 if (opt->state & State_Horizontal
opt->state & State_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2390 r.setWidth(r.width() - (opt->rect.height() / 2) - (margin * 2));
never executed: r.setWidth(r.width() - (opt->rect.height() / 2) - (margin * 2));
0
2391 else-
2392 r.setHeight(r.height() - (opt->rect.width() / 2) - (margin * 2));
never executed: r.setHeight(r.height() - (opt->rect.width() / 2) - (margin * 2));
0
2393 }-
2394 }
never executed: end of block
0
2395 r = visualRect(opt->direction, opt->rect, r);-
2396 break;
never executed: break;
}
0
2397 case
never executed: case SE_HeaderArrow:
SE_HeaderArrow:
never executed: case SE_HeaderArrow:
{
0
2398 int h = opt->rect.height();-
2399 int w = opt->rect.width();-
2400 int x = opt->rect.x();-
2401 int y = opt->rect.y();-
2402 int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget);-
2403-
2404 if (opt->state & State_Horizontal
opt->state & State_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2405 int horiz_size = h / 2;-
2406 r.setRect(x + w - margin * 2 - horiz_size, y + 5,-
2407 horiz_size, h - margin * 2 - 5);-
2408 }
never executed: end of block
else {
0
2409 int vert_size = w / 2;-
2410 r.setRect(x + 5, y + h - margin * 2 - vert_size,-
2411 w - margin * 2 - 5, vert_size);-
2412 }
never executed: end of block
0
2413 r = visualRect(opt->direction, opt->rect, r);-
2414 break;
never executed: break;
}
0
2415-
2416 case
never executed: case SE_RadioButtonClickRect:
SE_RadioButtonClickRect:
never executed: case SE_RadioButtonClickRect:
0
2417 r = subElementRect(SE_RadioButtonFocusRect, opt, widget);-
2418 r |= subElementRect(SE_RadioButtonIndicator, opt, widget);-
2419 break;
never executed: break;
0
2420 case
never executed: case SE_CheckBoxClickRect:
SE_CheckBoxClickRect:
never executed: case SE_CheckBoxClickRect:
0
2421 r = subElementRect(SE_CheckBoxFocusRect, opt, widget);-
2422 r |= subElementRect(SE_CheckBoxIndicator, opt, widget);-
2423 break;
never executed: break;
0
2424-
2425 case
never executed: case SE_TabWidgetTabBar:
SE_TabWidgetTabBar:
never executed: case SE_TabWidgetTabBar:
0
2426 if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *twf
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
0
2427 = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2428 r.setSize(twf->tabBarSize);-
2429 const uint alingMask = Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter;-
2430 switch (twf->shape) {-
2431 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
2432 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
2433-
2434-
2435 r.setWidth(qMin(r.width(), twf->rect.width()-
2436 - twf->leftCornerWidgetSize.width()-
2437 - twf->rightCornerWidgetSize.width()));-
2438 switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) {-
2439 default
never executed: default:
:
never executed: default:
0
2440 case
never executed: case Qt::AlignLeft:
Qt::AlignLeft:
never executed: case Qt::AlignLeft:
0
2441 r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(), 0));-
2442 break;
never executed: break;
0
2443 case
never executed: case Qt::AlignHCenter:
Qt::AlignHCenter:
never executed: case Qt::AlignHCenter:
0
2444 r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f)-
2445 + (twf->leftCornerWidgetSize.width() / 2)-
2446 - (twf->rightCornerWidgetSize.width() / 2), 0));-
2447 break;
never executed: break;
0
2448 case
never executed: case Qt::AlignRight:
Qt::AlignRight:
never executed: case Qt::AlignRight:
0
2449 r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width()-
2450 - twf->rightCornerWidgetSize.width(), 0));-
2451 break;
never executed: break;
0
2452 }-
2453 r = visualRect(twf->direction, twf->rect, r);-
2454 break;
never executed: break;
0
2455 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
2456 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
2457 r.setWidth(qMin(r.width(), twf->rect.width()-
2458 - twf->leftCornerWidgetSize.width()-
2459 - twf->rightCornerWidgetSize.width()));-
2460 switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) {-
2461 default
never executed: default:
:
never executed: default:
0
2462 case
never executed: case Qt::AlignLeft:
Qt::AlignLeft:
never executed: case Qt::AlignLeft:
0
2463 r.moveTopLeft(QPoint(twf->leftCornerWidgetSize.width(),-
2464 twf->rect.height() - twf->tabBarSize.height()));-
2465 break;
never executed: break;
0
2466 case
never executed: case Qt::AlignHCenter:
Qt::AlignHCenter:
never executed: case Qt::AlignHCenter:
0
2467 r.moveTopLeft(QPoint(twf->rect.center().x() - qRound(r.width() / 2.0f)-
2468 + (twf->leftCornerWidgetSize.width() / 2)-
2469 - (twf->rightCornerWidgetSize.width() / 2),-
2470 twf->rect.height() - twf->tabBarSize.height()));-
2471 break;
never executed: break;
0
2472 case
never executed: case Qt::AlignRight:
Qt::AlignRight:
never executed: case Qt::AlignRight:
0
2473 r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width()-
2474 - twf->rightCornerWidgetSize.width(),-
2475 twf->rect.height() - twf->tabBarSize.height()));-
2476 break;
never executed: break;
0
2477 }-
2478 r = visualRect(twf->direction, twf->rect, r);-
2479 break;
never executed: break;
0
2480 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
2481 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
2482 r.setHeight(qMin(r.height(), twf->rect.height()-
2483 - twf->leftCornerWidgetSize.height()-
2484 - twf->rightCornerWidgetSize.height()));-
2485 switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) {-
2486 default
never executed: default:
:
never executed: default:
0
2487 case
never executed: case Qt::AlignLeft:
Qt::AlignLeft:
never executed: case Qt::AlignLeft:
0
2488 r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(),-
2489 twf->leftCornerWidgetSize.height()));-
2490 break;
never executed: break;
0
2491 case
never executed: case Qt::AlignHCenter:
Qt::AlignHCenter:
never executed: case Qt::AlignHCenter:
0
2492 r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(),-
2493 twf->rect.center().y() - r.height() / 2));-
2494 break;
never executed: break;
0
2495 case
never executed: case Qt::AlignRight:
Qt::AlignRight:
never executed: case Qt::AlignRight:
0
2496 r.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(),-
2497 twf->rect.height() - twf->tabBarSize.height()-
2498 - twf->rightCornerWidgetSize.height()));-
2499 break;
never executed: break;
0
2500 }-
2501 break;
never executed: break;
0
2502 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
2503 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
2504 r.setHeight(qMin(r.height(), twf->rect.height()-
2505 - twf->leftCornerWidgetSize.height()-
2506 - twf->rightCornerWidgetSize.height()));-
2507 switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) {-
2508 default
never executed: default:
:
never executed: default:
0
2509 case
never executed: case Qt::AlignLeft:
Qt::AlignLeft:
never executed: case Qt::AlignLeft:
0
2510 r.moveTopLeft(QPoint(0, twf->leftCornerWidgetSize.height()));-
2511 break;
never executed: break;
0
2512 case
never executed: case Qt::AlignHCenter:
Qt::AlignHCenter:
never executed: case Qt::AlignHCenter:
0
2513 r.moveTopLeft(QPoint(0, twf->rect.center().y() - r.height() / 2));-
2514 break;
never executed: break;
0
2515 case
never executed: case Qt::AlignRight:
Qt::AlignRight:
never executed: case Qt::AlignRight:
0
2516 r.moveTopLeft(QPoint(0, twf->rect.height() - twf->tabBarSize.height()-
2517 - twf->rightCornerWidgetSize.height()));-
2518 break;
never executed: break;
0
2519 }-
2520 break;
never executed: break;
0
2521 }-
2522 }
never executed: end of block
0
2523 break;
never executed: break;
0
2524 case
never executed: case SE_TabWidgetTabPane:
SE_TabWidgetTabPane:
never executed: case SE_TabWidgetTabPane:
0
2525 case
never executed: case SE_TabWidgetTabContents:
SE_TabWidgetTabContents:
never executed: case SE_TabWidgetTabContents:
0
2526 if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2527 QStyleOptionTab tabopt;-
2528 tabopt.shape = twf->shape;-
2529 int overlap = proxy()->pixelMetric(PM_TabBarBaseOverlap, &tabopt, widget);-
2530 if (twf->lineWidth == 0
twf->lineWidth == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2531 overlap = 0;
never executed: overlap = 0;
0
2532 switch (twf->shape) {-
2533 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
2534 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
2535 r = QRect(QPoint(0,qMax(twf->tabBarSize.height() - overlap, 0)),-
2536 QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height())));-
2537 break;
never executed: break;
0
2538 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
2539 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
2540 r = QRect(QPoint(0,0), QSize(twf->rect.width(), qMin(twf->rect.height() - twf->tabBarSize.height() + overlap, twf->rect.height())));-
2541 break;
never executed: break;
0
2542 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
2543 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
2544 r = QRect(QPoint(0, 0), QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height()));-
2545 break;
never executed: break;
0
2546 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
2547 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
2548 r = QRect(QPoint(qMax(twf->tabBarSize.width() - overlap, 0), 0),-
2549 QSize(qMin(twf->rect.width() - twf->tabBarSize.width() + overlap, twf->rect.width()), twf->rect.height()));-
2550 break;
never executed: break;
0
2551 }-
2552 if (sr == SE_TabWidgetTabContents
sr == SE_TabWidgetTabContentsDescription
TRUEnever evaluated
FALSEnever evaluated
&& twf->lineWidth > 0
twf->lineWidth > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2553 r.adjust(2, 2, -2, -2);
never executed: r.adjust(2, 2, -2, -2);
0
2554 }
never executed: end of block
0
2555 break;
never executed: break;
0
2556 case
never executed: case SE_TabWidgetLeftCorner:
SE_TabWidgetLeftCorner:
never executed: case SE_TabWidgetLeftCorner:
0
2557 if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2558 QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget);-
2559 switch (twf->shape) {-
2560 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
2561 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
2562 r = QRect(QPoint(paneRect.x(), paneRect.y() - twf->leftCornerWidgetSize.height()),-
2563 twf->leftCornerWidgetSize);-
2564 break;
never executed: break;
0
2565 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
2566 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
2567 r = QRect(QPoint(paneRect.x(), paneRect.height()), twf->leftCornerWidgetSize);-
2568 break;
never executed: break;
0
2569 default
never executed: default:
:
never executed: default:
0
2570 break;
never executed: break;
0
2571 }-
2572 r = visualRect(twf->direction, twf->rect, r);-
2573 }
never executed: end of block
0
2574 break;
never executed: break;
0
2575 case
never executed: case SE_TabWidgetRightCorner:
SE_TabWidgetRightCorner:
never executed: case SE_TabWidgetRightCorner:
0
2576 if (const
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)
const QStyleOp...tFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2577 QRect paneRect = subElementRect(SE_TabWidgetTabPane, twf, widget);-
2578 switch (twf->shape) {-
2579 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
2580 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
2581 r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(),-
2582 paneRect.y() - twf->rightCornerWidgetSize.height()),-
2583 twf->rightCornerWidgetSize);-
2584 break;
never executed: break;
0
2585 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
2586 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
2587 r = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(),-
2588 paneRect.height()), twf->rightCornerWidgetSize);-
2589 break;
never executed: break;
0
2590 default
never executed: default:
:
never executed: default:
0
2591 break;
never executed: break;
0
2592 }-
2593 r = visualRect(twf->direction, twf->rect, r);-
2594 }
never executed: end of block
0
2595 break;
never executed: break;
0
2596 case
never executed: case SE_TabBarTabText:
SE_TabBarTabText:
never executed: case SE_TabBarTabText:
0
2597 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2598 QRect dummyIconRect;-
2599 d->tabLayout(tab, widget, &r, &dummyIconRect);-
2600 }
never executed: end of block
0
2601 break;
never executed: break;
0
2602 case
never executed: case SE_TabBarTabLeftButton:
SE_TabBarTabLeftButton:
never executed: case SE_TabBarTabLeftButton:
0
2603 case
never executed: case SE_TabBarTabRightButton:
SE_TabBarTabRightButton:
never executed: case SE_TabBarTabRightButton:
0
2604 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2605 bool selected = tab->state & State_Selected;-
2606 int verticalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget);-
2607 int horizontalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget);-
2608 int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;-
2609 hpadding = qMax(hpadding, 4);-
2610-
2611 bool verticalTabs = tab->shape == QTabBar::RoundedEast
tab->shape == ...r::RoundedEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
2612 || tab->shape == QTabBar::RoundedWest
tab->shape == ...r::RoundedWestDescription
TRUEnever evaluated
FALSEnever evaluated
0
2613 || tab->shape == QTabBar::TriangularEast
tab->shape == ...TriangularEastDescription
TRUEnever evaluated
FALSEnever evaluated
0
2614 || tab->shape == QTabBar::TriangularWest
tab->shape == ...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
2615-
2616 QRect tr = tab->rect;-
2617 if (tab->shape == QTabBar::RoundedSouth
tab->shape == ...::RoundedSouthDescription
TRUEnever evaluated
FALSEnever evaluated
|| tab->shape == QTabBar::TriangularSouth
tab->shape == ...riangularSouthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2618 verticalShift = -verticalShift;
never executed: verticalShift = -verticalShift;
0
2619 if (verticalTabs
verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2620 qSwap(horizontalShift, verticalShift);-
2621 horizontalShift *= -1;-
2622 verticalShift *= -1;-
2623 }
never executed: end of block
0
2624 if (tab->shape == QTabBar::RoundedWest
tab->shape == ...r::RoundedWestDescription
TRUEnever evaluated
FALSEnever evaluated
|| tab->shape == QTabBar::TriangularWest
tab->shape == ...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2625 horizontalShift = -horizontalShift;
never executed: horizontalShift = -horizontalShift;
0
2626-
2627 tr.adjust(0, 0, horizontalShift, verticalShift);-
2628 if (selected
selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2629 {-
2630 tr.setBottom(tr.bottom() - verticalShift);-
2631 tr.setRight(tr.right() - horizontalShift);-
2632 }
never executed: end of block
0
2633-
2634 QSize size = (
(sr == SE_TabBarTabLeftButton)Description
TRUEnever evaluated
FALSEnever evaluated
sr == SE_TabBarTabLeftButton)
(sr == SE_TabBarTabLeftButton)Description
TRUEnever evaluated
FALSEnever evaluated
? tab->leftButtonSize : tab->rightButtonSize;
0
2635 int w = size.width();-
2636 int h = size.height();-
2637 int midHeight = static_cast<int>(qCeil(float(tr.height() - h) / 2));-
2638 int midWidth = ((tr.width() - w) / 2);-
2639-
2640 bool atTheTop = true;-
2641 switch (tab->shape) {-
2642 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
2643 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
2644 atTheTop = (sr == SE_TabBarTabLeftButton);-
2645 break;
never executed: break;
0
2646 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
2647 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
2648 atTheTop = (sr == SE_TabBarTabRightButton);-
2649 break;
never executed: break;
0
2650 default
never executed: default:
:
never executed: default:
0
2651 if (sr == SE_TabBarTabLeftButton
sr == SE_TabBarTabLeftButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2652 r = QRect(tab->rect.x() + hpadding, midHeight, w, h);
never executed: r = QRect(tab->rect.x() + hpadding, midHeight, w, h);
0
2653 else-
2654 r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h);
never executed: r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h);
0
2655 r = visualRect(tab->direction, tab->rect, r);-
2656 }
never executed: end of block
0
2657 if (verticalTabs
verticalTabsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2658 if (atTheTop
atTheTopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2659 r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h);
never executed: r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h);
0
2660 else-
2661 r = QRect(midWidth, tr.y() + hpadding, w, h);
never executed: r = QRect(midWidth, tr.y() + hpadding, w, h);
0
2662 }-
2663 }
never executed: end of block
0
2664-
2665 break;
never executed: break;
0
2666-
2667-
2668 case
never executed: case SE_TabBarTearIndicator:
SE_TabBarTearIndicator:
never executed: case SE_TabBarTearIndicator:
0
2669 if (const
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)
const QStyleOp...ionTab *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2670 switch (tab->shape) {-
2671 case
never executed: case QTabBar::RoundedNorth:
QTabBar::RoundedNorth:
never executed: case QTabBar::RoundedNorth:
0
2672 case
never executed: case QTabBar::TriangularNorth:
QTabBar::TriangularNorth:
never executed: case QTabBar::TriangularNorth:
0
2673 case
never executed: case QTabBar::RoundedSouth:
QTabBar::RoundedSouth:
never executed: case QTabBar::RoundedSouth:
0
2674 case
never executed: case QTabBar::TriangularSouth:
QTabBar::TriangularSouth:
never executed: case QTabBar::TriangularSouth:
0
2675 r.setRect(tab->rect.left(), tab->rect.top(), 8, opt->rect.height());-
2676 break;
never executed: break;
0
2677 case
never executed: case QTabBar::RoundedWest:
QTabBar::RoundedWest:
never executed: case QTabBar::RoundedWest:
0
2678 case
never executed: case QTabBar::TriangularWest:
QTabBar::TriangularWest:
never executed: case QTabBar::TriangularWest:
0
2679 case
never executed: case QTabBar::RoundedEast:
QTabBar::RoundedEast:
never executed: case QTabBar::RoundedEast:
0
2680 case
never executed: case QTabBar::TriangularEast:
QTabBar::TriangularEast:
never executed: case QTabBar::TriangularEast:
0
2681 r.setRect(tab->rect.left(), tab->rect.top(), opt->rect.width(), 8);-
2682 break;
never executed: break;
0
2683 default
never executed: default:
:
never executed: default:
0
2684 break;
never executed: break;
0
2685 }-
2686 r = visualRect(opt->direction, opt->rect, r);-
2687 }
never executed: end of block
0
2688 break;
never executed: break;
0
2689 case
never executed: case SE_TabBarScrollLeftButton:
SE_TabBarScrollLeftButton:
never executed: case SE_TabBarScrollLeftButton:
{
0
2690 const bool vertical = opt->rect.width() < opt->rect.height();-
2691 const Qt::LayoutDirection ld = widget->layoutDirection();-
2692 const int buttonWidth = qMax(pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());-
2693 const int buttonOverlap = pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget);-
2694-
2695 r = vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
? QRect(0, opt->rect.height() - (buttonWidth * 2) + buttonOverlap, opt->rect.width(), buttonWidth)
0
2696 : QStyle::visualRect(ld, opt->rect, QRect(opt->rect.width() - (buttonWidth * 2) + buttonOverlap, 0, buttonWidth, opt->rect.height()));-
2697 break;
never executed: break;
}
0
2698 case
never executed: case SE_TabBarScrollRightButton:
SE_TabBarScrollRightButton:
never executed: case SE_TabBarScrollRightButton:
{
0
2699 const bool vertical = opt->rect.width() < opt->rect.height();-
2700 const Qt::LayoutDirection ld = widget->layoutDirection();-
2701 const int buttonWidth = qMax(pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());-
2702-
2703 r = vertical
verticalDescription
TRUEnever evaluated
FALSEnever evaluated
? QRect(0, opt->rect.height() - buttonWidth, opt->rect.width(), buttonWidth)
0
2704 : QStyle::visualRect(ld, opt->rect, QRect(opt->rect.width() - buttonWidth, 0, buttonWidth, opt->rect.height()));-
2705 break;
never executed: break;
}
0
2706-
2707 case
never executed: case SE_TreeViewDisclosureItem:
SE_TreeViewDisclosureItem:
never executed: case SE_TreeViewDisclosureItem:
0
2708 r = opt->rect;-
2709 break;
never executed: break;
0
2710 case
never executed: case SE_LineEditContents:
SE_LineEditContents:
never executed: case SE_LineEditContents:
0
2711 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2712 r = f->rect.adjusted(f->lineWidth, f->lineWidth, -f->lineWidth, -f->lineWidth);-
2713 r = visualRect(opt->direction, opt->rect, r);-
2714 }
never executed: end of block
0
2715 break;
never executed: break;
0
2716 case
never executed: case SE_FrameContents:
SE_FrameContents:
never executed: case SE_FrameContents:
0
2717 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2718 int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, f, widget);-
2719 r = opt->rect.adjusted(fw, fw, -fw, -fw);-
2720 r = visualRect(opt->direction, opt->rect, r);-
2721 }
never executed: end of block
0
2722 break;
never executed: break;
0
2723 case
never executed: case SE_ShapedFrameContents:
SE_ShapedFrameContents:
never executed: case SE_ShapedFrameContents:
0
2724 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2725 int frameShape = f->frameShape;-
2726 int frameShadow = QFrame::Plain;-
2727 if (f->state & QStyle::State_Sunken
f->state & QSt...::State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2728 frameShadow = QFrame::Sunken;-
2729 }
never executed: end of block
else if (f->state & QStyle::State_Raised
f->state & QSt...::State_RaisedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2730 frameShadow = QFrame::Raised;-
2731 }
never executed: end of block
0
2732-
2733 int frameWidth = 0;-
2734-
2735 switch (frameShape) {-
2736 case
never executed: case QFrame::NoFrame:
QFrame::NoFrame:
never executed: case QFrame::NoFrame:
0
2737 frameWidth = 0;-
2738 break;
never executed: break;
0
2739-
2740 case
never executed: case QFrame::Box:
QFrame::Box:
never executed: case QFrame::Box:
0
2741 case
never executed: case QFrame::HLine:
QFrame::HLine:
never executed: case QFrame::HLine:
0
2742 case
never executed: case QFrame::VLine:
QFrame::VLine:
never executed: case QFrame::VLine:
0
2743 switch (frameShadow) {-
2744 case
never executed: case QFrame::Plain:
QFrame::Plain:
never executed: case QFrame::Plain:
0
2745 frameWidth = f->lineWidth;-
2746 break;
never executed: break;
0
2747 case
never executed: case QFrame::Raised:
QFrame::Raised:
never executed: case QFrame::Raised:
0
2748 case
never executed: case QFrame::Sunken:
QFrame::Sunken:
never executed: case QFrame::Sunken:
0
2749 frameWidth = (short)(f->lineWidth*2 + f->midLineWidth);-
2750 break;
never executed: break;
0
2751 }-
2752 break;
never executed: break;
0
2753-
2754 case
never executed: case QFrame::StyledPanel:
QFrame::StyledPanel:
never executed: case QFrame::StyledPanel:
0
2755-
2756-
2757 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2758 return
never executed: return widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget);
widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget);
never executed: return widget->style()->subElementRect(QStyle::SE_FrameContents, opt, widget);
0
2759 else-
2760 return
never executed: return subElementRect(QStyle::SE_FrameContents, opt, widget);
subElementRect(QStyle::SE_FrameContents, opt, widget);
never executed: return subElementRect(QStyle::SE_FrameContents, opt, widget);
0
2761-
2762 case
never executed: case QFrame::WinPanel:
QFrame::WinPanel:
never executed: case QFrame::WinPanel:
0
2763 frameWidth = 2;-
2764 break;
never executed: break;
0
2765-
2766 case
never executed: case QFrame::Panel:
QFrame::Panel:
never executed: case QFrame::Panel:
0
2767 switch (frameShadow) {-
2768 case
never executed: case QFrame::Plain:
QFrame::Plain:
never executed: case QFrame::Plain:
0
2769 case
never executed: case QFrame::Raised:
QFrame::Raised:
never executed: case QFrame::Raised:
0
2770 case
never executed: case QFrame::Sunken:
QFrame::Sunken:
never executed: case QFrame::Sunken:
0
2771 frameWidth = f->lineWidth;-
2772 break;
never executed: break;
0
2773 }-
2774 break;
never executed: break;
0
2775 }-
2776 r = f->rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth);-
2777 }
never executed: end of block
0
2778 break;
never executed: break;
0
2779-
2780 case
never executed: case SE_DockWidgetCloseButton:
SE_DockWidgetCloseButton:
never executed: case SE_DockWidgetCloseButton:
0
2781 case
never executed: case SE_DockWidgetFloatButton:
SE_DockWidgetFloatButton:
never executed: case SE_DockWidgetFloatButton:
0
2782 case
never executed: case SE_DockWidgetTitleBarText:
SE_DockWidgetTitleBarText:
never executed: case SE_DockWidgetTitleBarText:
0
2783 case
never executed: case SE_DockWidgetIcon:
SE_DockWidgetIcon:
never executed: case SE_DockWidgetIcon:
{
0
2784 int iconSize = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);-
2785 int buttonMargin = proxy()->pixelMetric(PM_DockWidgetTitleBarButtonMargin, opt, widget);-
2786 int margin = proxy()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, opt, widget);-
2787 QRect rect = opt->rect;-
2788-
2789 const QStyleOptionDockWidget *dwOpt-
2790 = qstyleoption_cast<const QStyleOptionDockWidget*>(opt);-
2791 bool canClose = dwOpt == 0
dwOpt == 0Description
TRUEnever evaluated
FALSEnever evaluated
? true : dwOpt->closable;
0
2792 bool canFloat = dwOpt == 0
dwOpt == 0Description
TRUEnever evaluated
FALSEnever evaluated
? false : dwOpt->floatable;
0
2793-
2794 const bool verticalTitleBar = dwOpt
dwOptDescription
TRUEnever evaluated
FALSEnever evaluated
&& dwOpt->verticalTitleBar
dwOpt->verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
2795-
2796-
2797-
2798-
2799 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2800 rect = rect.transposed();
never executed: rect = rect.transposed();
0
2801-
2802 do {-
2803-
2804 int right = rect.right();-
2805 int left = rect.left();-
2806-
2807 QRect closeRect;-
2808 if (canClose
canCloseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2809 QSize sz = proxy()->standardIcon(QStyle::SP_TitleBarCloseButton,-
2810 opt, widget).actualSize(QSize(iconSize, iconSize));-
2811 sz += QSize(buttonMargin, buttonMargin);-
2812 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2813 sz = sz.transposed();
never executed: sz = sz.transposed();
0
2814 closeRect = QRect(right - sz.width(),-
2815 rect.center().y() - sz.height()/2,-
2816 sz.width(), sz.height());-
2817 right = closeRect.left() - 1;-
2818 }
never executed: end of block
0
2819 if (sr == SE_DockWidgetCloseButton
sr == SE_DockWidgetCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2820 r = closeRect;-
2821 break;
never executed: break;
0
2822 }-
2823-
2824 QRect floatRect;-
2825 if (canFloat
canFloatDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2826 QSize sz = proxy()->standardIcon(QStyle::SP_TitleBarNormalButton,-
2827 opt, widget).actualSize(QSize(iconSize, iconSize));-
2828 sz += QSize(buttonMargin, buttonMargin);-
2829 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2830 sz = sz.transposed();
never executed: sz = sz.transposed();
0
2831 floatRect = QRect(right - sz.width(),-
2832 rect.center().y() - sz.height()/2,-
2833 sz.width(), sz.height());-
2834 right = floatRect.left() - 1;-
2835 }
never executed: end of block
0
2836 if (sr == SE_DockWidgetFloatButton
sr == SE_DockWidgetFloatButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2837 r = floatRect;-
2838 break;
never executed: break;
0
2839 }-
2840-
2841 QRect iconRect;-
2842 if (const
const QDockWid...dget*>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
QDockWidget *dw = qobject_cast<const QDockWidget*>(widget)
const QDockWid...dget*>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2843 QIcon icon;-
2844 if (dw->isFloating()
dw->isFloating()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2845 icon = dw->windowIcon();
never executed: icon = dw->windowIcon();
0
2846 if (!icon.isNull()
!icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
2847 && icon.cacheKey() != QApplication::windowIcon().cacheKey()
icon.cacheKey(...n().cacheKey()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2848 QSize sz = icon.actualSize(QSize(r.height(), r.height()));-
2849 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2850 sz = sz.transposed();
never executed: sz = sz.transposed();
0
2851 iconRect = QRect(left, rect.center().y() - sz.height()/2,-
2852 sz.width(), sz.height());-
2853 left = iconRect.right() + margin;-
2854 }
never executed: end of block
0
2855 }
never executed: end of block
0
2856 if (sr == SE_DockWidgetIcon
sr == SE_DockWidgetIconDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2857 r = iconRect;-
2858 break;
never executed: break;
0
2859 }-
2860-
2861 QRect textRect = QRect(left, rect.top(),-
2862 right - left, rect.height());-
2863 if (sr == SE_DockWidgetTitleBarText
sr == SE_DockW...etTitleBarTextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2864 r = textRect;-
2865 break;
never executed: break;
0
2866 }-
2867-
2868 } while (false);-
2869-
2870 if (verticalTitleBar
verticalTitleBarDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2871 r = QRect(rect.left() + r.top() - rect.top(),-
2872 rect.top() + rect.right() - r.right(),-
2873 r.height(), r.width());-
2874 }
never executed: end of block
else {
0
2875 r = visualRect(opt->direction, rect, r);-
2876 }
never executed: end of block
0
2877 break;
never executed: break;
0
2878 }-
2879-
2880-
2881 case
never executed: case SE_ItemViewItemCheckIndicator:
SE_ItemViewItemCheckIndicator:
never executed: case SE_ItemViewItemCheckIndicator:
0
2882 if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)
!qstyleoption_...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2883 r = subElementRect(SE_CheckBoxIndicator, opt, widget);-
2884 break;
never executed: break;
0
2885 }-
2886 case
never executed: case SE_ItemViewItemDecoration:
SE_ItemViewItemDecoration:
never executed: case SE_ItemViewItemDecoration:
code before this statement never executed: case SE_ItemViewItemDecoration:
0
2887 case
never executed: case SE_ItemViewItemText:
SE_ItemViewItemText:
never executed: case SE_ItemViewItemText:
0
2888 case
never executed: case SE_ItemViewItemFocusRect:
SE_ItemViewItemFocusRect:
never executed: case SE_ItemViewItemFocusRect:
0
2889 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2890 if (!d->isViewItemCached(*vopt)
!d->isViewItemCached(*vopt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2891 d->viewItemLayout(vopt, &d->checkRect, &d->decorationRect, &d->displayRect, false);-
2892 if (d->cachedOption
d->cachedOptionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2893 delete d->cachedOption;-
2894 d->cachedOption = 0;-
2895 }
never executed: end of block
0
2896 d->cachedOption = new QStyleOptionViewItem(*vopt);-
2897 }
never executed: end of block
0
2898 if (sr == SE_ViewItemCheckIndicator
sr == SE_ViewI...CheckIndicatorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2899 r = d->checkRect;
never executed: r = d->checkRect;
0
2900 else if (sr == SE_ItemViewItemDecoration
sr == SE_ItemV...ItemDecorationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2901 r = d->decorationRect;
never executed: r = d->decorationRect;
0
2902 else if (sr == SE_ItemViewItemText
sr == SE_ItemViewItemTextDescription
TRUEnever evaluated
FALSEnever evaluated
|| sr == SE_ItemViewItemFocusRect
sr == SE_ItemViewItemFocusRectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2903 r = d->displayRect;
never executed: r = d->displayRect;
0
2904 }
never executed: end of block
0
2905 break;
never executed: break;
0
2906-
2907-
2908 case
never executed: case SE_ToolBarHandle:
SE_ToolBarHandle:
never executed: case SE_ToolBarHandle:
0
2909 if (const
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt)
const QStyleOp...oolBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2910 if (tbopt->features & QStyleOptionToolBar::Movable
tbopt->feature...olBar::MovableDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2911-
2912-
2913 const QToolBar *tb = qobject_cast<const QToolBar*>(widget);-
2914 const int margin = tb
tbDescription
TRUEnever evaluated
FALSEnever evaluated
&& tb->layout()
tb->layout()Description
TRUEnever evaluated
FALSEnever evaluated
? tb->layout()->margin() : 2;
0
2915 const int handleExtent = pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb);-
2916 if (tbopt->state & QStyle::State_Horizontal
tbopt->state &...ate_HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2917 r = QRect(margin, margin, handleExtent, tbopt->rect.height() - 2*margin);-
2918 r = QStyle::visualRect(tbopt->direction, tbopt->rect, r);-
2919 }
never executed: end of block
else {
0
2920 r = QRect(margin, margin, tbopt->rect.width() - 2*margin, handleExtent);-
2921 }
never executed: end of block
0
2922 }-
2923 }
never executed: end of block
0
2924 break;
never executed: break;
0
2925-
2926 default
never executed: default:
:
never executed: default:
0
2927 break;
never executed: break;
0
2928 }-
2929 return
never executed: return r;
r;
never executed: return r;
0
2930}-
2931-
2932-
2933-
2934-
2935template <int N>-
2936struct StaticPolygonF-
2937{-
2938 QPointF data[N];-
2939-
2940 constexpr int size() const { return N; }-
2941 constexpr const QPointF *cbegin() const { return data; }-
2942 constexpr const QPointF &operator[](int idx) const { return data[idx]; }-
2943};-
2944-
2945static StaticPolygonF<3> calcArrow(const QStyleOptionSlider *dial, qreal &a)-
2946{-
2947 int width = dial->rect.width();-
2948 int height = dial->rect.height();-
2949 int r = qMin(width, height) / 2;-
2950 int currentSliderPosition = dial->upsideDown
dial->upsideDownDescription
TRUEnever evaluated
FALSEnever evaluated
? dial->sliderPosition : (dial->maximum - dial->sliderPosition);
0
2951-
2952 if (dial->maximum == dial->minimum
dial->maximum == dial->minimumDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2953 a = Q_PI / 2;
never executed: a = Q_PI / 2;
0
2954 else if (dial->dialWrapping
dial->dialWrappingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2955 a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI
never executed: a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum);
0
2956 / (dial->maximum - dial->minimum);
never executed: a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum);
0
2957 else-
2958 a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI
never executed: a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6;
0
2959 / (dial->maximum - dial->minimum)) / 6;
never executed: a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6;
0
2960-
2961 int xc = width / 2;-
2962 int yc = height / 2;-
2963-
2964 int len = r - QStyleHelper::calcBigLineSize(r) - 5;-
2965 if (len < 5
len < 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2966 len = 5;
never executed: len = 5;
0
2967 int back = len / 2;-
2968-
2969 StaticPolygonF<3> arrow = {{-
2970 QPointF(0.5 + xc + len * qCos(a),-
2971 0.5 + yc - len * qSin(a)),-
2972 QPointF(0.5 + xc + back * qCos(a + Q_PI * 5 / 6),-
2973 0.5 + yc - back * qSin(a + Q_PI * 5 / 6)),-
2974 QPointF(0.5 + xc + back * qCos(a - Q_PI * 5 / 6),-
2975 0.5 + yc - back * qSin(a - Q_PI * 5 / 6)),-
2976 }};-
2977 return
never executed: return arrow;
arrow;
never executed: return arrow;
0
2978}-
2979-
2980-
2981-
2982-
2983-
2984-
2985void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,-
2986 QPainter *p, const QWidget *widget) const-
2987{-
2988 switch (cc) {-
2989-
2990 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
2991 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2992 if (slider->subControls == SC_SliderTickmarks
slider->subCon...liderTickmarksDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2993 int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget);-
2994 int ticks = slider->tickPosition;-
2995 int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget);-
2996 int len = proxy()->pixelMetric(PM_SliderLength, slider, widget);-
2997 int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, slider, widget);-
2998 int interval = slider->tickInterval;-
2999 if (interval <= 0
interval <= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3000 interval = slider->singleStep;-
3001 if (QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval,
QStyle::slider...available) < 3Description
TRUEnever evaluated
FALSEnever evaluated
0
3002 available)
QStyle::slider...available) < 3Description
TRUEnever evaluated
FALSEnever evaluated
0
3003 - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum,
QStyle::slider...available) < 3Description
TRUEnever evaluated
FALSEnever evaluated
0
3004 0, available) < 3
QStyle::slider...available) < 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3005 interval = slider->pageStep;
never executed: interval = slider->pageStep;
0
3006 }
never executed: end of block
0
3007 if (!interval
!intervalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3008 interval = 1;
never executed: interval = 1;
0
3009 int fudge = len / 2;-
3010 int pos;-
3011-
3012 p->save();-
3013 p->translate(slider->rect.x(), slider->rect.y());-
3014 p->setPen(slider->palette.foreground().color());-
3015 int v = slider->minimum;-
3016 while (v <= slider->maximum + 1
v <= slider->maximum + 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3017 if (v == slider->maximum + 1
v == slider->maximum + 1Description
TRUEnever evaluated
FALSEnever evaluated
&& interval == 1
interval == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3018 break;
never executed: break;
0
3019 const int v_ = qMin(v, slider->maximum);-
3020 pos = QStyle::sliderPositionFromValue(slider->minimum, slider->maximum,-
3021 v_, available) + fudge;-
3022 if (slider->orientation == Qt::Horizontal
slider->orient...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3023 if (ticks & QSlider::TicksAbove
ticks & QSlider::TicksAboveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3024 p->drawLine(pos, 0, pos, tickOffset - 2);
never executed: p->drawLine(pos, 0, pos, tickOffset - 2);
0
3025 if (ticks & QSlider::TicksBelow
ticks & QSlider::TicksBelowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3026 p->drawLine(pos, tickOffset + thickness + 1, pos,
never executed: p->drawLine(pos, tickOffset + thickness + 1, pos, slider->rect.height()-1);
0
3027 slider->rect.height()-1);
never executed: p->drawLine(pos, tickOffset + thickness + 1, pos, slider->rect.height()-1);
0
3028 }
never executed: end of block
else {
0
3029 if (ticks & QSlider::TicksAbove
ticks & QSlider::TicksAboveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3030 p->drawLine(0, pos, tickOffset - 2, pos);
never executed: p->drawLine(0, pos, tickOffset - 2, pos);
0
3031 if (ticks & QSlider::TicksBelow
ticks & QSlider::TicksBelowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3032 p->drawLine(tickOffset + thickness + 1, pos,
never executed: p->drawLine(tickOffset + thickness + 1, pos, slider->rect.width()-1, pos);
0
3033 slider->rect.width()-1, pos);
never executed: p->drawLine(tickOffset + thickness + 1, pos, slider->rect.width()-1, pos);
0
3034 }
never executed: end of block
0
3035-
3036 int nextInterval = v + interval;-
3037 if (nextInterval < v
nextInterval < vDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3038 break;
never executed: break;
0
3039 v = nextInterval;-
3040 }
never executed: end of block
0
3041 p->restore();-
3042 }
never executed: end of block
0
3043 }
never executed: end of block
0
3044 break;
never executed: break;
0
3045-
3046-
3047 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
0
3048 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3049-
3050 QStyleOptionSlider newScrollbar = *scrollbar;-
3051 State saveFlags = scrollbar->state;-
3052-
3053 if (scrollbar->subControls & SC_ScrollBarSubLine
scrollbar->sub...rollBarSubLineDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3054 newScrollbar.state = saveFlags;-
3055 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubLine, widget);-
3056 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3057 if (!(scrollbar->activeSubControls & SC_ScrollBarSubLine)
!(scrollbar->a...ollBarSubLine)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3058 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3059 proxy()->drawControl(CE_ScrollBarSubLine, &newScrollbar, p, widget);-
3060 }
never executed: end of block
0
3061 }
never executed: end of block
0
3062 if (scrollbar->subControls & SC_ScrollBarAddLine
scrollbar->sub...rollBarAddLineDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3063 newScrollbar.rect = scrollbar->rect;-
3064 newScrollbar.state = saveFlags;-
3065 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddLine, widget);-
3066 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3067 if (!(scrollbar->activeSubControls & SC_ScrollBarAddLine)
!(scrollbar->a...ollBarAddLine)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3068 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3069 proxy()->drawControl(CE_ScrollBarAddLine, &newScrollbar, p, widget);-
3070 }
never executed: end of block
0
3071 }
never executed: end of block
0
3072 if (scrollbar->subControls & SC_ScrollBarSubPage
scrollbar->sub...rollBarSubPageDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3073 newScrollbar.rect = scrollbar->rect;-
3074 newScrollbar.state = saveFlags;-
3075 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSubPage, widget);-
3076 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3077 if (!(scrollbar->activeSubControls & SC_ScrollBarSubPage)
!(scrollbar->a...ollBarSubPage)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3078 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3079 proxy()->drawControl(CE_ScrollBarSubPage, &newScrollbar, p, widget);-
3080 }
never executed: end of block
0
3081 }
never executed: end of block
0
3082 if (scrollbar->subControls & SC_ScrollBarAddPage
scrollbar->sub...rollBarAddPageDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3083 newScrollbar.rect = scrollbar->rect;-
3084 newScrollbar.state = saveFlags;-
3085 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarAddPage, widget);-
3086 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3087 if (!(scrollbar->activeSubControls & SC_ScrollBarAddPage)
!(scrollbar->a...ollBarAddPage)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3088 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3089 proxy()->drawControl(CE_ScrollBarAddPage, &newScrollbar, p, widget);-
3090 }
never executed: end of block
0
3091 }
never executed: end of block
0
3092 if (scrollbar->subControls & SC_ScrollBarFirst
scrollbar->sub...ScrollBarFirstDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3093 newScrollbar.rect = scrollbar->rect;-
3094 newScrollbar.state = saveFlags;-
3095 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarFirst, widget);-
3096 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3097 if (!(scrollbar->activeSubControls & SC_ScrollBarFirst)
!(scrollbar->a...crollBarFirst)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3098 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3099 proxy()->drawControl(CE_ScrollBarFirst, &newScrollbar, p, widget);-
3100 }
never executed: end of block
0
3101 }
never executed: end of block
0
3102 if (scrollbar->subControls & SC_ScrollBarLast
scrollbar->sub..._ScrollBarLastDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3103 newScrollbar.rect = scrollbar->rect;-
3104 newScrollbar.state = saveFlags;-
3105 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarLast, widget);-
3106 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3107 if (!(scrollbar->activeSubControls & SC_ScrollBarLast)
!(scrollbar->a...ScrollBarLast)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3108 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3109 proxy()->drawControl(CE_ScrollBarLast, &newScrollbar, p, widget);-
3110 }
never executed: end of block
0
3111 }
never executed: end of block
0
3112 if (scrollbar->subControls & SC_ScrollBarSlider
scrollbar->sub...crollBarSliderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3113 newScrollbar.rect = scrollbar->rect;-
3114 newScrollbar.state = saveFlags;-
3115 newScrollbar.rect = proxy()->subControlRect(cc, &newScrollbar, SC_ScrollBarSlider, widget);-
3116 if (newScrollbar.rect.isValid()
newScrollbar.rect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3117 if (!(scrollbar->activeSubControls & SC_ScrollBarSlider)
!(scrollbar->a...rollBarSlider)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3118 newScrollbar.state &= ~(State_Sunken | State_MouseOver);
never executed: newScrollbar.state &= ~(State_Sunken | State_MouseOver);
0
3119 proxy()->drawControl(CE_ScrollBarSlider, &newScrollbar, p, widget);-
3120-
3121 if (scrollbar->state & State_HasFocus
scrollbar->sta...State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3122 QStyleOptionFocusRect fropt;-
3123 fropt.QStyleOption::operator=(newScrollbar);-
3124 fropt.rect.setRect(newScrollbar.rect.x() + 2, newScrollbar.rect.y() + 2,-
3125 newScrollbar.rect.width() - 5,-
3126 newScrollbar.rect.height() - 5);-
3127 proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);-
3128 }
never executed: end of block
0
3129 }
never executed: end of block
0
3130 }
never executed: end of block
0
3131 }
never executed: end of block
0
3132 break;
never executed: break;
0
3133-
3134-
3135 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
0
3136 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3137 QStyleOptionSpinBox copy = *sb;-
3138 PrimitiveElement pe;-
3139-
3140 if (sb->frame
sb->frameDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(sb->subContro..._SpinBoxFrame)Description
TRUEnever evaluated
FALSEnever evaluated
sb->subControls & SC_SpinBoxFrame)
(sb->subContro..._SpinBoxFrame)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3141 QRect r = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxFrame, widget);-
3142 qDrawWinPanel(p, r, sb->palette, true);-
3143 }
never executed: end of block
0
3144-
3145 if (sb->subControls & SC_SpinBoxUp
sb->subControls & SC_SpinBoxUpDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3146 copy.subControls = SC_SpinBoxUp;-
3147 QPalette pal2 = sb->palette;-
3148 if (!(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled)
!(sb->stepEnab...StepUpEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3149 pal2.setCurrentColorGroup(QPalette::Disabled);-
3150 copy.state &= ~State_Enabled;-
3151 }
never executed: end of block
0
3152-
3153 copy.palette = pal2;-
3154-
3155 if (sb->activeSubControls == SC_SpinBoxUp
sb->activeSubC...= SC_SpinBoxUpDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(sb->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
sb->state & State_Sunken)
(sb->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3156 copy.state |= State_On;-
3157 copy.state |= State_Sunken;-
3158 }
never executed: end of block
else {
0
3159 copy.state |= State_Raised;-
3160 copy.state &= ~State_Sunken;-
3161 }
never executed: end of block
0
3162 pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus
sb->buttonSymb...Box::PlusMinusDescription
TRUEnever evaluated
FALSEnever evaluated
? PE_IndicatorSpinPlus
0
3163 : PE_IndicatorSpinUp);-
3164-
3165 copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget);-
3166 proxy()->drawPrimitive(PE_PanelButtonBevel, &copy, p, widget);-
3167 copy.rect.adjust(3, 0, -4, 0);-
3168 proxy()->drawPrimitive(pe, &copy, p, widget);-
3169 }
never executed: end of block
0
3170-
3171 if (sb->subControls & SC_SpinBoxDown
sb->subControl...SC_SpinBoxDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3172 copy.subControls = SC_SpinBoxDown;-
3173 copy.state = sb->state;-
3174 QPalette pal2 = sb->palette;-
3175 if (!(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled)
!(sb->stepEnab...epDownEnabled)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3176 pal2.setCurrentColorGroup(QPalette::Disabled);-
3177 copy.state &= ~State_Enabled;-
3178 }
never executed: end of block
0
3179 copy.palette = pal2;-
3180-
3181 if (sb->activeSubControls == SC_SpinBoxDown
sb->activeSubC...SC_SpinBoxDownDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(sb->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
sb->state & State_Sunken)
(sb->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3182 copy.state |= State_On;-
3183 copy.state |= State_Sunken;-
3184 }
never executed: end of block
else {
0
3185 copy.state |= State_Raised;-
3186 copy.state &= ~State_Sunken;-
3187 }
never executed: end of block
0
3188 pe = (sb->buttonSymbols == QAbstractSpinBox::PlusMinus
sb->buttonSymb...Box::PlusMinusDescription
TRUEnever evaluated
FALSEnever evaluated
? PE_IndicatorSpinMinus
0
3189 : PE_IndicatorSpinDown);-
3190-
3191 copy.rect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget);-
3192 proxy()->drawPrimitive(PE_PanelButtonBevel, &copy, p, widget);-
3193 copy.rect.adjust(3, 0, -4, 0);-
3194 proxy()->drawPrimitive(pe, &copy, p, widget);-
3195 }
never executed: end of block
0
3196 }
never executed: end of block
0
3197 break;
never executed: break;
0
3198-
3199-
3200 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
3201 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *toolbutton
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
0
3202 = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3203 QRect button, menuarea;-
3204 button = proxy()->subControlRect(cc, toolbutton, SC_ToolButton, widget);-
3205 menuarea = proxy()->subControlRect(cc, toolbutton, SC_ToolButtonMenu, widget);-
3206-
3207 State bflags = toolbutton->state & ~State_Sunken;-
3208-
3209 if (bflags & State_AutoRaise
bflags & State_AutoRaiseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3210 if (!(bflags & State_MouseOver)
!(bflags & State_MouseOver)Description
TRUEnever evaluated
FALSEnever evaluated
|| !(bflags & State_Enabled)
!(bflags & State_Enabled)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3211 bflags &= ~State_Raised;-
3212 }
never executed: end of block
0
3213 }
never executed: end of block
0
3214 State mflags = bflags;-
3215 if (toolbutton->state & State_Sunken
toolbutton->st...& State_SunkenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3216 if (toolbutton->activeSubControls & SC_ToolButton
toolbutton->ac... SC_ToolButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3217 bflags |= State_Sunken;
never executed: bflags |= State_Sunken;
0
3218 mflags |= State_Sunken;-
3219 }
never executed: end of block
0
3220-
3221 QStyleOption tool = *toolbutton;-
3222 if (toolbutton->subControls & SC_ToolButton
toolbutton->su... SC_ToolButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3223 if (bflags & (State_Sunken | State_On | State_Raised)
bflags & (Stat... State_Raised)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3224 tool.rect = button;-
3225 tool.state = bflags;-
3226 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3227 }
never executed: end of block
0
3228 }
never executed: end of block
0
3229-
3230 if (toolbutton->state & State_HasFocus
toolbutton->st...State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3231 QStyleOptionFocusRect fr;-
3232 fr.QStyleOption::operator=(*toolbutton);-
3233 fr.rect.adjust(3, 3, -3, -3);-
3234 if (toolbutton->features & QStyleOptionToolButton::MenuButtonPopup
toolbutton->fe...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3235 fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator,
never executed: fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, widget), 0);
0
3236 toolbutton, widget), 0);
never executed: fr.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, widget), 0);
0
3237 proxy()->drawPrimitive(PE_FrameFocusRect, &fr, p, widget);-
3238 }
never executed: end of block
0
3239 QStyleOptionToolButton label = *toolbutton;-
3240 label.state = bflags;-
3241 int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);-
3242 label.rect = button.adjusted(fw, fw, -fw, -fw);-
3243 proxy()->drawControl(CE_ToolButtonLabel, &label, p, widget);-
3244-
3245 if (toolbutton->subControls & SC_ToolButtonMenu
toolbutton->su...ToolButtonMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3246 tool.rect = menuarea;-
3247 tool.state = mflags;-
3248 if (mflags & (State_Sunken | State_On | State_Raised)
mflags & (Stat... State_Raised)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3249 proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, p, widget);
never executed: proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, p, widget);
0
3250 proxy()->drawPrimitive(PE_IndicatorArrowDown, &tool, p, widget);-
3251 }
never executed: end of block
else if (toolbutton->features & QStyleOptionToolButton::HasMenu
toolbutton->fe...utton::HasMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3252 int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolbutton, widget);-
3253 QRect ir = toolbutton->rect;-
3254 QStyleOptionToolButton newBtn = *toolbutton;-
3255 newBtn.rect = QRect(ir.right() + 5 - mbi, ir.y() + ir.height() - mbi + 4, mbi - 6, mbi - 6);-
3256 proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget);-
3257 }
never executed: end of block
0
3258 }
never executed: end of block
0
3259 break;
never executed: break;
0
3260-
3261 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
3262 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3263 QRect ir;-
3264 if (opt->subControls & SC_TitleBarLabel
opt->subContro..._TitleBarLabelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3265 QColor left = tb->palette.highlight().color();-
3266 QColor right = tb->palette.base().color();-
3267-
3268 QBrush fillBrush(left);-
3269 if (left != right
left != rightDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3270 QPoint p1(tb->rect.x(), tb->rect.top() + tb->rect.height()/2);-
3271 QPoint p2(tb->rect.right(), tb->rect.top() + tb->rect.height()/2);-
3272 QLinearGradient lg(p1, p2);-
3273 lg.setColorAt(0, left);-
3274 lg.setColorAt(1, right);-
3275 fillBrush = lg;-
3276 }
never executed: end of block
0
3277-
3278 p->fillRect(opt->rect, fillBrush);-
3279-
3280 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarLabel, widget);-
3281-
3282 p->setPen(tb->palette.highlightedText().color());-
3283 p->drawText(ir.x() + 2, ir.y(), ir.width() - 2, ir.height(),-
3284 Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, tb->text);-
3285 }
never executed: end of block
0
3286-
3287 bool down = false;-
3288 QPixmap pm;-
3289-
3290 QStyleOption tool = *tb;-
3291 if (tb->subControls & SC_TitleBarCloseButton
tb->subControl...BarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& tb->titleBarFlags & Qt::WindowSystemMenuHint
tb->titleBarFl...SystemMenuHintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3292 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarCloseButton, widget);-
3293 down = tb->activeSubControls & SC_TitleBarCloseButton
tb->activeSubC...BarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3294 if ((
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
0
3295-
3296 || qobject_cast<const QDockWidget *>(widget)
qobject_cast<c...get *>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
0
3297-
3298 )-
3299 pm = proxy()->standardIcon(SP_DockWidgetCloseButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));
never executed: pm = proxy()->standardIcon(SP_DockWidgetCloseButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));
0
3300 else-
3301 pm = proxy()->standardIcon(SP_TitleBarCloseButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));
never executed: pm = proxy()->standardIcon(SP_TitleBarCloseButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));
0
3302 tool.rect = ir;-
3303 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3304 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3305-
3306 p->save();-
3307 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3308 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3309 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3310 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3311 p->restore();-
3312 }
never executed: end of block
0
3313-
3314 if (tb->subControls & SC_TitleBarMaxButton
tb->subControl...leBarMaxButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3315 && tb->titleBarFlags & Qt::WindowMaximizeButtonHint
tb->titleBarFl...mizeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
0
3316 && !(tb->titleBarState & Qt::WindowMaximized)
!(tb->titleBar...ndowMaximized)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3317 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMaxButton, widget);-
3318-
3319 down = tb->activeSubControls & SC_TitleBarMaxButton
tb->activeSubC...leBarMaxButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3320 pm = proxy()->standardIcon(SP_TitleBarMaxButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3321 tool.rect = ir;-
3322 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3323 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3324-
3325 p->save();-
3326 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3327 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3328 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3329 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3330 p->restore();-
3331 }
never executed: end of block
0
3332-
3333 if (tb->subControls & SC_TitleBarMinButton
tb->subControl...leBarMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3334 && tb->titleBarFlags & Qt::WindowMinimizeButtonHint
tb->titleBarFl...mizeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
0
3335 && !(tb->titleBarState & Qt::WindowMinimized)
!(tb->titleBar...ndowMinimized)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3336 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarMinButton, widget);-
3337 down = tb->activeSubControls & SC_TitleBarMinButton
tb->activeSubC...leBarMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3338 pm = proxy()->standardIcon(SP_TitleBarMinButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3339 tool.rect = ir;-
3340 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3341 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3342-
3343 p->save();-
3344 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3345 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3346 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3347 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3348 p->restore();-
3349 }
never executed: end of block
0
3350-
3351 bool drawNormalButton = (
(tb->subContro...rNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
tb->subControls & SC_TitleBarNormalButton)
(tb->subContro...rNormalButton)Description
TRUEnever evaluated
FALSEnever evaluated
0
3352 && (((
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMinimizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
0
3353 && (
(tb->titleBarS...ndowMinimized)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarState & Qt::WindowMinimized)
(tb->titleBarS...ndowMinimized)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3354 || ((
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
0
3355 && (
(tb->titleBarS...ndowMaximized)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarState & Qt::WindowMaximized)
(tb->titleBarS...ndowMaximized)Description
TRUEnever evaluated
FALSEnever evaluated
));
0
3356-
3357 if (drawNormalButton
drawNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3358 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarNormalButton, widget);-
3359 down = tb->activeSubControls & SC_TitleBarNormalButton
tb->activeSubC...arNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3360 pm = proxy()->standardIcon(SP_TitleBarNormalButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3361 tool.rect = ir;-
3362 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3363 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3364-
3365 p->save();-
3366 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3367 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3368 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3369 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3370 p->restore();-
3371 }
never executed: end of block
0
3372-
3373 if (tb->subControls & SC_TitleBarShadeButton
tb->subControl...BarShadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3374 && tb->titleBarFlags & Qt::WindowShadeButtonHint
tb->titleBarFl...hadeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
0
3375 && !(tb->titleBarState & Qt::WindowMinimized)
!(tb->titleBar...ndowMinimized)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3376 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarShadeButton, widget);-
3377 down = (tb->activeSubControls & SC_TitleBarShadeButton
tb->activeSubC...BarShadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
3378 pm = proxy()->standardIcon(SP_TitleBarShadeButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3379 tool.rect = ir;-
3380 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3381 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3382 p->save();-
3383 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3384 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3385 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3386 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3387 p->restore();-
3388 }
never executed: end of block
0
3389-
3390 if (tb->subControls & SC_TitleBarUnshadeButton
tb->subControl...rUnshadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3391 && tb->titleBarFlags & Qt::WindowShadeButtonHint
tb->titleBarFl...hadeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
0
3392 && tb->titleBarState & Qt::WindowMinimized
tb->titleBarSt...indowMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3393 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarUnshadeButton, widget);-
3394-
3395 down = tb->activeSubControls & SC_TitleBarUnshadeButton
tb->activeSubC...rUnshadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3396 pm = proxy()->standardIcon(SP_TitleBarUnshadeButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3397 tool.rect = ir;-
3398 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3399 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3400 p->save();-
3401 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3402 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3403 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3404 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3405 p->restore();-
3406 }
never executed: end of block
0
3407 if (tb->subControls & SC_TitleBarContextHelpButton
tb->subControl...textHelpButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
3408 && tb->titleBarFlags & Qt::WindowContextHelpButtonHint
tb->titleBarFl...HelpButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3409 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarContextHelpButton, widget);-
3410-
3411 down = tb->activeSubControls & SC_TitleBarContextHelpButton
tb->activeSubC...textHelpButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
3412 pm = proxy()->standardIcon(SP_TitleBarContextHelpButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(10, 10));-
3413 tool.rect = ir;-
3414 tool.state = down
downDescription
TRUEnever evaluated
FALSEnever evaluated
? State_Sunken : State_Raised;
0
3415 proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget);-
3416 p->save();-
3417 if (down
downDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3418 p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget),
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3419 proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
never executed: p->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, tb, widget), proxy()->pixelMetric(PM_ButtonShiftVertical, tb, widget));
0
3420 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3421 p->restore();-
3422 }
never executed: end of block
0
3423 if (tb->subControls & SC_TitleBarSysMenu
tb->subControl...itleBarSysMenuDescription
TRUEnever evaluated
FALSEnever evaluated
&& tb->titleBarFlags & Qt::WindowSystemMenuHint
tb->titleBarFl...SystemMenuHintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3424 ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarSysMenu, widget);-
3425 if (!tb->icon.isNull()
!tb->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3426 tb->icon.paint(p, ir);-
3427 }
never executed: end of block
else {
0
3428 int iconSize = proxy()->pixelMetric(PM_SmallIconSize, tb, widget);-
3429 pm = proxy()->standardIcon(SP_TitleBarMenuButton, &tool, widget).pixmap(qt_getWindow(widget), QSize(iconSize, iconSize));-
3430 tool.rect = ir;-
3431 p->save();-
3432 proxy()->drawItemPixmap(p, ir, Qt::AlignCenter, pm);-
3433 p->restore();-
3434 }
never executed: end of block
0
3435 }-
3436 }
never executed: end of block
0
3437 break;
never executed: break;
0
3438-
3439 case
never executed: case CC_Dial:
CC_Dial:
never executed: case CC_Dial:
0
3440 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3441-
3442 p->save();-
3443-
3444-
3445 if (p->paintEngine()->hasFeature(QPaintEngine::Antialiasing)
p->paintEngine...:Antialiasing)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3446 p->setRenderHint(QPainter::Antialiasing);
never executed: p->setRenderHint(QPainter::Antialiasing);
0
3447-
3448 int width = dial->rect.width();-
3449 int height = dial->rect.height();-
3450 qreal r = qMin(width, height) / 2;-
3451 qreal d_ = r / 6;-
3452 qreal dx = dial->rect.x() + d_ + (width - 2 * r) / 2 + 1;-
3453 qreal dy = dial->rect.y() + d_ + (height - 2 * r) / 2 + 1;-
3454 QRect br = QRect(int(dx), int(dy), int(r * 2 - 2 * d_ - 2), int(r * 2 - 2 * d_ - 2));-
3455-
3456 QPalette pal = opt->palette;-
3457-
3458 if (dial->subControls & QStyle::SC_DialTickmarks
dial->subContr..._DialTickmarksDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3459 p->setPen(pal.foreground().color());-
3460 p->drawLines(QStyleHelper::calcLines(dial));-
3461 }
never executed: end of block
0
3462-
3463 if (dial->state & State_Enabled
dial->state & State_EnabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3464 p->setBrush(pal.brush(QPalette::ColorRole(proxy()->styleHint(SH_Dial_BackgroundRole,-
3465 dial, widget))));-
3466 p->setPen(Qt::NoPen);-
3467 p->drawEllipse(br);-
3468 p->setBrush(Qt::NoBrush);-
3469 }
never executed: end of block
0
3470 p->setPen(QPen(pal.dark().color()));-
3471 p->drawArc(br, 60 * 16, 180 * 16);-
3472 p->setPen(QPen(pal.light().color()));-
3473 p->drawArc(br, 240 * 16, 180 * 16);-
3474-
3475 qreal a;-
3476 const StaticPolygonF<3> arrow = calcArrow(dial, a);-
3477-
3478 p->setPen(Qt::NoPen);-
3479 p->setBrush(pal.button());-
3480 p->setRenderHint(QPainter::Qt4CompatiblePainting);-
3481 p->drawPolygon(arrow.cbegin(), arrow.size());-
3482-
3483 a = QStyleHelper::angle(QPointF(width / 2, height / 2), arrow[0]);-
3484 p->setBrush(Qt::NoBrush);-
3485-
3486 if (a <= 0
a <= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| a > 200
a > 200Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3487 p->setPen(pal.light().color());-
3488 p->drawLine(arrow[2], arrow[0]);-
3489 p->drawLine(arrow[1], arrow[2]);-
3490 p->setPen(pal.dark().color());-
3491 p->drawLine(arrow[0], arrow[1]);-
3492 }
never executed: end of block
else if (a > 0
a > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& a < 45
a < 45Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3493 p->setPen(pal.light().color());-
3494 p->drawLine(arrow[2], arrow[0]);-
3495 p->setPen(pal.dark().color());-
3496 p->drawLine(arrow[1], arrow[2]);-
3497 p->drawLine(arrow[0], arrow[1]);-
3498 }
never executed: end of block
else if (a >= 45
a >= 45Description
TRUEnever evaluated
FALSEnever evaluated
&& a < 135
a < 135Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3499 p->setPen(pal.dark().color());-
3500 p->drawLine(arrow[2], arrow[0]);-
3501 p->drawLine(arrow[1], arrow[2]);-
3502 p->setPen(pal.light().color());-
3503 p->drawLine(arrow[0], arrow[1]);-
3504 }
never executed: end of block
else if (a >= 135
a >= 135Description
TRUEnever evaluated
FALSEnever evaluated
&& a < 200
a < 200Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3505 p->setPen(pal.dark().color());-
3506 p->drawLine(arrow[2], arrow[0]);-
3507 p->setPen(pal.light().color());-
3508 p->drawLine(arrow[0], arrow[1]);-
3509 p->drawLine(arrow[1], arrow[2]);-
3510 }
never executed: end of block
0
3511-
3512-
3513 QStyleOptionFocusRect fropt;-
3514 fropt.rect = dial->rect;-
3515 fropt.state = dial->state;-
3516 fropt.palette = dial->palette;-
3517 if (fropt.state & QStyle::State_HasFocus
fropt.state & ...State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3518 br.adjust(0, 0, 2, 2);-
3519 if (dial->subControls & SC_DialTickmarks
dial->subContr..._DialTickmarksDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3520 int r = qMin(width, height) / 2;-
3521 br.translate(-r / 6, - r / 6);-
3522 br.setWidth(br.width() + r / 3);-
3523 br.setHeight(br.height() + r / 3);-
3524 }
never executed: end of block
0
3525 fropt.rect = br.adjusted(-2, -2, 2, 2);-
3526 proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &fropt, p, widget);-
3527 }
never executed: end of block
0
3528 p->restore();-
3529 }
never executed: end of block
0
3530 break;
never executed: break;
0
3531-
3532-
3533 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
0
3534 if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3535-
3536 QRect textRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxLabel, widget);-
3537 QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxCheckBox, widget);-
3538 if (groupBox->subControls & QStyle::SC_GroupBoxFrame
groupBox->subC..._GroupBoxFrameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3539 QStyleOptionFrame frame;-
3540 frame.QStyleOption::operator=(*groupBox);-
3541 frame.features = groupBox->features;-
3542 frame.lineWidth = groupBox->lineWidth;-
3543 frame.midLineWidth = groupBox->midLineWidth;-
3544 frame.rect = proxy()->subControlRect(CC_GroupBox, opt, SC_GroupBoxFrame, widget);-
3545 p->save();-
3546 QRegion region(groupBox->rect);-
3547 if (!groupBox->text.isEmpty()
!groupBox->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3548 bool ltr = groupBox->direction == Qt::LeftToRight;-
3549 QRect finalRect;-
3550 if (groupBox->subControls & QStyle::SC_GroupBoxCheckBox
groupBox->subC...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3551 finalRect = checkBoxRect.united(textRect);-
3552 finalRect.adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0);-
3553 }
never executed: end of block
else {
0
3554 finalRect = textRect;-
3555 }
never executed: end of block
0
3556 region -= finalRect;-
3557 }
never executed: end of block
0
3558 p->setClipRegion(region);-
3559 proxy()->drawPrimitive(PE_FrameGroupBox, &frame, p, widget);-
3560 p->restore();-
3561 }
never executed: end of block
0
3562-
3563-
3564 if ((
(groupBox->sub...GroupBoxLabel)Description
TRUEnever evaluated
FALSEnever evaluated
groupBox->subControls & QStyle::SC_GroupBoxLabel)
(groupBox->sub...GroupBoxLabel)Description
TRUEnever evaluated
FALSEnever evaluated
&& !groupBox->text.isEmpty()
!groupBox->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3565 QColor textColor = groupBox->textColor;-
3566 if (textColor.isValid()
textColor.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3567 p->setPen(textColor);
never executed: p->setPen(textColor);
0
3568 int alignment = int(groupBox->textAlignment);-
3569 if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, opt, widget)
!proxy()->styl..., opt, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3570 alignment |= Qt::TextHideMnemonic;
never executed: alignment |= Qt::TextHideMnemonic;
0
3571-
3572 proxy()->drawItemText(p, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment,-
3573 groupBox->palette, groupBox->state & State_Enabled, groupBox->text,-
3574 textColor.isValid() ? QPalette::NoRole : QPalette::WindowText);-
3575-
3576 if (groupBox->state & State_HasFocus
groupBox->stat...State_HasFocusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3577 QStyleOptionFocusRect fropt;-
3578 fropt.QStyleOption::operator=(*groupBox);-
3579 fropt.rect = textRect;-
3580 proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);-
3581 }
never executed: end of block
0
3582 }
never executed: end of block
0
3583-
3584-
3585 if (groupBox->subControls & SC_GroupBoxCheckBox
groupBox->subC...oupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3586 QStyleOptionButton box;-
3587 box.QStyleOption::operator=(*groupBox);-
3588 box.rect = checkBoxRect;-
3589 proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, p, widget);-
3590 }
never executed: end of block
0
3591 }
never executed: end of block
0
3592 break;
never executed: break;
0
3593-
3594-
3595 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
3596 {-
3597 QStyleOptionButton btnOpt;-
3598 btnOpt.QStyleOption::operator=(*opt);-
3599 btnOpt.state &= ~State_MouseOver;-
3600 int bsx = 0;-
3601 int bsy = 0;-
3602 if (opt->subControls & QStyle::SC_MdiCloseButton
opt->subContro...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3603 if (opt->activeSubControls & QStyle::SC_MdiCloseButton
opt->activeSub...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3604 btnOpt.state |= State_Sunken;-
3605 btnOpt.state &= ~State_Raised;-
3606 bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal);-
3607 bsy = proxy()->pixelMetric(PM_ButtonShiftVertical);-
3608 }
never executed: end of block
else {
0
3609 btnOpt.state |= State_Raised;-
3610 btnOpt.state &= ~State_Sunken;-
3611 bsx = 0;-
3612 bsy = 0;-
3613 }
never executed: end of block
0
3614 btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiCloseButton, widget);-
3615 proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget);-
3616 QPixmap pm = proxy()->standardIcon(SP_TitleBarCloseButton).pixmap(qt_getWindow(widget), QSize(16, 16));-
3617 proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm);-
3618 }
never executed: end of block
0
3619 if (opt->subControls & QStyle::SC_MdiNormalButton
opt->subContro...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3620 if (opt->activeSubControls & QStyle::SC_MdiNormalButton
opt->activeSub...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3621 btnOpt.state |= State_Sunken;-
3622 btnOpt.state &= ~State_Raised;-
3623 bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal);-
3624 bsy = proxy()->pixelMetric(PM_ButtonShiftVertical);-
3625 }
never executed: end of block
else {
0
3626 btnOpt.state |= State_Raised;-
3627 btnOpt.state &= ~State_Sunken;-
3628 bsx = 0;-
3629 bsy = 0;-
3630 }
never executed: end of block
0
3631 btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiNormalButton, widget);-
3632 proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget);-
3633 QPixmap pm = proxy()->standardIcon(SP_TitleBarNormalButton).pixmap(qt_getWindow(widget), QSize(16, 16));-
3634 proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm);-
3635 }
never executed: end of block
0
3636 if (opt->subControls & QStyle::SC_MdiMinButton
opt->subContro...C_MdiMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3637 if (opt->activeSubControls & QStyle::SC_MdiMinButton
opt->activeSub...C_MdiMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
opt->state & State_Sunken)
(opt->state & State_Sunken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3638 btnOpt.state |= State_Sunken;-
3639 btnOpt.state &= ~State_Raised;-
3640 bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal);-
3641 bsy = proxy()->pixelMetric(PM_ButtonShiftVertical);-
3642 }
never executed: end of block
else {
0
3643 btnOpt.state |= State_Raised;-
3644 btnOpt.state &= ~State_Sunken;-
3645 bsx = 0;-
3646 bsy = 0;-
3647 }
never executed: end of block
0
3648 btnOpt.rect = proxy()->subControlRect(CC_MdiControls, opt, SC_MdiMinButton, widget);-
3649 proxy()->drawPrimitive(PE_PanelButtonCommand, &btnOpt, p, widget);-
3650 QPixmap pm = proxy()->standardIcon(SP_TitleBarMinButton).pixmap(qt_getWindow(widget), QSize(16, 16));-
3651 proxy()->drawItemPixmap(p, btnOpt.rect.translated(bsx, bsy), Qt::AlignCenter, pm);-
3652 }
never executed: end of block
0
3653 }-
3654 break;
never executed: break;
0
3655-
3656 default
never executed: default:
:
never executed: default:
0
3657 QMessageLogger(__FILE__, 3782, __PRETTY_FUNCTION__).warning("QCommonStyle::drawComplexControl: Control %d not handled", cc);-
3658 }
never executed: end of block
0
3659}-
3660-
3661-
3662-
3663-
3664QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,-
3665 const QPoint &pt, const QWidget *widget) const-
3666{-
3667 SubControl sc = SC_None;-
3668 switch (cc) {-
3669-
3670 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
3671 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3672 QRect r = proxy()->subControlRect(cc, slider, SC_SliderHandle, widget);-
3673 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3674 sc = SC_SliderHandle;-
3675 }
never executed: end of block
else {
0
3676 r = proxy()->subControlRect(cc, slider, SC_SliderGroove ,widget);-
3677 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3678 sc = SC_SliderGroove;
never executed: sc = SC_SliderGroove;
0
3679 }
never executed: end of block
0
3680 }-
3681 break;
never executed: break;
0
3682-
3683-
3684 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
0
3685 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3686 QRect r;-
3687 uint ctrl = SC_ScrollBarAddLine;-
3688 while (ctrl <= SC_ScrollBarGroove
ctrl <= SC_ScrollBarGrooveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3689 r = proxy()->subControlRect(cc, scrollbar, QStyle::SubControl(ctrl), widget);-
3690 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3691 sc = QStyle::SubControl(ctrl);-
3692 break;
never executed: break;
0
3693 }-
3694 ctrl <<= 1;-
3695 }
never executed: end of block
0
3696 }
never executed: end of block
0
3697 break;
never executed: break;
0
3698-
3699-
3700 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
3701 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3702 QRect r;-
3703 uint ctrl = SC_ToolButton;-
3704 while (ctrl <= SC_ToolButtonMenu
ctrl <= SC_ToolButtonMenuDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3705 r = proxy()->subControlRect(cc, toolbutton, QStyle::SubControl(ctrl), widget);-
3706 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3707 sc = QStyle::SubControl(ctrl);-
3708 break;
never executed: break;
0
3709 }-
3710 ctrl <<= 1;-
3711 }
never executed: end of block
0
3712 }
never executed: end of block
0
3713 break;
never executed: break;
0
3714-
3715-
3716 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
0
3717 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3718 QRect r;-
3719 uint ctrl = SC_SpinBoxUp;-
3720 while (ctrl <= SC_SpinBoxEditField
ctrl <= SC_SpinBoxEditFieldDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3721 r = proxy()->subControlRect(cc, spinbox, QStyle::SubControl(ctrl), widget);-
3722 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3723 sc = QStyle::SubControl(ctrl);-
3724 break;
never executed: break;
0
3725 }-
3726 ctrl <<= 1;-
3727 }
never executed: end of block
0
3728 }
never executed: end of block
0
3729 break;
never executed: break;
0
3730-
3731 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
3732 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3733 QRect r;-
3734 uint ctrl = SC_TitleBarSysMenu;-
3735-
3736 while (ctrl <= SC_TitleBarLabel
ctrl <= SC_TitleBarLabelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3737 r = proxy()->subControlRect(cc, tb, QStyle::SubControl(ctrl), widget);-
3738 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3739 sc = QStyle::SubControl(ctrl);-
3740 break;
never executed: break;
0
3741 }-
3742 ctrl <<= 1;-
3743 }
never executed: end of block
0
3744 }
never executed: end of block
0
3745 break;
never executed: break;
0
3746-
3747 case
never executed: case CC_ComboBox:
CC_ComboBox:
never executed: case CC_ComboBox:
0
3748 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3749 QRect r;-
3750 uint ctrl = SC_ComboBoxArrow;-
3751 while (ctrl > 0
ctrl > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3752 r = proxy()->subControlRect(cc, cb, QStyle::SubControl(ctrl), widget);-
3753 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3754 sc = QStyle::SubControl(ctrl);-
3755 break;
never executed: break;
0
3756 }-
3757 ctrl >>= 1;-
3758 }
never executed: end of block
0
3759 }
never executed: end of block
0
3760 break;
never executed: break;
0
3761-
3762-
3763 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
0
3764 if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3765 QRect r;-
3766 uint ctrl = SC_GroupBoxCheckBox;-
3767 while (ctrl <= SC_GroupBoxFrame
ctrl <= SC_GroupBoxFrameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3768 r = proxy()->subControlRect(cc, groupBox, QStyle::SubControl(ctrl), widget);-
3769 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3770 sc = QStyle::SubControl(ctrl);-
3771 break;
never executed: break;
0
3772 }-
3773 ctrl <<= 1;-
3774 }
never executed: end of block
0
3775 }
never executed: end of block
0
3776 break;
never executed: break;
0
3777-
3778 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
3779 {-
3780 QRect r;-
3781 uint ctrl = SC_MdiMinButton;-
3782 while (ctrl <= SC_MdiCloseButton
ctrl <= SC_MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3783 r = proxy()->subControlRect(CC_MdiControls, opt, QStyle::SubControl(ctrl), widget);-
3784 if (r.isValid()
r.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r.contains(pt)
r.contains(pt)Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(opt->subControls & ctrl)Description
TRUEnever evaluated
FALSEnever evaluated
opt->subControls & ctrl)
(opt->subControls & ctrl)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3785 sc = QStyle::SubControl(ctrl);-
3786 return
never executed: return sc;
sc;
never executed: return sc;
0
3787 }-
3788 ctrl <<= 1;-
3789 }
never executed: end of block
0
3790 }-
3791 break;
never executed: break;
0
3792 default
never executed: default:
:
never executed: default:
0
3793 QMessageLogger(__FILE__, 3918, __PRETTY_FUNCTION__).warning("QCommonStyle::hitTestComplexControl: Case %d not handled", cc);-
3794 }
never executed: end of block
0
3795 return
never executed: return sc;
sc;
never executed: return sc;
0
3796}-
3797-
3798-
3799-
3800-
3801QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,-
3802 SubControl sc, const QWidget *widget) const-
3803{-
3804 QRect ret;-
3805 switch (cc) {-
3806-
3807 case
never executed: case CC_Slider:
CC_Slider:
never executed: case CC_Slider:
0
3808 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3809 int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget);-
3810 int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget);-
3811-
3812 switch (sc) {-
3813 case
never executed: case SC_SliderHandle:
SC_SliderHandle:
never executed: case SC_SliderHandle:
{
0
3814 int sliderPos = 0;-
3815 int len = proxy()->pixelMetric(PM_SliderLength, slider, widget);-
3816 bool horizontal = slider->orientation == Qt::Horizontal;-
3817 sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum,-
3818 slider->sliderPosition,-
3819 (horizontal ? slider->rect.width()-
3820 : slider->rect.height()) - len,-
3821 slider->upsideDown);-
3822 if (horizontal
horizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3823 ret.setRect(slider->rect.x() + sliderPos, slider->rect.y() + tickOffset, len, thickness);
never executed: ret.setRect(slider->rect.x() + sliderPos, slider->rect.y() + tickOffset, len, thickness);
0
3824 else-
3825 ret.setRect(slider->rect.x() + tickOffset, slider->rect.y() + sliderPos, thickness, len);
never executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y() + sliderPos, thickness, len);
0
3826 break;
never executed: break;
}
0
3827 case
never executed: case SC_SliderGroove:
SC_SliderGroove:
never executed: case SC_SliderGroove:
0
3828 if (slider->orientation == Qt::Horizontal
slider->orient...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3829 ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset,
never executed: ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset, slider->rect.width(), thickness);
0
3830 slider->rect.width(), thickness);
never executed: ret.setRect(slider->rect.x(), slider->rect.y() + tickOffset, slider->rect.width(), thickness);
0
3831 else-
3832 ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(),
never executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(), thickness, slider->rect.height());
0
3833 thickness, slider->rect.height());
never executed: ret.setRect(slider->rect.x() + tickOffset, slider->rect.y(), thickness, slider->rect.height());
0
3834 break;
never executed: break;
0
3835 default
never executed: default:
:
never executed: default:
0
3836 break;
never executed: break;
0
3837 }-
3838 ret = visualRect(slider->direction, slider->rect, ret);-
3839 }
never executed: end of block
0
3840 break;
never executed: break;
0
3841-
3842-
3843 case
never executed: case CC_ScrollBar:
CC_ScrollBar:
never executed: case CC_ScrollBar:
0
3844 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3845 const QRect scrollBarRect = scrollbar->rect;-
3846 int sbextent = 0;-
3847 if (!proxy()->styleHint(SH_ScrollBar_Transient, scrollbar, widget)
!proxy()->styl...llbar, widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3848 sbextent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget);
never executed: sbextent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget);
0
3849 int maxlen = ((
(scrollbar->or...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
scrollbar->orientation == Qt::Horizontal)
(scrollbar->or...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
?
0
3850 scrollBarRect.width() : scrollBarRect.height()) - (sbextent * 2);-
3851 int sliderlen;-
3852-
3853-
3854 if (scrollbar->maximum != scrollbar->minimum
scrollbar->max...llbar->minimumDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3855 uint range = scrollbar->maximum - scrollbar->minimum;-
3856 sliderlen = (qint64(scrollbar->pageStep) * maxlen) / (range + scrollbar->pageStep);-
3857-
3858 int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget);-
3859 if (sliderlen < slidermin
sliderlen < sliderminDescription
TRUEnever evaluated
FALSEnever evaluated
|| range > 2147483647 / 2
range > 2147483647 / 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
3860 sliderlen = slidermin;
never executed: sliderlen = slidermin;
0
3861 if (sliderlen > maxlen
sliderlen > maxlenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3862 sliderlen = maxlen;
never executed: sliderlen = maxlen;
0
3863 }
never executed: end of block
else {
0
3864 sliderlen = maxlen;-
3865 }
never executed: end of block
0
3866-
3867 int sliderstart = sbextent + sliderPositionFromValue(scrollbar->minimum,-
3868 scrollbar->maximum,-
3869 scrollbar->sliderPosition,-
3870 maxlen - sliderlen,-
3871 scrollbar->upsideDown);-
3872-
3873 switch (sc) {-
3874 case
never executed: case SC_ScrollBarSubLine:
SC_ScrollBarSubLine:
never executed: case SC_ScrollBarSubLine:
0
3875 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3876 int buttonWidth = qMin(scrollBarRect.width() / 2, sbextent);-
3877 ret.setRect(0, 0, buttonWidth, scrollBarRect.height());-
3878 }
never executed: end of block
else {
0
3879 int buttonHeight = qMin(scrollBarRect.height() / 2, sbextent);-
3880 ret.setRect(0, 0, scrollBarRect.width(), buttonHeight);-
3881 }
never executed: end of block
0
3882 break;
never executed: break;
0
3883 case
never executed: case SC_ScrollBarAddLine:
SC_ScrollBarAddLine:
never executed: case SC_ScrollBarAddLine:
0
3884 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3885 int buttonWidth = qMin(scrollBarRect.width()/2, sbextent);-
3886 ret.setRect(scrollBarRect.width() - buttonWidth, 0, buttonWidth, scrollBarRect.height());-
3887 }
never executed: end of block
else {
0
3888 int buttonHeight = qMin(scrollBarRect.height()/2, sbextent);-
3889 ret.setRect(0, scrollBarRect.height() - buttonHeight, scrollBarRect.width(), buttonHeight);-
3890 }
never executed: end of block
0
3891 break;
never executed: break;
0
3892 case
never executed: case SC_ScrollBarSubPage:
SC_ScrollBarSubPage:
never executed: case SC_ScrollBarSubPage:
0
3893 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3894 ret.setRect(sbextent, 0, sliderstart - sbextent, scrollBarRect.height());
never executed: ret.setRect(sbextent, 0, sliderstart - sbextent, scrollBarRect.height());
0
3895 else-
3896 ret.setRect(0, sbextent, scrollBarRect.width(), sliderstart - sbextent);
never executed: ret.setRect(0, sbextent, scrollBarRect.width(), sliderstart - sbextent);
0
3897 break;
never executed: break;
0
3898 case
never executed: case SC_ScrollBarAddPage:
SC_ScrollBarAddPage:
never executed: case SC_ScrollBarAddPage:
0
3899 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3900 ret.setRect(sliderstart + sliderlen, 0,
never executed: ret.setRect(sliderstart + sliderlen, 0, maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height());
0
3901 maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height());
never executed: ret.setRect(sliderstart + sliderlen, 0, maxlen - sliderstart - sliderlen + sbextent, scrollBarRect.height());
0
3902 else-
3903 ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(),
never executed: ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(), maxlen - sliderstart - sliderlen + sbextent);
0
3904 maxlen - sliderstart - sliderlen + sbextent);
never executed: ret.setRect(0, sliderstart + sliderlen, scrollBarRect.width(), maxlen - sliderstart - sliderlen + sbextent);
0
3905 break;
never executed: break;
0
3906 case
never executed: case SC_ScrollBarGroove:
SC_ScrollBarGroove:
never executed: case SC_ScrollBarGroove:
0
3907 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3908 ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2,
never executed: ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2, scrollBarRect.height());
0
3909 scrollBarRect.height());
never executed: ret.setRect(sbextent, 0, scrollBarRect.width() - sbextent * 2, scrollBarRect.height());
0
3910 else-
3911 ret.setRect(0, sbextent, scrollBarRect.width(),
never executed: ret.setRect(0, sbextent, scrollBarRect.width(), scrollBarRect.height() - sbextent * 2);
0
3912 scrollBarRect.height() - sbextent * 2);
never executed: ret.setRect(0, sbextent, scrollBarRect.width(), scrollBarRect.height() - sbextent * 2);
0
3913 break;
never executed: break;
0
3914 case
never executed: case SC_ScrollBarSlider:
SC_ScrollBarSlider:
never executed: case SC_ScrollBarSlider:
0
3915 if (scrollbar->orientation == Qt::Horizontal
scrollbar->ori...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3916 ret.setRect(sliderstart, 0, sliderlen, scrollBarRect.height());
never executed: ret.setRect(sliderstart, 0, sliderlen, scrollBarRect.height());
0
3917 else-
3918 ret.setRect(0, sliderstart, scrollBarRect.width(), sliderlen);
never executed: ret.setRect(0, sliderstart, scrollBarRect.width(), sliderlen);
0
3919 break;
never executed: break;
0
3920 default
never executed: default:
:
never executed: default:
0
3921 break;
never executed: break;
0
3922 }-
3923 ret = visualRect(scrollbar->direction, scrollBarRect, ret);-
3924 }
never executed: end of block
0
3925 break;
never executed: break;
0
3926-
3927-
3928 case
never executed: case CC_SpinBox:
CC_SpinBox:
never executed: case CC_SpinBox:
0
3929 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3930 QSize bs;-
3931 int fw = spinbox->frame
spinbox->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0;
0
3932 bs.setHeight(qMax(8, spinbox->rect.height()/2 - fw));-
3933-
3934 bs.setWidth(qMax(16, qMin(bs.height() * 8 / 5, spinbox->rect.width() / 4)));-
3935 bs = bs.expandedTo(QApplication::globalStrut());-
3936 int y = fw + spinbox->rect.y();-
3937 int x, lx, rx;-
3938 x = spinbox->rect.x() + spinbox->rect.width() - fw - bs.width();-
3939 lx = fw;-
3940 rx = x - fw;-
3941 switch (sc) {-
3942 case
never executed: case SC_SpinBoxUp:
SC_SpinBoxUp:
never executed: case SC_SpinBoxUp:
0
3943 if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons
spinbox->butto...Box::NoButtonsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3944 return
never executed: return QRect();
QRect();
never executed: return QRect();
0
3945 ret = QRect(x, y, bs.width(), bs.height());-
3946 break;
never executed: break;
0
3947 case
never executed: case SC_SpinBoxDown:
SC_SpinBoxDown:
never executed: case SC_SpinBoxDown:
0
3948 if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons
spinbox->butto...Box::NoButtonsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3949 return
never executed: return QRect();
QRect();
never executed: return QRect();
0
3950-
3951 ret = QRect(x, y + bs.height(), bs.width(), bs.height());-
3952 break;
never executed: break;
0
3953 case
never executed: case SC_SpinBoxEditField:
SC_SpinBoxEditField:
never executed: case SC_SpinBoxEditField:
0
3954 if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons
spinbox->butto...Box::NoButtonsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
3955 ret = QRect(lx, fw, spinbox->rect.width() - 2*fw, spinbox->rect.height() - 2*fw);-
3956 }
never executed: end of block
else {
0
3957 ret = QRect(lx, fw, rx, spinbox->rect.height() - 2*fw);-
3958 }
never executed: end of block
0
3959 break;
never executed: break;
0
3960 case
never executed: case SC_SpinBoxFrame:
SC_SpinBoxFrame:
never executed: case SC_SpinBoxFrame:
0
3961 ret = spinbox->rect;-
3962 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
3963 break;
never executed: break;
0
3964 }-
3965 ret = visualRect(spinbox->direction, spinbox->rect, ret);-
3966 }
never executed: end of block
0
3967 break;
never executed: break;
0
3968-
3969-
3970 case
never executed: case CC_ToolButton:
CC_ToolButton:
never executed: case CC_ToolButton:
0
3971 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3972 int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, tb, widget);-
3973 ret = tb->rect;-
3974 switch (sc) {-
3975 case
never executed: case SC_ToolButton:
SC_ToolButton:
never executed: case SC_ToolButton:
0
3976 if ((
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
tb->features
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
0
3977 & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay))
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
0
3978 == QStyleOptionToolButton::MenuButtonPopup
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3979 ret.adjust(0, 0, -mbi, 0);
never executed: ret.adjust(0, 0, -mbi, 0);
0
3980 break;
never executed: break;
0
3981 case
never executed: case SC_ToolButtonMenu:
SC_ToolButtonMenu:
never executed: case SC_ToolButtonMenu:
0
3982 if ((
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
tb->features
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
0
3983 & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay))
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
0
3984 == QStyleOptionToolButton::MenuButtonPopup
(tb->features ...enuButtonPopupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
3985 ret.adjust(ret.width() - mbi, 0, 0, 0);
never executed: ret.adjust(ret.width() - mbi, 0, 0, 0);
0
3986 break;
never executed: break;
0
3987 default
never executed: default:
:
never executed: default:
0
3988 break;
never executed: break;
0
3989 }-
3990 ret = visualRect(tb->direction, tb->rect, ret);-
3991 }
never executed: end of block
0
3992 break;
never executed: break;
0
3993-
3994-
3995 case
never executed: case CC_ComboBox:
CC_ComboBox:
never executed: case CC_ComboBox:
0
3996 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3997 int x = cb->rect.x(),-
3998 y = cb->rect.y(),-
3999 wi = cb->rect.width(),-
4000 he = cb->rect.height();-
4001 int xpos = x;-
4002 int margin = cb->frame
cb->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? 3 : 0;
0
4003 int bmarg = cb->frame
cb->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? 2 : 0;
0
4004 xpos += wi - bmarg - 16;-
4005-
4006-
4007 switch (sc) {-
4008 case
never executed: case SC_ComboBoxFrame:
SC_ComboBoxFrame:
never executed: case SC_ComboBoxFrame:
0
4009 ret = cb->rect;-
4010 break;
never executed: break;
0
4011 case
never executed: case SC_ComboBoxArrow:
SC_ComboBoxArrow:
never executed: case SC_ComboBoxArrow:
0
4012 ret.setRect(xpos, y + bmarg, 16, he - 2*bmarg);-
4013 break;
never executed: break;
0
4014 case
never executed: case SC_ComboBoxEditField:
SC_ComboBoxEditField:
never executed: case SC_ComboBoxEditField:
0
4015 ret.setRect(x + margin, y + margin, wi - 2 * margin - 16, he - 2 * margin);-
4016 break;
never executed: break;
0
4017 case
never executed: case SC_ComboBoxListBoxPopup:
SC_ComboBoxListBoxPopup:
never executed: case SC_ComboBoxListBoxPopup:
0
4018 ret = cb->rect;-
4019 break;
never executed: break;
0
4020 default
never executed: default:
:
never executed: default:
0
4021 break;
never executed: break;
0
4022 }-
4023 ret = visualRect(cb->direction, cb->rect, ret);-
4024 }
never executed: end of block
0
4025 break;
never executed: break;
0
4026-
4027 case
never executed: case CC_TitleBar:
CC_TitleBar:
never executed: case CC_TitleBar:
0
4028 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4029 const int controlMargin = 2;-
4030 const int controlHeight = tb->rect.height() - controlMargin *2;-
4031 const int delta = controlHeight + controlMargin;-
4032 int offset = 0;-
4033-
4034 bool isMinimized = tb->titleBarState & Qt::WindowMinimized;-
4035 bool isMaximized = tb->titleBarState & Qt::WindowMaximized;-
4036-
4037 switch (sc) {-
4038 case
never executed: case SC_TitleBarLabel:
SC_TitleBarLabel:
never executed: case SC_TitleBarLabel:
0
4039 if (tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
tb->titleBarFl...ystemMenuHint)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4040 ret = tb->rect;-
4041 if (tb->titleBarFlags & Qt::WindowSystemMenuHint
tb->titleBarFl...SystemMenuHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4042 ret.adjust(delta, 0, -delta, 0);
never executed: ret.adjust(delta, 0, -delta, 0);
0
4043 if (tb->titleBarFlags & Qt::WindowMinimizeButtonHint
tb->titleBarFl...mizeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4044 ret.adjust(0, 0, -delta, 0);
never executed: ret.adjust(0, 0, -delta, 0);
0
4045 if (tb->titleBarFlags & Qt::WindowMaximizeButtonHint
tb->titleBarFl...mizeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4046 ret.adjust(0, 0, -delta, 0);
never executed: ret.adjust(0, 0, -delta, 0);
0
4047 if (tb->titleBarFlags & Qt::WindowShadeButtonHint
tb->titleBarFl...hadeButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4048 ret.adjust(0, 0, -delta, 0);
never executed: ret.adjust(0, 0, -delta, 0);
0
4049 if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint
tb->titleBarFl...HelpButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4050 ret.adjust(0, 0, -delta, 0);
never executed: ret.adjust(0, 0, -delta, 0);
0
4051 }
never executed: end of block
0
4052 break;
never executed: break;
0
4053 case
never executed: case SC_TitleBarContextHelpButton:
SC_TitleBarContextHelpButton:
never executed: case SC_TitleBarContextHelpButton:
0
4054 if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint
tb->titleBarFl...HelpButtonHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4055 offset += delta;
never executed: offset += delta;
0
4056 case
never executed: case SC_TitleBarMinButton:
SC_TitleBarMinButton:
never executed: case SC_TitleBarMinButton:
code before this statement never executed: case SC_TitleBarMinButton:
0
4057 if (!isMinimized
!isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMinimizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4058 offset += delta;
never executed: offset += delta;
0
4059 else if (sc == SC_TitleBarMinButton
sc == SC_TitleBarMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4060 break;
never executed: break;
0
4061 case
never executed: case SC_TitleBarNormalButton:
SC_TitleBarNormalButton:
never executed: case SC_TitleBarNormalButton:
code before this statement never executed: case SC_TitleBarNormalButton:
0
4062 if (isMinimized
isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMinimizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4063 offset += delta;
never executed: offset += delta;
0
4064 else if (isMaximized
isMaximizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4065 offset += delta;
never executed: offset += delta;
0
4066 else if (sc == SC_TitleBarNormalButton
sc == SC_TitleBarNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4067 break;
never executed: break;
0
4068 case
never executed: case SC_TitleBarMaxButton:
SC_TitleBarMaxButton:
never executed: case SC_TitleBarMaxButton:
code before this statement never executed: case SC_TitleBarMaxButton:
0
4069 if (!isMaximized
!isMaximizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
(tb->titleBarF...izeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4070 offset += delta;
never executed: offset += delta;
0
4071 else if (sc == SC_TitleBarMaxButton
sc == SC_TitleBarMaxButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4072 break;
never executed: break;
0
4073 case
never executed: case SC_TitleBarShadeButton:
SC_TitleBarShadeButton:
never executed: case SC_TitleBarShadeButton:
code before this statement never executed: case SC_TitleBarShadeButton:
0
4074 if (!isMinimized
!isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...adeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowShadeButtonHint)
(tb->titleBarF...adeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4075 offset += delta;
never executed: offset += delta;
0
4076 else if (sc == SC_TitleBarShadeButton
sc == SC_TitleBarShadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4077 break;
never executed: break;
0
4078 case
never executed: case SC_TitleBarUnshadeButton:
SC_TitleBarUnshadeButton:
never executed: case SC_TitleBarUnshadeButton:
code before this statement never executed: case SC_TitleBarUnshadeButton:
0
4079 if (isMinimized
isMinimizedDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(tb->titleBarF...adeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowShadeButtonHint)
(tb->titleBarF...adeButtonHint)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4080 offset += delta;
never executed: offset += delta;
0
4081 else if (sc == SC_TitleBarUnshadeButton
sc == SC_TitleBarUnshadeButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4082 break;
never executed: break;
0
4083 case
never executed: case SC_TitleBarCloseButton:
SC_TitleBarCloseButton:
never executed: case SC_TitleBarCloseButton:
code before this statement never executed: case SC_TitleBarCloseButton:
0
4084 if (tb->titleBarFlags & Qt::WindowSystemMenuHint
tb->titleBarFl...SystemMenuHintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4085 offset += delta;
never executed: offset += delta;
0
4086 else if (sc == SC_TitleBarCloseButton
sc == SC_TitleBarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4087 break;
never executed: break;
0
4088 ret.setRect(tb->rect.right() - offset, tb->rect.top() + controlMargin,-
4089 controlHeight, controlHeight);-
4090 break;
never executed: break;
0
4091 case
never executed: case SC_TitleBarSysMenu:
SC_TitleBarSysMenu:
never executed: case SC_TitleBarSysMenu:
0
4092 if (tb->titleBarFlags & Qt::WindowSystemMenuHint
tb->titleBarFl...SystemMenuHintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4093 ret.setRect(tb->rect.left() + controlMargin, tb->rect.top() + controlMargin,-
4094 controlHeight, controlHeight);-
4095 }
never executed: end of block
0
4096 break;
never executed: break;
0
4097 default
never executed: default:
:
never executed: default:
0
4098 break;
never executed: break;
0
4099 }-
4100 ret = visualRect(tb->direction, tb->rect, ret);-
4101 }
never executed: end of block
0
4102 break;
never executed: break;
0
4103-
4104 case
never executed: case CC_GroupBox:
CC_GroupBox:
never executed: case CC_GroupBox:
{
0
4105 if (const
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)
const QStyleOp...oupBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4106 switch (sc) {-
4107 case
never executed: case SC_GroupBoxFrame:
SC_GroupBoxFrame:
never executed: case SC_GroupBoxFrame:
0
4108-
4109 case
never executed: case SC_GroupBoxContents:
SC_GroupBoxContents:
never executed: case SC_GroupBoxContents:
{
0
4110 int topMargin = 0;-
4111 int topHeight = 0;-
4112 int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget);-
4113 if (groupBox->text.size()
groupBox->text.size()Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(groupBox->sub...upBoxCheckBox)Description
TRUEnever evaluated
FALSEnever evaluated
groupBox->subControls & QStyle::SC_GroupBoxCheckBox)
(groupBox->sub...upBoxCheckBox)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4114 topHeight = groupBox->fontMetrics.height();-
4115 if (verticalAlignment & Qt::AlignVCenter
verticalAlignm...::AlignVCenterDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4116 topMargin = topHeight / 2;
never executed: topMargin = topHeight / 2;
0
4117 else if (verticalAlignment & Qt::AlignTop
verticalAlignm...& Qt::AlignTopDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4118 topMargin = topHeight;
never executed: topMargin = topHeight;
0
4119 }
never executed: end of block
0
4120-
4121 QRect frameRect = groupBox->rect;-
4122 frameRect.setTop(topMargin);-
4123-
4124 if (sc == SC_GroupBoxFrame
sc == SC_GroupBoxFrameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4125 ret = frameRect;-
4126 break;
never executed: break;
0
4127 }-
4128-
4129 int frameWidth = 0;-
4130 if ((
(groupBox->fea...me::Flat) == 0Description
TRUEnever evaluated
FALSEnever evaluated
groupBox->features & QStyleOptionFrame::Flat) == 0
(groupBox->fea...me::Flat) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4131 frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget);
never executed: frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget);
0
4132 ret = frameRect.adjusted(frameWidth, frameWidth + topHeight - topMargin,-
4133 -frameWidth, -frameWidth);-
4134 break;
never executed: break;
0
4135 }-
4136 case
never executed: case SC_GroupBoxCheckBox:
SC_GroupBoxCheckBox:
never executed: case SC_GroupBoxCheckBox:
0
4137-
4138 case
never executed: case SC_GroupBoxLabel:
SC_GroupBoxLabel:
never executed: case SC_GroupBoxLabel:
{
0
4139 QFontMetrics fontMetrics = groupBox->fontMetrics;-
4140 int h = fontMetrics.height();-
4141 int tw = fontMetrics.size(Qt::TextShowMnemonic, groupBox->text + QLatin1Char(' ')).width();-
4142 int marg = (
(groupBox->fea...onFrame::Flat)Description
TRUEnever evaluated
FALSEnever evaluated
groupBox->features & QStyleOptionFrame::Flat)
(groupBox->fea...onFrame::Flat)Description
TRUEnever evaluated
FALSEnever evaluated
? 0 : 8;
0
4143 ret = groupBox->rect.adjusted(marg, 0, -marg, 0);-
4144 ret.setHeight(h);-
4145-
4146 int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, opt, widget);-
4147 int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget) - 1;-
4148 bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox;-
4149 int checkBoxSize = hasCheckBox
hasCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
? (indicatorWidth + indicatorSpace) : 0;
0
4150-
4151-
4152 QRect totalRect = alignedRect(groupBox->direction, groupBox->textAlignment,-
4153 QSize(tw + checkBoxSize, h), ret);-
4154-
4155-
4156 if (hasCheckBox
hasCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4157 bool ltr = groupBox->direction == Qt::LeftToRight;-
4158 int left = 0;-
4159-
4160 if (sc == SC_GroupBoxCheckBox
sc == SC_GroupBoxCheckBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4161 int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget);-
4162 left = ltr
ltrDescription
TRUEnever evaluated
FALSEnever evaluated
? totalRect.left() : (totalRect.right() - indicatorWidth);
0
4163 int top = totalRect.top() + qMax(0, fontMetrics.height() - indicatorHeight) / 2;-
4164 totalRect.setRect(left, top, indicatorWidth, indicatorHeight);-
4165-
4166 }
never executed: end of block
else {
0
4167 left = ltr
ltrDescription
TRUEnever evaluated
FALSEnever evaluated
? (totalRect.left() + checkBoxSize - 2) : totalRect.left();
0
4168 totalRect.setRect(left, totalRect.top(),-
4169 totalRect.width() - checkBoxSize, totalRect.height());-
4170 }
never executed: end of block
0
4171 }-
4172 ret = totalRect;-
4173 break;
never executed: break;
0
4174 }-
4175 default
never executed: default:
:
never executed: default:
0
4176 break;
never executed: break;
0
4177 }-
4178 }-
4179 break;
never executed: break;
0
4180 }-
4181-
4182-
4183 case
never executed: case CC_MdiControls:
CC_MdiControls:
never executed: case CC_MdiControls:
0
4184 {-
4185 int numSubControls = 0;-
4186 if (opt->subControls & SC_MdiCloseButton
opt->subContro...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4187 ++
never executed: ++numSubControls;
numSubControls;
never executed: ++numSubControls;
0
4188 if (opt->subControls & SC_MdiMinButton
opt->subContro...C_MdiMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4189 ++
never executed: ++numSubControls;
numSubControls;
never executed: ++numSubControls;
0
4190 if (opt->subControls & SC_MdiNormalButton
opt->subContro...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4191 ++
never executed: ++numSubControls;
numSubControls;
never executed: ++numSubControls;
0
4192 if (numSubControls == 0
numSubControls == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4193 break;
never executed: break;
0
4194-
4195 int buttonWidth = opt->rect.width() / numSubControls - 1;-
4196 int offset = 0;-
4197 switch (sc) {-
4198 case
never executed: case SC_MdiCloseButton:
SC_MdiCloseButton:
never executed: case SC_MdiCloseButton:
0
4199-
4200 if (numSubControls == 1
numSubControls == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4201 break;
never executed: break;
0
4202 offset += buttonWidth + 2;-
4203-
4204 case
never executed: case SC_MdiNormalButton:
SC_MdiNormalButton:
never executed: case SC_MdiNormalButton:
code before this statement never executed: case SC_MdiNormalButton:
0
4205-
4206-
4207-
4208 if (numSubControls == 1
numSubControls == 1Description
TRUEnever evaluated
FALSEnever evaluated
|| (numSubControls == 2
numSubControls == 2Description
TRUEnever evaluated
FALSEnever evaluated
&& !(opt->subControls & SC_MdiMinButton)
!(opt->subCont..._MdiMinButton)Description
TRUEnever evaluated
FALSEnever evaluated
))
0
4209 break;
never executed: break;
0
4210 if (opt->subControls & SC_MdiNormalButton
opt->subContro...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4211 offset += buttonWidth;
never executed: offset += buttonWidth;
0
4212 break;
never executed: break;
0
4213 default
never executed: default:
:
never executed: default:
0
4214 break;
never executed: break;
0
4215 }-
4216-
4217-
4218-
4219-
4220 if (numSubControls == 1
numSubControls == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4221 --
never executed: --buttonWidth;
buttonWidth;
never executed: --buttonWidth;
0
4222 ret = QRect(offset, 0, buttonWidth, opt->rect.height());-
4223 break;
never executed: break;
0
4224 }-
4225-
4226 default
never executed: default:
:
never executed: default:
0
4227 QMessageLogger(__FILE__, 4352, __PRETTY_FUNCTION__).warning("QCommonStyle::subControlRect: Case %d not handled", cc);-
4228 }
never executed: end of block
0
4229 return
never executed: return ret;
ret;
never executed: return ret;
0
4230}-
4231-
4232-
4233int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWidget *widget) const-
4234{-
4235 int ret;-
4236-
4237 switch (m) {-
4238 case
never executed: case PM_FocusFrameVMargin:
PM_FocusFrameVMargin:
never executed: case PM_FocusFrameVMargin:
0
4239 case
never executed: case PM_FocusFrameHMargin:
PM_FocusFrameHMargin:
never executed: case PM_FocusFrameHMargin:
0
4240 ret = 2;-
4241 break;
never executed: break;
0
4242 case
never executed: case PM_MenuBarVMargin:
PM_MenuBarVMargin:
never executed: case PM_MenuBarVMargin:
0
4243 case
never executed: case PM_MenuBarHMargin:
PM_MenuBarHMargin:
never executed: case PM_MenuBarHMargin:
0
4244 ret = 0;-
4245 break;
never executed: break;
0
4246 case
never executed: case PM_DialogButtonsSeparator:
PM_DialogButtonsSeparator:
never executed: case PM_DialogButtonsSeparator:
0
4247 ret = int(QStyleHelper::dpiScaled(5.));-
4248 break;
never executed: break;
0
4249 case
never executed: case PM_DialogButtonsButtonWidth:
PM_DialogButtonsButtonWidth:
never executed: case PM_DialogButtonsButtonWidth:
0
4250 ret = int(QStyleHelper::dpiScaled(70.));-
4251 break;
never executed: break;
0
4252 case
never executed: case PM_DialogButtonsButtonHeight:
PM_DialogButtonsButtonHeight:
never executed: case PM_DialogButtonsButtonHeight:
0
4253 ret = int(QStyleHelper::dpiScaled(30.));-
4254 break;
never executed: break;
0
4255 case
never executed: case PM_TitleBarHeight:
PM_TitleBarHeight:
never executed: case PM_TitleBarHeight:
{
0
4256 if (const
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)
const QStyleOp...tleBar *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4257 if ((
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool
(tb->titleBarF...k) == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4258 ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 16);-
4259-
4260 }
never executed: end of block
else if (qobject_cast<const QDockWidget*>(widget)
qobject_cast<c...dget*>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4261 ret = qMax(widget->fontMetrics().height(), int(QStyleHelper::dpiScaled(13)));-
4262-
4263 }
never executed: end of block
else {
0
4264 ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 18);-
4265 }
never executed: end of block
0
4266 } else {-
4267 ret = int(QStyleHelper::dpiScaled(18.));-
4268 }
never executed: end of block
0
4269-
4270 break;
never executed: break;
}
0
4271 case
never executed: case PM_ScrollBarSliderMin:
PM_ScrollBarSliderMin:
never executed: case PM_ScrollBarSliderMin:
0
4272 ret = int(QStyleHelper::dpiScaled(9.));-
4273 break;
never executed: break;
0
4274-
4275 case
never executed: case PM_ButtonMargin:
PM_ButtonMargin:
never executed: case PM_ButtonMargin:
0
4276 ret = int(QStyleHelper::dpiScaled(6.));-
4277 break;
never executed: break;
0
4278-
4279 case
never executed: case PM_DockWidgetTitleBarButtonMargin:
PM_DockWidgetTitleBarButtonMargin:
never executed: case PM_DockWidgetTitleBarButtonMargin:
0
4280 ret = int(QStyleHelper::dpiScaled(2.));-
4281 break;
never executed: break;
0
4282-
4283 case
never executed: case PM_ButtonDefaultIndicator:
PM_ButtonDefaultIndicator:
never executed: case PM_ButtonDefaultIndicator:
0
4284 ret = 0;-
4285 break;
never executed: break;
0
4286-
4287 case
never executed: case PM_MenuButtonIndicator:
PM_MenuButtonIndicator:
never executed: case PM_MenuButtonIndicator:
0
4288 ret = int(QStyleHelper::dpiScaled(12.));-
4289 break;
never executed: break;
0
4290-
4291 case
never executed: case PM_ButtonShiftHorizontal:
PM_ButtonShiftHorizontal:
never executed: case PM_ButtonShiftHorizontal:
0
4292 case
never executed: case PM_ButtonShiftVertical:
PM_ButtonShiftVertical:
never executed: case PM_ButtonShiftVertical:
0
4293-
4294 case
never executed: case PM_DefaultFrameWidth:
PM_DefaultFrameWidth:
never executed: case PM_DefaultFrameWidth:
0
4295 ret = 2;-
4296 break;
never executed: break;
0
4297-
4298 case
never executed: case PM_ComboBoxFrameWidth:
PM_ComboBoxFrameWidth:
never executed: case PM_ComboBoxFrameWidth:
0
4299 case
never executed: case PM_SpinBoxFrameWidth:
PM_SpinBoxFrameWidth:
never executed: case PM_SpinBoxFrameWidth:
0
4300 case
never executed: case PM_MenuPanelWidth:
PM_MenuPanelWidth:
never executed: case PM_MenuPanelWidth:
0
4301 case
never executed: case PM_TabBarBaseOverlap:
PM_TabBarBaseOverlap:
never executed: case PM_TabBarBaseOverlap:
0
4302 case
never executed: case PM_TabBarBaseHeight:
PM_TabBarBaseHeight:
never executed: case PM_TabBarBaseHeight:
0
4303 ret = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);-
4304 break;
never executed: break;
0
4305-
4306 case
never executed: case PM_MdiSubWindowFrameWidth:
PM_MdiSubWindowFrameWidth:
never executed: case PM_MdiSubWindowFrameWidth:
0
4307 ret = int(QStyleHelper::dpiScaled(4.));-
4308 break;
never executed: break;
0
4309-
4310 case
never executed: case PM_MdiSubWindowMinimizedWidth:
PM_MdiSubWindowMinimizedWidth:
never executed: case PM_MdiSubWindowMinimizedWidth:
0
4311 ret = int(QStyleHelper::dpiScaled(196.));-
4312 break;
never executed: break;
0
4313-
4314-
4315 case
never executed: case PM_ScrollBarExtent:
PM_ScrollBarExtent:
never executed: case PM_ScrollBarExtent:
0
4316 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4317 int s = sb->orientation == Qt::Horizontal
sb->orientatio...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
?
0
4318 QApplication::globalStrut().height()-
4319 : QApplication::globalStrut().width();-
4320 ret = qMax(16, s);-
4321 }
never executed: end of block
else {
0
4322 ret = int(QStyleHelper::dpiScaled(16.));-
4323 }
never executed: end of block
0
4324 break;
never executed: break;
0
4325-
4326 case
never executed: case PM_MaximumDragDistance:
PM_MaximumDragDistance:
never executed: case PM_MaximumDragDistance:
0
4327 ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::MaximumScrollBarDragDistance).toInt();-
4328 break;
never executed: break;
0
4329-
4330-
4331 case
never executed: case PM_SliderThickness:
PM_SliderThickness:
never executed: case PM_SliderThickness:
0
4332 ret = int(QStyleHelper::dpiScaled(16.));-
4333 break;
never executed: break;
0
4334-
4335 case
never executed: case PM_SliderTickmarkOffset:
PM_SliderTickmarkOffset:
never executed: case PM_SliderTickmarkOffset:
0
4336 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4337 int space = (
(sl->orientati...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
sl->orientation == Qt::Horizontal)
(sl->orientati...t::Horizontal)Description
TRUEnever evaluated
FALSEnever evaluated
? sl->rect.height()
0
4338 : sl->rect.width();-
4339 int thickness = proxy()->pixelMetric(PM_SliderControlThickness, sl, widget);-
4340 int ticks = sl->tickPosition;-
4341-
4342 if (ticks == QSlider::TicksBothSides
ticks == QSlid...TicksBothSidesDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4343 ret = (space - thickness) / 2;
never executed: ret = (space - thickness) / 2;
0
4344 else if (ticks == QSlider::TicksAbove
ticks == QSlider::TicksAboveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4345 ret = space - thickness;
never executed: ret = space - thickness;
0
4346 else-
4347 ret = 0;
never executed: ret = 0;
0
4348 } else {-
4349 ret = 0;-
4350 }
never executed: end of block
0
4351 break;
never executed: break;
0
4352-
4353 case
never executed: case PM_SliderSpaceAvailable:
PM_SliderSpaceAvailable:
never executed: case PM_SliderSpaceAvailable:
0
4354 if (const
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)
const QStyleOp...Slider *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4355 if (sl->orientation == Qt::Horizontal
sl->orientatio...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4356 ret = sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, sl, widget);
never executed: ret = sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, sl, widget);
0
4357 else-
4358 ret = sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, sl, widget);
never executed: ret = sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, sl, widget);
0
4359 } else {-
4360 ret = 0;-
4361 }
never executed: end of block
0
4362 break;
never executed: break;
0
4363-
4364-
4365 case
never executed: case PM_DockWidgetSeparatorExtent:
PM_DockWidgetSeparatorExtent:
never executed: case PM_DockWidgetSeparatorExtent:
0
4366 ret = int(QStyleHelper::dpiScaled(6.));-
4367 break;
never executed: break;
0
4368-
4369 case
never executed: case PM_DockWidgetHandleExtent:
PM_DockWidgetHandleExtent:
never executed: case PM_DockWidgetHandleExtent:
0
4370 ret = int(QStyleHelper::dpiScaled(8.));-
4371 break;
never executed: break;
0
4372 case
never executed: case PM_DockWidgetTitleMargin:
PM_DockWidgetTitleMargin:
never executed: case PM_DockWidgetTitleMargin:
0
4373 ret = 0;-
4374 break;
never executed: break;
0
4375 case
never executed: case PM_DockWidgetFrameWidth:
PM_DockWidgetFrameWidth:
never executed: case PM_DockWidgetFrameWidth:
0
4376 ret = 1;-
4377 break;
never executed: break;
0
4378-
4379-
4380 case
never executed: case PM_SpinBoxSliderHeight:
PM_SpinBoxSliderHeight:
never executed: case PM_SpinBoxSliderHeight:
0
4381 case
never executed: case PM_MenuBarPanelWidth:
PM_MenuBarPanelWidth:
never executed: case PM_MenuBarPanelWidth:
0
4382 ret = 2;-
4383 break;
never executed: break;
0
4384-
4385 case
never executed: case PM_MenuBarItemSpacing:
PM_MenuBarItemSpacing:
never executed: case PM_MenuBarItemSpacing:
0
4386 ret = 0;-
4387 break;
never executed: break;
0
4388-
4389-
4390 case
never executed: case PM_ToolBarFrameWidth:
PM_ToolBarFrameWidth:
never executed: case PM_ToolBarFrameWidth:
0
4391 ret = 1;-
4392 break;
never executed: break;
0
4393-
4394 case
never executed: case PM_ToolBarItemMargin:
PM_ToolBarItemMargin:
never executed: case PM_ToolBarItemMargin:
0
4395 ret = 0;-
4396 break;
never executed: break;
0
4397-
4398 case
never executed: case PM_ToolBarItemSpacing:
PM_ToolBarItemSpacing:
never executed: case PM_ToolBarItemSpacing:
0
4399 ret = int(QStyleHelper::dpiScaled(4.));-
4400 break;
never executed: break;
0
4401-
4402 case
never executed: case PM_ToolBarHandleExtent:
PM_ToolBarHandleExtent:
never executed: case PM_ToolBarHandleExtent:
0
4403 ret = int(QStyleHelper::dpiScaled(8.));-
4404 break;
never executed: break;
0
4405-
4406 case
never executed: case PM_ToolBarSeparatorExtent:
PM_ToolBarSeparatorExtent:
never executed: case PM_ToolBarSeparatorExtent:
0
4407 ret = int(QStyleHelper::dpiScaled(6.));-
4408 break;
never executed: break;
0
4409-
4410 case
never executed: case PM_ToolBarExtensionExtent:
PM_ToolBarExtensionExtent:
never executed: case PM_ToolBarExtensionExtent:
0
4411 ret = int(QStyleHelper::dpiScaled(12.));-
4412 break;
never executed: break;
0
4413-
4414-
4415-
4416 case
never executed: case PM_TabBarTabOverlap:
PM_TabBarTabOverlap:
never executed: case PM_TabBarTabOverlap:
0
4417 ret = 3;-
4418 break;
never executed: break;
0
4419-
4420 case
never executed: case PM_TabBarTabHSpace:
PM_TabBarTabHSpace:
never executed: case PM_TabBarTabHSpace:
0
4421 ret = int(QStyleHelper::dpiScaled(24.));-
4422 break;
never executed: break;
0
4423-
4424 case
never executed: case PM_TabBarTabShiftHorizontal:
PM_TabBarTabShiftHorizontal:
never executed: case PM_TabBarTabShiftHorizontal:
0
4425 ret = 0;-
4426 break;
never executed: break;
0
4427-
4428 case
never executed: case PM_TabBarTabShiftVertical:
PM_TabBarTabShiftVertical:
never executed: case PM_TabBarTabShiftVertical:
0
4429 ret = 2;-
4430 break;
never executed: break;
0
4431-
4432 case
never executed: case PM_TabBarTabVSpace:
PM_TabBarTabVSpace:
never executed: case PM_TabBarTabVSpace:
{
0
4433 const QStyleOptionTab *tb = qstyleoption_cast<const QStyleOptionTab *>(opt);-
4434 if (tb
tbDescription
TRUEnever evaluated
FALSEnever evaluated
&& (tb->shape == QTabBar::RoundedNorth
tb->shape == Q...::RoundedNorthDescription
TRUEnever evaluated
FALSEnever evaluated
|| tb->shape == QTabBar::RoundedSouth
tb->shape == Q...::RoundedSouthDescription
TRUEnever evaluated
FALSEnever evaluated
0
4435 || tb->shape == QTabBar::RoundedWest
tb->shape == Q...r::RoundedWestDescription
TRUEnever evaluated
FALSEnever evaluated
|| tb->shape == QTabBar::RoundedEast
tb->shape == Q...r::RoundedEastDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
4436 ret = 8;
never executed: ret = 8;
0
4437 else-
4438 if(tb
tbDescription
TRUEnever evaluated
FALSEnever evaluated
&& (tb->shape == QTabBar::TriangularWest
tb->shape == Q...TriangularWestDescription
TRUEnever evaluated
FALSEnever evaluated
|| tb->shape == QTabBar::TriangularEast
tb->shape == Q...TriangularEastDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
4439 ret = 3;
never executed: ret = 3;
0
4440 else-
4441 ret = 2;
never executed: ret = 2;
0
4442 break;
never executed: break;
}
0
4443-
4444-
4445 case
never executed: case PM_ProgressBarChunkWidth:
PM_ProgressBarChunkWidth:
never executed: case PM_ProgressBarChunkWidth:
0
4446 ret = 9;-
4447 break;
never executed: break;
0
4448-
4449 case
never executed: case PM_IndicatorWidth:
PM_IndicatorWidth:
never executed: case PM_IndicatorWidth:
0
4450 ret = int(QStyleHelper::dpiScaled(13.));-
4451 break;
never executed: break;
0
4452-
4453 case
never executed: case PM_IndicatorHeight:
PM_IndicatorHeight:
never executed: case PM_IndicatorHeight:
0
4454 ret = int(QStyleHelper::dpiScaled(13.));-
4455 break;
never executed: break;
0
4456-
4457 case
never executed: case PM_ExclusiveIndicatorWidth:
PM_ExclusiveIndicatorWidth:
never executed: case PM_ExclusiveIndicatorWidth:
0
4458 ret = int(QStyleHelper::dpiScaled(12.));-
4459 break;
never executed: break;
0
4460-
4461 case
never executed: case PM_ExclusiveIndicatorHeight:
PM_ExclusiveIndicatorHeight:
never executed: case PM_ExclusiveIndicatorHeight:
0
4462 ret = int(QStyleHelper::dpiScaled(12.));-
4463 break;
never executed: break;
0
4464-
4465 case
never executed: case PM_MenuTearoffHeight:
PM_MenuTearoffHeight:
never executed: case PM_MenuTearoffHeight:
0
4466 ret = int(QStyleHelper::dpiScaled(10.));-
4467 break;
never executed: break;
0
4468-
4469 case
never executed: case PM_MenuScrollerHeight:
PM_MenuScrollerHeight:
never executed: case PM_MenuScrollerHeight:
0
4470 ret = int(QStyleHelper::dpiScaled(10.));-
4471 break;
never executed: break;
0
4472-
4473 case
never executed: case PM_MenuDesktopFrameWidth:
PM_MenuDesktopFrameWidth:
never executed: case PM_MenuDesktopFrameWidth:
0
4474 case
never executed: case PM_MenuHMargin:
PM_MenuHMargin:
never executed: case PM_MenuHMargin:
0
4475 case
never executed: case PM_MenuVMargin:
PM_MenuVMargin:
never executed: case PM_MenuVMargin:
0
4476 ret = 0;-
4477 break;
never executed: break;
0
4478-
4479 case
never executed: case PM_HeaderMargin:
PM_HeaderMargin:
never executed: case PM_HeaderMargin:
0
4480 ret = int(QStyleHelper::dpiScaled(4.));-
4481 break;
never executed: break;
0
4482 case
never executed: case PM_HeaderMarkSize:
PM_HeaderMarkSize:
never executed: case PM_HeaderMarkSize:
0
4483 ret = int(QStyleHelper::dpiScaled(16.));-
4484 break;
never executed: break;
0
4485 case
never executed: case PM_HeaderGripMargin:
PM_HeaderGripMargin:
never executed: case PM_HeaderGripMargin:
0
4486 ret = int(QStyleHelper::dpiScaled(4.));-
4487 break;
never executed: break;
0
4488 case
never executed: case PM_HeaderDefaultSectionSizeHorizontal:
PM_HeaderDefaultSectionSizeHorizontal:
never executed: case PM_HeaderDefaultSectionSizeHorizontal:
0
4489 ret = int(QStyleHelper::dpiScaled(100.));-
4490 break;
never executed: break;
0
4491 case
never executed: case PM_HeaderDefaultSectionSizeVertical:
PM_HeaderDefaultSectionSizeVertical:
never executed: case PM_HeaderDefaultSectionSizeVertical:
0
4492 ret = int(QStyleHelper::dpiScaled(30.));-
4493 break;
never executed: break;
0
4494 case
never executed: case PM_TabBarScrollButtonWidth:
PM_TabBarScrollButtonWidth:
never executed: case PM_TabBarScrollButtonWidth:
0
4495 ret = int(QStyleHelper::dpiScaled(16.));-
4496 break;
never executed: break;
0
4497 case
never executed: case PM_LayoutLeftMargin:
PM_LayoutLeftMargin:
never executed: case PM_LayoutLeftMargin:
0
4498 case
never executed: case PM_LayoutTopMargin:
PM_LayoutTopMargin:
never executed: case PM_LayoutTopMargin:
0
4499 case
never executed: case PM_LayoutRightMargin:
PM_LayoutRightMargin:
never executed: case PM_LayoutRightMargin:
0
4500 case
never executed: case PM_LayoutBottomMargin:
PM_LayoutBottomMargin:
never executed: case PM_LayoutBottomMargin:
0
4501 {-
4502 bool isWindow = false;-
4503 if (opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4504 isWindow = (opt->state & State_Window);-
4505 }
never executed: end of block
else if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4506 isWindow = widget->isWindow();-
4507 }
never executed: end of block
0
4508 ret = proxy()->pixelMetric(isWindow ? PM_DefaultTopLevelMargin : PM_DefaultChildMargin);-
4509 }-
4510 break;
never executed: break;
0
4511 case
never executed: case PM_LayoutHorizontalSpacing:
PM_LayoutHorizontalSpacing:
never executed: case PM_LayoutHorizontalSpacing:
0
4512 case
never executed: case PM_LayoutVerticalSpacing:
PM_LayoutVerticalSpacing:
never executed: case PM_LayoutVerticalSpacing:
0
4513 ret = proxy()->pixelMetric(PM_DefaultLayoutSpacing);-
4514 break;
never executed: break;
0
4515-
4516 case
never executed: case PM_DefaultTopLevelMargin:
PM_DefaultTopLevelMargin:
never executed: case PM_DefaultTopLevelMargin:
0
4517 ret = int(QStyleHelper::dpiScaled(11.));-
4518 break;
never executed: break;
0
4519 case
never executed: case PM_DefaultChildMargin:
PM_DefaultChildMargin:
never executed: case PM_DefaultChildMargin:
0
4520 ret = int(QStyleHelper::dpiScaled(9.));-
4521 break;
never executed: break;
0
4522 case
never executed: case PM_DefaultLayoutSpacing:
PM_DefaultLayoutSpacing:
never executed: case PM_DefaultLayoutSpacing:
0
4523 ret = int(QStyleHelper::dpiScaled(6.));-
4524 break;
never executed: break;
0
4525-
4526 case
never executed: case PM_ToolBarIconSize:
PM_ToolBarIconSize:
never executed: case PM_ToolBarIconSize:
0
4527 ret = 0;-
4528 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4529 ret = theme->themeHint(QPlatformTheme::ToolBarIconSize).toInt();
never executed: ret = theme->themeHint(QPlatformTheme::ToolBarIconSize).toInt();
0
4530 if (ret <= 0
ret <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4531 ret = int(QStyleHelper::dpiScaled(24.));
never executed: ret = int(QStyleHelper::dpiScaled(24.));
0
4532 break;
never executed: break;
0
4533-
4534 case
never executed: case PM_TabBarIconSize:
PM_TabBarIconSize:
never executed: case PM_TabBarIconSize:
0
4535 case
never executed: case PM_ListViewIconSize:
PM_ListViewIconSize:
never executed: case PM_ListViewIconSize:
0
4536 ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);-
4537 break;
never executed: break;
0
4538-
4539 case
never executed: case PM_ButtonIconSize:
PM_ButtonIconSize:
never executed: case PM_ButtonIconSize:
0
4540 case
never executed: case PM_SmallIconSize:
PM_SmallIconSize:
never executed: case PM_SmallIconSize:
0
4541 ret = int(QStyleHelper::dpiScaled(16.));-
4542 break;
never executed: break;
0
4543 case
never executed: case PM_IconViewIconSize:
PM_IconViewIconSize:
never executed: case PM_IconViewIconSize:
0
4544 ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);-
4545 break;
never executed: break;
0
4546-
4547 case
never executed: case PM_LargeIconSize:
PM_LargeIconSize:
never executed: case PM_LargeIconSize:
0
4548 ret = int(QStyleHelper::dpiScaled(32.));-
4549 break;
never executed: break;
0
4550-
4551 case
never executed: case PM_ToolTipLabelFrameWidth:
PM_ToolTipLabelFrameWidth:
never executed: case PM_ToolTipLabelFrameWidth:
0
4552 ret = 1;-
4553 break;
never executed: break;
0
4554 case
never executed: case PM_CheckBoxLabelSpacing:
PM_CheckBoxLabelSpacing:
never executed: case PM_CheckBoxLabelSpacing:
0
4555 case
never executed: case PM_RadioButtonLabelSpacing:
PM_RadioButtonLabelSpacing:
never executed: case PM_RadioButtonLabelSpacing:
0
4556 ret = int(QStyleHelper::dpiScaled(6.));-
4557 break;
never executed: break;
0
4558 case
never executed: case PM_SizeGripSize:
PM_SizeGripSize:
never executed: case PM_SizeGripSize:
0
4559 ret = int(QStyleHelper::dpiScaled(13.));-
4560 break;
never executed: break;
0
4561 case
never executed: case PM_MessageBoxIconSize:
PM_MessageBoxIconSize:
never executed: case PM_MessageBoxIconSize:
0
4562-
4563-
4564-
4565-
4566-
4567 {-
4568 ret = int(QStyleHelper::dpiScaled(32.));-
4569 }-
4570 break;
never executed: break;
0
4571 case
never executed: case PM_TextCursorWidth:
PM_TextCursorWidth:
never executed: case PM_TextCursorWidth:
0
4572 ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::TextCursorWidth).toInt();-
4573 break;
never executed: break;
0
4574 case
never executed: case PM_TabBar_ScrollButtonOverlap:
PM_TabBar_ScrollButtonOverlap:
never executed: case PM_TabBar_ScrollButtonOverlap:
0
4575 ret = 1;-
4576 break;
never executed: break;
0
4577 case
never executed: case PM_TabCloseIndicatorWidth:
PM_TabCloseIndicatorWidth:
never executed: case PM_TabCloseIndicatorWidth:
0
4578 case
never executed: case PM_TabCloseIndicatorHeight:
PM_TabCloseIndicatorHeight:
never executed: case PM_TabCloseIndicatorHeight:
0
4579 ret = int(QStyleHelper::dpiScaled(16.));-
4580 break;
never executed: break;
0
4581 case
never executed: case PM_ScrollView_ScrollBarSpacing:
PM_ScrollView_ScrollBarSpacing:
never executed: case PM_ScrollView_ScrollBarSpacing:
0
4582 ret = 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);-
4583 break;
never executed: break;
0
4584 case
never executed: case PM_ScrollView_ScrollBarOverlap:
PM_ScrollView_ScrollBarOverlap:
never executed: case PM_ScrollView_ScrollBarOverlap:
0
4585 ret = 0;-
4586 break;
never executed: break;
0
4587 case
never executed: case PM_SubMenuOverlap:
PM_SubMenuOverlap:
never executed: case PM_SubMenuOverlap:
0
4588 ret = -proxy()->pixelMetric(QStyle::PM_MenuPanelWidth, opt, widget);-
4589 break;
never executed: break;
0
4590 case
never executed: case PM_TreeViewIndentation:
PM_TreeViewIndentation:
never executed: case PM_TreeViewIndentation:
0
4591 ret = int(QStyleHelper::dpiScaled(20.));-
4592 break;
never executed: break;
0
4593 default
never executed: default:
:
never executed: default:
0
4594 ret = 0;-
4595 break;
never executed: break;
0
4596 }-
4597-
4598 return
never executed: return ret;
ret;
never executed: return ret;
0
4599}-
4600-
4601-
4602-
4603-
4604QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,-
4605 const QSize &csz, const QWidget *widget) const-
4606{-
4607 const QCommonStylePrivate * const d = d_func();-
4608 QSize sz(csz);-
4609 switch (ct) {-
4610 case
never executed: case CT_PushButton:
CT_PushButton:
never executed: case CT_PushButton:
0
4611 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4612 int w = csz.width(),-
4613 h = csz.height(),-
4614 bm = proxy()->pixelMetric(PM_ButtonMargin, btn, widget),-
4615 fw = proxy()->pixelMetric(PM_DefaultFrameWidth, btn, widget) * 2;-
4616 w += bm + fw;-
4617 h += bm + fw;-
4618 if (btn->features & QStyleOptionButton::AutoDefaultButton
btn->features ...oDefaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
){
0
4619 int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget) * 2;-
4620 w += dbw;-
4621 h += dbw;-
4622 }
never executed: end of block
0
4623 sz = QSize(w, h);-
4624 }
never executed: end of block
0
4625 break;
never executed: break;
0
4626 case
never executed: case CT_RadioButton:
CT_RadioButton:
never executed: case CT_RadioButton:
0
4627 case
never executed: case CT_CheckBox:
CT_CheckBox:
never executed: case CT_CheckBox:
0
4628 if (const
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)
const QStyleOp...Button *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4629 bool isRadio = (ct == CT_RadioButton);-
4630-
4631 int w = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorWidth-
4632 : PM_IndicatorWidth, btn, widget);-
4633 int h = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight-
4634 : PM_IndicatorHeight, btn, widget);-
4635-
4636 int margins = 0;-
4637-
4638 if (!btn->icon.isNull()
!btn->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
|| !btn->text.isEmpty()
!btn->text.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4639 margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing
never executed: margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, opt, widget);
0
4640 : PM_CheckBoxLabelSpacing, opt, widget);
never executed: margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, opt, widget);
0
4641 sz += QSize(w + margins, 4);-
4642 sz.setHeight(qMax(sz.height(), h));-
4643 }
never executed: end of block
0
4644 break;
never executed: break;
0
4645-
4646 case
never executed: case CT_MenuItem:
CT_MenuItem:
never executed: case CT_MenuItem:
0
4647 if (const
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionMenuItem *mi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)
const QStyleOp...nuItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4648 bool checkable = mi->menuHasCheckableItems;-
4649 int maxpmw = mi->maxIconWidth;-
4650 int w = sz.width(), h = sz.height();-
4651 if (mi->menuItemType == QStyleOptionMenuItem::Separator
mi->menuItemTy...tem::SeparatorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4652 w = 10;-
4653 h = 2;-
4654 }
never executed: end of block
else {
0
4655 h = mi->fontMetrics.height() + 8;-
4656 if (!mi->icon.isNull()
!mi->icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4657 int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);-
4658 h = qMax(h, mi->icon.actualSize(QSize(iconExtent, iconExtent)).height() + 4);-
4659 }
never executed: end of block
0
4660 }
never executed: end of block
0
4661 if (mi->text.contains(QLatin1Char('\t'))
mi->text.conta...in1Char('\t'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4662 w += 12;
never executed: w += 12;
0
4663 if (maxpmw > 0
maxpmw > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4664 w += maxpmw + 6;
never executed: w += maxpmw + 6;
0
4665 if (checkable
checkableDescription
TRUEnever evaluated
FALSEnever evaluated
&& maxpmw < 20
maxpmw < 20Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4666 w += 20 - maxpmw;
never executed: w += 20 - maxpmw;
0
4667 if (checkable
checkableDescription
TRUEnever evaluated
FALSEnever evaluated
|| maxpmw > 0
maxpmw > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4668 w += 2;
never executed: w += 2;
0
4669 w += 12;-
4670 sz = QSize(w, h);-
4671 }
never executed: end of block
0
4672 break;
never executed: break;
0
4673-
4674-
4675 case
never executed: case CT_ToolButton:
CT_ToolButton:
never executed: case CT_ToolButton:
0
4676 sz = QSize(sz.width() + 6, sz.height() + 5);-
4677 break;
never executed: break;
0
4678-
4679-
4680 case
never executed: case CT_ComboBox:
CT_ComboBox:
never executed: case CT_ComboBox:
0
4681 if (const
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)
const QStyleOp...mboBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4682 int fw = cmb->frame
cmb->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) * 2 : 0;
0
4683 const int textMargins = 2*(proxy()->pixelMetric(PM_FocusFrameHMargin) + 1);-
4684-
4685 int other = qMax(23, 2*textMargins + proxy()->pixelMetric(QStyle::PM_ScrollBarExtent, opt, widget));-
4686 sz = QSize(sz.width() + fw + other, sz.height() + fw);-
4687 }
never executed: end of block
0
4688 break;
never executed: break;
0
4689-
4690 case
never executed: case CT_HeaderSection:
CT_HeaderSection:
never executed: case CT_HeaderSection:
0
4691 if (const
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionHeader *hdr = qstyleoption_cast<const QStyleOptionHeader *>(opt)
const QStyleOp...Header *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4692 bool nullIcon = hdr->icon.isNull();-
4693 int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, hdr, widget);-
4694 int iconSize = nullIcon
nullIconDescription
TRUEnever evaluated
FALSEnever evaluated
? 0 : proxy()->pixelMetric(QStyle::PM_SmallIconSize, hdr, widget);
0
4695 QSize txt = hdr->fontMetrics.size(0, hdr->text);-
4696 sz.setHeight(margin + qMax(iconSize, txt.height()) + margin);-
4697 sz.setWidth((nullIcon ? 0 : margin) + iconSize-
4698 + (hdr->text.isNull() ? 0 : margin) + txt.width() + margin);-
4699 if (hdr->sortIndicator != QStyleOptionHeader::None
hdr->sortIndic...onHeader::NoneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4700 int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, hdr, widget);-
4701 if (hdr->orientation == Qt::Horizontal
hdr->orientati...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4702 sz.rwidth() += sz.height() + margin;
never executed: sz.rwidth() += sz.height() + margin;
0
4703 else-
4704 sz.rheight() += sz.width() + margin;
never executed: sz.rheight() += sz.width() + margin;
0
4705 }-
4706 }
never executed: end of block
0
4707 break;
never executed: break;
0
4708 case
never executed: case CT_TabWidget:
CT_TabWidget:
never executed: case CT_TabWidget:
0
4709 sz += QSize(4, 4);-
4710 break;
never executed: break;
0
4711 case
never executed: case CT_LineEdit:
CT_LineEdit:
never executed: case CT_LineEdit:
0
4712 if (const
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)
const QStyleOp...nFrame *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4713 sz += QSize(2*f->lineWidth, 2*f->lineWidth);
never executed: sz += QSize(2*f->lineWidth, 2*f->lineWidth);
0
4714 break;
never executed: break;
0
4715-
4716 case
never executed: case CT_GroupBox:
CT_GroupBox:
never executed: case CT_GroupBox:
0
4717 if (const
const QGroupBo...Box *>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
QGroupBox *grb = static_cast<const QGroupBox *>(widget)
const QGroupBo...Box *>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4718 sz += QSize(!grb->isFlat() ? 16 : 0, 0);
never executed: sz += QSize(!grb->isFlat() ? 16 : 0, 0);
0
4719 break;
never executed: break;
0
4720-
4721 case
never executed: case CT_MdiControls:
CT_MdiControls:
never executed: case CT_MdiControls:
0
4722 if (const
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)
const QStyleOp...omplex *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4723 int width = 1;-
4724 if (styleOpt->subControls & SC_MdiMinButton
styleOpt->subC...C_MdiMinButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4725 width += 16 + 1;
never executed: width += 16 + 1;
0
4726 if (styleOpt->subControls & SC_MdiNormalButton
styleOpt->subC...diNormalButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4727 width += 16 + 1;
never executed: width += 16 + 1;
0
4728 if (styleOpt->subControls & SC_MdiCloseButton
styleOpt->subC...MdiCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4729 width += 16 + 1;
never executed: width += 16 + 1;
0
4730 sz = QSize(width, 16);-
4731 }
never executed: end of block
else {
0
4732 sz = QSize(52, 16);-
4733 }
never executed: end of block
0
4734 break;
never executed: break;
0
4735-
4736 case
never executed: case CT_ItemViewItem:
CT_ItemViewItem:
never executed: case CT_ItemViewItem:
0
4737 if (const
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)
const QStyleOp...ewItem *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4738 QRect decorationRect, displayRect, checkRect;-
4739 d->viewItemLayout(vopt, &checkRect, &decorationRect, &displayRect, true);-
4740 sz = (decorationRect|displayRect|checkRect).size();-
4741 }
never executed: end of block
0
4742 break;
never executed: break;
0
4743-
4744-
4745 case
never executed: case CT_SpinBox:
CT_SpinBox:
never executed: case CT_SpinBox:
0
4746 if (const
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)
const QStyleOp...pinBox *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4747-
4748 int buttonWidth = 20;-
4749 int fw = vopt->frame
vopt->frameDescription
TRUEnever evaluated
FALSEnever evaluated
? proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget) : 0;
0
4750 sz += QSize(buttonWidth + 2*fw, 2*fw);-
4751 }
never executed: end of block
0
4752 break;
never executed: break;
0
4753-
4754 case
never executed: case CT_ScrollBar:
CT_ScrollBar:
never executed: case CT_ScrollBar:
0
4755 case
never executed: case CT_MenuBar:
CT_MenuBar:
never executed: case CT_MenuBar:
0
4756 case
never executed: case CT_Menu:
CT_Menu:
never executed: case CT_Menu:
0
4757 case
never executed: case CT_MenuBarItem:
CT_MenuBarItem:
never executed: case CT_MenuBarItem:
0
4758 case
never executed: case CT_Slider:
CT_Slider:
never executed: case CT_Slider:
0
4759 case
never executed: case CT_ProgressBar:
CT_ProgressBar:
never executed: case CT_ProgressBar:
0
4760 case
never executed: case CT_TabBarTab:
CT_TabBarTab:
never executed: case CT_TabBarTab:
0
4761-
4762-
4763 default
never executed: default:
:
never executed: default:
0
4764 break;
never executed: break;
0
4765 }-
4766 return
never executed: return sz;
sz;
never executed: return sz;
0
4767}-
4768-
4769-
4770-
4771int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *widget,-
4772 QStyleHintReturn *hret) const-
4773{-
4774 int ret = 0;-
4775-
4776 switch (sh) {-
4777 case
never executed: case SH_Menu_KeyboardSearch:
SH_Menu_KeyboardSearch:
never executed: case SH_Menu_KeyboardSearch:
0
4778 ret = false;-
4779 break;
never executed: break;
0
4780 case
never executed: case SH_Slider_AbsoluteSetButtons:
SH_Slider_AbsoluteSetButtons:
never executed: case SH_Slider_AbsoluteSetButtons:
0
4781 ret = Qt::MidButton;-
4782 break;
never executed: break;
0
4783 case
never executed: case SH_Slider_PageSetButtons:
SH_Slider_PageSetButtons:
never executed: case SH_Slider_PageSetButtons:
0
4784 ret = Qt::LeftButton;-
4785 break;
never executed: break;
0
4786 case
never executed: case SH_ScrollBar_ContextMenu:
SH_ScrollBar_ContextMenu:
never executed: case SH_ScrollBar_ContextMenu:
0
4787 ret = true;-
4788 break;
never executed: break;
0
4789 case
never executed: case SH_DialogButtons_DefaultButton:
SH_DialogButtons_DefaultButton:
never executed: case SH_DialogButtons_DefaultButton:
0
4790 ret = QDialogButtonBox::AcceptRole;-
4791 break;
never executed: break;
0
4792-
4793 case
never executed: case SH_GroupBox_TextLabelVerticalAlignment:
SH_GroupBox_TextLabelVerticalAlignment:
never executed: case SH_GroupBox_TextLabelVerticalAlignment:
0
4794 ret = Qt::AlignVCenter;-
4795 break;
never executed: break;
0
4796-
4797 case
never executed: case SH_GroupBox_TextLabelColor:
SH_GroupBox_TextLabelColor:
never executed: case SH_GroupBox_TextLabelColor:
0
4798 ret = opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
? int(opt->palette.color(QPalette::Text).rgba()) : 0;
0
4799 break;
never executed: break;
0
4800-
4801-
4802 case
never executed: case SH_ListViewExpand_SelectMouseType:
SH_ListViewExpand_SelectMouseType:
never executed: case SH_ListViewExpand_SelectMouseType:
0
4803 case
never executed: case SH_TabBar_SelectMouseType:
SH_TabBar_SelectMouseType:
never executed: case SH_TabBar_SelectMouseType:
0
4804 ret = QEvent::MouseButtonPress;-
4805 break;
never executed: break;
0
4806-
4807-
4808 case
never executed: case SH_TabBar_Alignment:
SH_TabBar_Alignment:
never executed: case SH_TabBar_Alignment:
0
4809 ret = Qt::AlignLeft;-
4810 break;
never executed: break;
0
4811-
4812 case
never executed: case SH_Header_ArrowAlignment:
SH_Header_ArrowAlignment:
never executed: case SH_Header_ArrowAlignment:
0
4813 ret = Qt::AlignRight | Qt::AlignVCenter;-
4814 break;
never executed: break;
0
4815-
4816 case
never executed: case SH_TitleBar_AutoRaise:
SH_TitleBar_AutoRaise:
never executed: case SH_TitleBar_AutoRaise:
0
4817 ret = false;-
4818 break;
never executed: break;
0
4819-
4820 case
never executed: case SH_Menu_SubMenuPopupDelay:
SH_Menu_SubMenuPopupDelay:
never executed: case SH_Menu_SubMenuPopupDelay:
0
4821 ret = 256;-
4822 break;
never executed: break;
0
4823-
4824 case
never executed: case SH_Menu_SloppySubMenus:
SH_Menu_SloppySubMenus:
never executed: case SH_Menu_SloppySubMenus:
0
4825 ret = true;-
4826 break;
never executed: break;
0
4827-
4828 case
never executed: case SH_Menu_SubMenuUniDirection:
SH_Menu_SubMenuUniDirection:
never executed: case SH_Menu_SubMenuUniDirection:
0
4829 ret = false;-
4830 break;
never executed: break;
0
4831 case
never executed: case SH_Menu_SubMenuUniDirectionFailCount:
SH_Menu_SubMenuUniDirectionFailCount:
never executed: case SH_Menu_SubMenuUniDirectionFailCount:
0
4832 ret = 1;-
4833 break;
never executed: break;
0
4834 case
never executed: case SH_Menu_SubMenuSloppySelectOtherActions:
SH_Menu_SubMenuSloppySelectOtherActions:
never executed: case SH_Menu_SubMenuSloppySelectOtherActions:
0
4835 ret = true;-
4836 break;
never executed: break;
0
4837 case
never executed: case SH_Menu_SubMenuSloppyCloseTimeout:
SH_Menu_SubMenuSloppyCloseTimeout:
never executed: case SH_Menu_SubMenuSloppyCloseTimeout:
0
4838 ret = 1000;-
4839 break;
never executed: break;
0
4840 case
never executed: case SH_Menu_SubMenuResetWhenReenteringParent:
SH_Menu_SubMenuResetWhenReenteringParent:
never executed: case SH_Menu_SubMenuResetWhenReenteringParent:
0
4841 ret = false;-
4842 break;
never executed: break;
0
4843 case
never executed: case SH_Menu_SubMenuDontStartSloppyOnLeave:
SH_Menu_SubMenuDontStartSloppyOnLeave:
never executed: case SH_Menu_SubMenuDontStartSloppyOnLeave:
0
4844 ret = false;-
4845 break;
never executed: break;
0
4846-
4847 case
never executed: case SH_ProgressDialog_TextLabelAlignment:
SH_ProgressDialog_TextLabelAlignment:
never executed: case SH_ProgressDialog_TextLabelAlignment:
0
4848 ret = Qt::AlignCenter;-
4849 break;
never executed: break;
0
4850-
4851 case
never executed: case SH_BlinkCursorWhenTextSelected:
SH_BlinkCursorWhenTextSelected:
never executed: case SH_BlinkCursorWhenTextSelected:
0
4852-
4853-
4854-
4855 ret = 1;-
4856-
4857 break;
never executed: break;
0
4858-
4859 case
never executed: case SH_Table_GridLineColor:
SH_Table_GridLineColor:
never executed: case SH_Table_GridLineColor:
0
4860 if (opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
4861 ret = opt->palette.color(QPalette::Mid).rgb();
never executed: ret = opt->palette.color(QPalette::Mid).rgb();
0
4862 else-
4863 ret = -1;
never executed: ret = -1;
0
4864 break;
never executed: break;
0
4865 case
never executed: case SH_LineEdit_PasswordCharacter:
SH_LineEdit_PasswordCharacter:
never executed: case SH_LineEdit_PasswordCharacter:
{
0
4866 const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();-
4867 const QPlatformTheme::ThemeHint hintType = QPlatformTheme::PasswordMaskCharacter;-
4868 const QVariant hint = theme
themeDescription
TRUEnever evaluated
FALSEnever evaluated
? theme->themeHint(hintType) : QPlatformTheme::defaultThemeHint(hintType);
0
4869 ret = hint.toChar().unicode();-
4870 break;
never executed: break;
0
4871 }-
4872 case
never executed: case SH_LineEdit_PasswordMaskDelay:
SH_LineEdit_PasswordMaskDelay:
never executed: case SH_LineEdit_PasswordMaskDelay:
0
4873 ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::PasswordMaskDelay).toInt();-
4874 break;
never executed: break;
0
4875 case
never executed: case SH_ToolBox_SelectedPageTitleBold:
SH_ToolBox_SelectedPageTitleBold:
never executed: case SH_ToolBox_SelectedPageTitleBold:
0
4876 ret = 1;-
4877 break;
never executed: break;
0
4878-
4879 case
never executed: case SH_UnderlineShortcut:
SH_UnderlineShortcut:
never executed: case SH_UnderlineShortcut:
0
4880 ret = 1;-
4881 break;
never executed: break;
0
4882-
4883 case
never executed: case SH_SpinBox_ClickAutoRepeatRate:
SH_SpinBox_ClickAutoRepeatRate:
never executed: case SH_SpinBox_ClickAutoRepeatRate:
0
4884 ret = 150;-
4885 break;
never executed: break;
0
4886-
4887 case
never executed: case SH_SpinBox_ClickAutoRepeatThreshold:
SH_SpinBox_ClickAutoRepeatThreshold:
never executed: case SH_SpinBox_ClickAutoRepeatThreshold:
0
4888 ret = 500;-
4889 break;
never executed: break;
0
4890-
4891 case
never executed: case SH_SpinBox_KeyPressAutoRepeatRate:
SH_SpinBox_KeyPressAutoRepeatRate:
never executed: case SH_SpinBox_KeyPressAutoRepeatRate:
0
4892 ret = 75;-
4893 break;
never executed: break;
0
4894-
4895 case
never executed: case SH_Menu_SelectionWrap:
SH_Menu_SelectionWrap:
never executed: case SH_Menu_SelectionWrap:
0
4896 ret = true;-
4897 break;
never executed: break;
0
4898-
4899 case
never executed: case SH_Menu_FillScreenWithScroll:
SH_Menu_FillScreenWithScroll:
never executed: case SH_Menu_FillScreenWithScroll:
0
4900 ret = true;-
4901 break;
never executed: break;
0
4902-
4903 case
never executed: case SH_ToolTipLabel_Opacity:
SH_ToolTipLabel_Opacity:
never executed: case SH_ToolTipLabel_Opacity:
0
4904 ret = 255;-
4905 break;
never executed: break;
0
4906-
4907 case
never executed: case SH_Button_FocusPolicy:
SH_Button_FocusPolicy:
never executed: case SH_Button_FocusPolicy:
0
4908 ret = Qt::StrongFocus;-
4909 break;
never executed: break;
0
4910-
4911 case
never executed: case SH_MessageBox_UseBorderForButtonSpacing:
SH_MessageBox_UseBorderForButtonSpacing:
never executed: case SH_MessageBox_UseBorderForButtonSpacing:
0
4912 ret = 0;-
4913 break;
never executed: break;
0
4914-
4915 case
never executed: case SH_ToolButton_PopupDelay:
SH_ToolButton_PopupDelay:
never executed: case SH_ToolButton_PopupDelay:
0
4916 ret = 600;-
4917 break;
never executed: break;
0
4918-
4919 case
never executed: case SH_FocusFrame_Mask:
SH_FocusFrame_Mask:
never executed: case SH_FocusFrame_Mask:
0
4920 ret = 1;-
4921 if (widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4922 if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret)
QStyleHintRetu...rnMask*>(hret)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4923 mask->region = widget->rect();-
4924 int vmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameVMargin),-
4925 hmargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin);-
4926 mask->region -= QRect(widget->rect().adjusted(hmargin, vmargin, -hmargin, -vmargin));-
4927 }
never executed: end of block
0
4928 }
never executed: end of block
0
4929 break;
never executed: break;
0
4930-
4931 case
never executed: case SH_RubberBand_Mask:
SH_RubberBand_Mask:
never executed: case SH_RubberBand_Mask:
0
4932 if (const
const QStyleOp...erBand *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
QStyleOptionRubberBand *rbOpt = qstyleoption_cast<const QStyleOptionRubberBand *>(opt)
const QStyleOp...erBand *>(opt)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4933 ret = 0;-
4934 if (rbOpt->shape == QRubberBand::Rectangle
rbOpt->shape =...and::RectangleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
4935 ret = true;-
4936 if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(hret)
QStyleHintRetu...rnMask*>(hret)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
4937 mask->region = opt->rect;-
4938 int margin = proxy()->pixelMetric(PM_DefaultFrameWidth) * 2;-
4939 mask->region -= opt->rect.adjusted(margin, margin, -margin, -margin);-
4940 }
never executed: end of block
0
4941 }
never executed: end of block
0
4942 }
never executed: end of block
0
4943 break;
never executed: break;
0
4944-
4945 case
never executed: case SH_SpinControls_DisableOnBounds:
SH_SpinControls_DisableOnBounds:
never executed: case SH_SpinControls_DisableOnBounds:
0
4946 ret = 1;-
4947 break;
never executed: break;
0
4948-
4949 case
never executed: case SH_Dial_BackgroundRole:
SH_Dial_BackgroundRole:
never executed: case SH_Dial_BackgroundRole:
0
4950 ret = QPalette::Window;-
4951 break;
never executed: break;
0
4952-
4953 case
never executed: case SH_ComboBox_LayoutDirection:
SH_ComboBox_LayoutDirection:
never executed: case SH_ComboBox_LayoutDirection:
0
4954 ret = opt
optDescription
TRUEnever evaluated
FALSEnever evaluated
? opt->direction : Qt::LeftToRight;
0
4955 break;
never executed: break;
0
4956-
4957 case
never executed: case SH_ItemView_EllipsisLocation:
SH_ItemView_EllipsisLocation:
never executed: case SH_ItemView_EllipsisLocation:
0
4958 ret = Qt::AlignTrailing;-
4959 break;
never executed: break;
0
4960-
4961 case
never executed: case SH_ItemView_ShowDecorationSelected:
SH_ItemView_ShowDecorationSelected:
never executed: case SH_ItemView_ShowDecorationSelected:
0
4962 ret = false;-
4963 break;
never executed: break;
0
4964-
4965 case
never executed: case SH_ItemView_ActivateItemOnSingleClick:
SH_ItemView_ActivateItemOnSingleClick:
never executed: case SH_ItemView_ActivateItemOnSingleClick:
0
4966 ret = 0;-
4967 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4968 ret = theme->themeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick).toBool()
theme->themeHi...lick).toBool()Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
never executed: ret = theme->themeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick).toBool() ? 1 : 0;
0
4969 break;
never executed: break;
0
4970 case
never executed: case SH_TitleBar_ModifyNotification:
SH_TitleBar_ModifyNotification:
never executed: case SH_TitleBar_ModifyNotification:
0
4971 ret = true;-
4972 break;
never executed: break;
0
4973 case
never executed: case SH_ScrollBar_RollBetweenButtons:
SH_ScrollBar_RollBetweenButtons:
never executed: case SH_ScrollBar_RollBetweenButtons:
0
4974 ret = false;-
4975 break;
never executed: break;
0
4976 case
never executed: case SH_TabBar_ElideMode:
SH_TabBar_ElideMode:
never executed: case SH_TabBar_ElideMode:
0
4977 ret = Qt::ElideNone;-
4978 break;
never executed: break;
0
4979 case
never executed: case SH_DialogButtonLayout:
SH_DialogButtonLayout:
never executed: case SH_DialogButtonLayout:
0
4980 ret = QDialogButtonBox::WinLayout;-
4981 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4982 ret = theme->themeHint(QPlatformTheme::DialogButtonBoxLayout).toInt();
never executed: ret = theme->themeHint(QPlatformTheme::DialogButtonBoxLayout).toInt();
0
4983 break;
never executed: break;
0
4984 case
never executed: case SH_ComboBox_PopupFrameStyle:
SH_ComboBox_PopupFrameStyle:
never executed: case SH_ComboBox_PopupFrameStyle:
0
4985 ret = QFrame::StyledPanel | QFrame::Plain;-
4986 break;
never executed: break;
0
4987 case
never executed: case SH_MessageBox_TextInteractionFlags:
SH_MessageBox_TextInteractionFlags:
never executed: case SH_MessageBox_TextInteractionFlags:
0
4988 ret = Qt::LinksAccessibleByMouse;-
4989 break;
never executed: break;
0
4990 case
never executed: case SH_DialogButtonBox_ButtonsHaveIcons:
SH_DialogButtonBox_ButtonsHaveIcons:
never executed: case SH_DialogButtonBox_ButtonsHaveIcons:
0
4991 ret = 0;-
4992 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
4993 ret = theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool()
theme->themeHi...cons).toBool()Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
never executed: ret = theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool() ? 1 : 0;
0
4994 break;
never executed: break;
0
4995 case
never executed: case SH_SpellCheckUnderlineStyle:
SH_SpellCheckUnderlineStyle:
never executed: case SH_SpellCheckUnderlineStyle:
0
4996 ret = QTextCharFormat::WaveUnderline;-
4997 break;
never executed: break;
0
4998 case
never executed: case SH_MessageBox_CenterButtons:
SH_MessageBox_CenterButtons:
never executed: case SH_MessageBox_CenterButtons:
0
4999 ret = true;-
5000 break;
never executed: break;
0
5001 case
never executed: case SH_ItemView_MovementWithoutUpdatingSelection:
SH_ItemView_MovementWithoutUpdatingSelection:
never executed: case SH_ItemView_MovementWithoutUpdatingSelection:
0
5002 ret = true;-
5003 break;
never executed: break;
0
5004 case
never executed: case SH_FocusFrame_AboveWidget:
SH_FocusFrame_AboveWidget:
never executed: case SH_FocusFrame_AboveWidget:
0
5005 ret = false;-
5006 break;
never executed: break;
0
5007-
5008 case
never executed: case SH_TabWidget_DefaultTabPosition:
SH_TabWidget_DefaultTabPosition:
never executed: case SH_TabWidget_DefaultTabPosition:
0
5009 ret = QTabWidget::North;-
5010 break;
never executed: break;
0
5011-
5012 case
never executed: case SH_ToolBar_Movable:
SH_ToolBar_Movable:
never executed: case SH_ToolBar_Movable:
0
5013 ret = true;-
5014 break;
never executed: break;
0
5015 case
never executed: case SH_TextControl_FocusIndicatorTextCharFormat:
SH_TextControl_FocusIndicatorTextCharFormat:
never executed: case SH_TextControl_FocusIndicatorTextCharFormat:
0
5016 ret = true;-
5017 if (QStyleHintReturnVariant *vret = qstyleoption_cast<QStyleHintReturnVariant*>(hret)
QStyleHintRetu...ariant*>(hret)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5018 QPen outline(opt->palette.color(QPalette::Text), 1, Qt::DotLine);-
5019 QTextCharFormat fmt;-
5020 fmt.setProperty(QTextFormat::OutlinePen, outline);-
5021 vret->variant = fmt;-
5022 }
never executed: end of block
0
5023 break;
never executed: break;
0
5024-
5025 case
never executed: case SH_WizardStyle:
SH_WizardStyle:
never executed: case SH_WizardStyle:
0
5026 ret = QWizard::ClassicStyle;-
5027 break;
never executed: break;
0
5028-
5029 case
never executed: case SH_FormLayoutWrapPolicy:
SH_FormLayoutWrapPolicy:
never executed: case SH_FormLayoutWrapPolicy:
0
5030 ret = QFormLayout::DontWrapRows;-
5031 break;
never executed: break;
0
5032 case
never executed: case SH_FormLayoutFieldGrowthPolicy:
SH_FormLayoutFieldGrowthPolicy:
never executed: case SH_FormLayoutFieldGrowthPolicy:
0
5033 ret = QFormLayout::AllNonFixedFieldsGrow;-
5034 break;
never executed: break;
0
5035 case
never executed: case SH_FormLayoutFormAlignment:
SH_FormLayoutFormAlignment:
never executed: case SH_FormLayoutFormAlignment:
0
5036 ret = Qt::AlignLeft | Qt::AlignTop;-
5037 break;
never executed: break;
0
5038 case
never executed: case SH_FormLayoutLabelAlignment:
SH_FormLayoutLabelAlignment:
never executed: case SH_FormLayoutLabelAlignment:
0
5039 ret = Qt::AlignLeft;-
5040 break;
never executed: break;
0
5041 case
never executed: case SH_ItemView_ArrowKeysNavigateIntoChildren:
SH_ItemView_ArrowKeysNavigateIntoChildren:
never executed: case SH_ItemView_ArrowKeysNavigateIntoChildren:
0
5042 ret = false;-
5043 break;
never executed: break;
0
5044 case
never executed: case SH_ItemView_DrawDelegateFrame:
SH_ItemView_DrawDelegateFrame:
never executed: case SH_ItemView_DrawDelegateFrame:
0
5045 ret = 0;-
5046 break;
never executed: break;
0
5047-
5048 case
never executed: case SH_TabBar_CloseButtonPosition:
SH_TabBar_CloseButtonPosition:
never executed: case SH_TabBar_CloseButtonPosition:
0
5049 ret = QTabBar::RightSide;-
5050 break;
never executed: break;
0
5051 case
never executed: case SH_TabBar_ChangeCurrentDelay:
SH_TabBar_ChangeCurrentDelay:
never executed: case SH_TabBar_ChangeCurrentDelay:
0
5052 ret = 500;-
5053 break;
never executed: break;
0
5054-
5055 case
never executed: case SH_DockWidget_ButtonsHaveFrame:
SH_DockWidget_ButtonsHaveFrame:
never executed: case SH_DockWidget_ButtonsHaveFrame:
0
5056 ret = true;-
5057 break;
never executed: break;
0
5058 case
never executed: case SH_ToolButtonStyle:
SH_ToolButtonStyle:
never executed: case SH_ToolButtonStyle:
0
5059 ret = 0;-
5060 if (const
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()
const QPlatfor...latformTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5061 ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toInt();
never executed: ret = theme->themeHint(QPlatformTheme::ToolButtonStyle).toInt();
0
5062 break;
never executed: break;
0
5063 case
never executed: case SH_RequestSoftwareInputPanel:
SH_RequestSoftwareInputPanel:
never executed: case SH_RequestSoftwareInputPanel:
0
5064 ret = RSIP_OnMouseClick;-
5065 break;
never executed: break;
0
5066 case
never executed: case SH_ScrollBar_Transient:
SH_ScrollBar_Transient:
never executed: case SH_ScrollBar_Transient:
0
5067 ret = false;-
5068 break;
never executed: break;
0
5069 case
never executed: case SH_Menu_SupportsSections:
SH_Menu_SupportsSections:
never executed: case SH_Menu_SupportsSections:
0
5070 ret = false;-
5071 break;
never executed: break;
0
5072-
5073 case
never executed: case SH_ToolTip_WakeUpDelay:
SH_ToolTip_WakeUpDelay:
never executed: case SH_ToolTip_WakeUpDelay:
0
5074 ret = 700;-
5075 break;
never executed: break;
0
5076 case
never executed: case SH_ToolTip_FallAsleepDelay:
SH_ToolTip_FallAsleepDelay:
never executed: case SH_ToolTip_FallAsleepDelay:
0
5077 ret = 2000;-
5078 break;
never executed: break;
0
5079-
5080 case
never executed: case SH_Widget_Animate:
SH_Widget_Animate:
never executed: case SH_Widget_Animate:
0
5081-
5082 if (qobject_cast<const QTreeView*>(widget)
qobject_cast<c...View*>(widget)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5083 ret = false;-
5084 }
never executed: end of block
else
0
5085-
5086 {-
5087 ret = true;-
5088 }
never executed: end of block
0
5089 break;
never executed: break;
0
5090 case
never executed: case SH_Splitter_OpaqueResize:
SH_Splitter_OpaqueResize:
never executed: case SH_Splitter_OpaqueResize:
0
5091 ret = true;-
5092 break;
never executed: break;
0
5093 case
never executed: case SH_ItemView_ScrollMode:
SH_ItemView_ScrollMode:
never executed: case SH_ItemView_ScrollMode:
0
5094 ret = QAbstractItemView::ScrollPerItem;-
5095 break;
never executed: break;
0
5096 default
never executed: default:
:
never executed: default:
0
5097 ret = 0;-
5098 break;
never executed: break;
0
5099 }-
5100-
5101 return
never executed: return ret;
ret;
never executed: return ret;
0
5102}-
5103-
5104static QPixmap cachedPixmapFromXPM(const char * const *xpm)-
5105{-
5106 QPixmap result;-
5107 const QString tag = QString::asprintf("xpm:0x%p", static_cast<const void*>(xpm));-
5108 if (!QPixmapCache::find(tag, &result)
!QPixmapCache:...(tag, &result)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5109 result = QPixmap(xpm);-
5110 QPixmapCache::insert(tag, result);-
5111 }
never executed: end of block
0
5112 return
never executed: return result;
result;
never executed: return result;
0
5113}-
5114-
5115static inline QPixmap titleBarMenuCachedPixmapFromXPM() { return
never executed: return cachedPixmapFromXPM(qt_menu_xpm);
cachedPixmapFromXPM(qt_menu_xpm);
never executed: return cachedPixmapFromXPM(qt_menu_xpm);
}
0
5116-
5117-
5118static inline QString clearText16IconPath()-
5119{-
5120 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" ":/qt-project.org/styles/commonstyle/images/cleartext-16.png" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
5121}-
5122-
5123-
5124static QIcon clearTextIcon(bool rtl)-
5125{-
5126 const QString directionalThemeName = rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
0
5127 ? ([]() -> QString { enum { Size = sizeof(u"" "edit-clear-locationbar-ltr")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "edit-clear-locationbar-ltr" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) : ([]() -> QString { enum { Size = sizeof(u"" "edit-clear-locationbar-rtl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "edit-clear-locationbar-rtl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
5128 if (QIcon::hasThemeIcon(directionalThemeName)
QIcon::hasThem...onalThemeName)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5129 return
never executed: return QIcon::fromTheme(directionalThemeName);
QIcon::fromTheme(directionalThemeName);
never executed: return QIcon::fromTheme(directionalThemeName);
0
5130 const QString themeName = ([]() -> QString { enum { Size = sizeof(u"" "edit-clear")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "edit-clear" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
5131 if (QIcon::hasThemeIcon(themeName)
QIcon::hasThemeIcon(themeName)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5132 return
never executed: return QIcon::fromTheme(themeName);
QIcon::fromTheme(themeName);
never executed: return QIcon::fromTheme(themeName);
0
5133-
5134 QIcon icon;-
5135-
5136 QPixmap clearText16(clearText16IconPath());-
5137 ((!(!clearText16.size().isEmpty())) ? qt_assert("!clearText16.size().isEmpty()",__FILE__,5262) : qt_noop());-
5138 icon.addPixmap(clearText16);-
5139 QPixmap clearText32(([]() -> QString { enum { Size = sizeof(u"" ":/qt-project.org/styles/commonstyle/images/cleartext-32.png")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" ":/qt-project.org/styles/commonstyle/images/cleartext-32.png" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
0
5140 ((!(!clearText32.size().isEmpty())) ? qt_assert("!clearText32.size().isEmpty()",__FILE__,5265) : qt_noop());-
5141 icon.addPixmap(clearText32);-
5142 clearText32.setDevicePixelRatio(2);-
5143 icon.addPixmap(clearText32);-
5144-
5145 return
never executed: return icon;
icon;
never executed: return icon;
0
5146}-
5147-
5148-
5149QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option,-
5150 const QWidget *widget) const-
5151{-
5152 const bool rtl = (option
optionDescription
TRUEnever evaluated
FALSEnever evaluated
&& option->direction == Qt::RightToLeft
option->direct...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) || (!option
!optionDescription
TRUEnever evaluated
FALSEnever evaluated
&& QApplication::isRightToLeft()
QApplication::isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
);
0
5153-
5154-
5155-
5156-
5157 QPixmap pixmap;-
5158-
5159 if (QApplication::desktopSettingsAware()
QApplication::...ettingsAware()Description
TRUEnever evaluated
FALSEnever evaluated
&& !QIcon::themeName().isEmpty()
!QIcon::themeName().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5160 switch (sp) {-
5161 case
never executed: case SP_DialogYesButton:
SP_DialogYesButton:
never executed: case SP_DialogYesButton:
0
5162 case
never executed: case SP_DialogOkButton:
SP_DialogOkButton:
never executed: case SP_DialogOkButton:
0
5163 pixmap = QIcon::fromTheme(QLatin1String("dialog-ok")).pixmap(16);-
5164 break;
never executed: break;
0
5165 case
never executed: case SP_DialogApplyButton:
SP_DialogApplyButton:
never executed: case SP_DialogApplyButton:
0
5166 pixmap = QIcon::fromTheme(QLatin1String("dialog-ok-apply")).pixmap(16);-
5167 break;
never executed: break;
0
5168 case
never executed: case SP_DialogDiscardButton:
SP_DialogDiscardButton:
never executed: case SP_DialogDiscardButton:
0
5169 pixmap = QIcon::fromTheme(QLatin1String("edit-delete")).pixmap(16);-
5170 break;
never executed: break;
0
5171 case
never executed: case SP_DialogCloseButton:
SP_DialogCloseButton:
never executed: case SP_DialogCloseButton:
0
5172 pixmap = QIcon::fromTheme(QLatin1String("dialog-close")).pixmap(16);-
5173 break;
never executed: break;
0
5174 case
never executed: case SP_DirHomeIcon:
SP_DirHomeIcon:
never executed: case SP_DirHomeIcon:
0
5175 pixmap = QIcon::fromTheme(QLatin1String("user-home")).pixmap(16);-
5176 break;
never executed: break;
0
5177 case
never executed: case SP_MessageBoxInformation:
SP_MessageBoxInformation:
never executed: case SP_MessageBoxInformation:
0
5178 pixmap = QIcon::fromTheme(QLatin1String("messagebox_info")).pixmap(16);-
5179 break;
never executed: break;
0
5180 case
never executed: case SP_MessageBoxWarning:
SP_MessageBoxWarning:
never executed: case SP_MessageBoxWarning:
0
5181 pixmap = QIcon::fromTheme(QLatin1String("messagebox_warning")).pixmap(16);-
5182 break;
never executed: break;
0
5183 case
never executed: case SP_MessageBoxCritical:
SP_MessageBoxCritical:
never executed: case SP_MessageBoxCritical:
0
5184 pixmap = QIcon::fromTheme(QLatin1String("messagebox_critical")).pixmap(16);-
5185 break;
never executed: break;
0
5186 case
never executed: case SP_MessageBoxQuestion:
SP_MessageBoxQuestion:
never executed: case SP_MessageBoxQuestion:
0
5187 pixmap = QIcon::fromTheme(QLatin1String("help")).pixmap(16);-
5188 break;
never executed: break;
0
5189 case
never executed: case SP_DialogOpenButton:
SP_DialogOpenButton:
never executed: case SP_DialogOpenButton:
0
5190 case
never executed: case SP_DirOpenIcon:
SP_DirOpenIcon:
never executed: case SP_DirOpenIcon:
0
5191 pixmap = QIcon::fromTheme(QLatin1String("folder-open")).pixmap(16);-
5192 break;
never executed: break;
0
5193 case
never executed: case SP_FileIcon:
SP_FileIcon:
never executed: case SP_FileIcon:
0
5194 pixmap = QIcon::fromTheme(QLatin1String("text-x-generic"),-
5195 QIcon::fromTheme(QLatin1String("empty"))).pixmap(16);-
5196 break;
never executed: break;
0
5197 case
never executed: case SP_DirClosedIcon:
SP_DirClosedIcon:
never executed: case SP_DirClosedIcon:
0
5198 case
never executed: case SP_DirIcon:
SP_DirIcon:
never executed: case SP_DirIcon:
0
5199 pixmap = QIcon::fromTheme(QLatin1String("folder")).pixmap(16);-
5200 break;
never executed: break;
0
5201 case
never executed: case SP_DriveFDIcon:
SP_DriveFDIcon:
never executed: case SP_DriveFDIcon:
0
5202 pixmap = QIcon::fromTheme(QLatin1String("media-floppy"),-
5203 QIcon::fromTheme(QLatin1String("3floppy_unmount"))).pixmap(16);-
5204 break;
never executed: break;
0
5205 case
never executed: case SP_ComputerIcon:
SP_ComputerIcon:
never executed: case SP_ComputerIcon:
0
5206 pixmap = QIcon::fromTheme(QLatin1String("computer"),-
5207 QIcon::fromTheme(QLatin1String("system"))).pixmap(16);-
5208 break;
never executed: break;
0
5209 case
never executed: case SP_DesktopIcon:
SP_DesktopIcon:
never executed: case SP_DesktopIcon:
0
5210 pixmap = QIcon::fromTheme(QLatin1String("user-desktop"),-
5211 QIcon::fromTheme(QLatin1String("desktop"))).pixmap(16);-
5212 break;
never executed: break;
0
5213 case
never executed: case SP_TrashIcon:
SP_TrashIcon:
never executed: case SP_TrashIcon:
0
5214 pixmap = QIcon::fromTheme(QLatin1String("user-trash"),-
5215 QIcon::fromTheme(QLatin1String("trashcan_empty"))).pixmap(16);-
5216 break;
never executed: break;
0
5217 case
never executed: case SP_DriveCDIcon:
SP_DriveCDIcon:
never executed: case SP_DriveCDIcon:
0
5218 case
never executed: case SP_DriveDVDIcon:
SP_DriveDVDIcon:
never executed: case SP_DriveDVDIcon:
0
5219 pixmap = QIcon::fromTheme(QLatin1String("media-optical"),-
5220 QIcon::fromTheme(QLatin1String("cdrom_unmount"))).pixmap(16);-
5221 break;
never executed: break;
0
5222 case
never executed: case SP_DriveHDIcon:
SP_DriveHDIcon:
never executed: case SP_DriveHDIcon:
0
5223 pixmap = QIcon::fromTheme(QLatin1String("drive-harddisk"),-
5224 QIcon::fromTheme(QLatin1String("hdd_unmount"))).pixmap(16);-
5225 break;
never executed: break;
0
5226 case
never executed: case SP_FileDialogToParent:
SP_FileDialogToParent:
never executed: case SP_FileDialogToParent:
0
5227 pixmap = QIcon::fromTheme(QLatin1String("go-up"),-
5228 QIcon::fromTheme(QLatin1String("up"))).pixmap(16);-
5229 break;
never executed: break;
0
5230 case
never executed: case SP_FileDialogNewFolder:
SP_FileDialogNewFolder:
never executed: case SP_FileDialogNewFolder:
0
5231 pixmap = QIcon::fromTheme(QLatin1String("folder_new")).pixmap(16);-
5232 break;
never executed: break;
0
5233 case
never executed: case SP_ArrowUp:
SP_ArrowUp:
never executed: case SP_ArrowUp:
0
5234 pixmap = QIcon::fromTheme(QLatin1String("go-up"),-
5235 QIcon::fromTheme(QLatin1String("up"))).pixmap(16);-
5236 break;
never executed: break;
0
5237 case
never executed: case SP_ArrowDown:
SP_ArrowDown:
never executed: case SP_ArrowDown:
0
5238 pixmap = QIcon::fromTheme(QLatin1String("go-down"),-
5239 QIcon::fromTheme(QLatin1String("down"))).pixmap(16);-
5240 break;
never executed: break;
0
5241 case
never executed: case SP_ArrowRight:
SP_ArrowRight:
never executed: case SP_ArrowRight:
0
5242 pixmap = QIcon::fromTheme(QLatin1String("go-next"),-
5243 QIcon::fromTheme(QLatin1String("forward"))).pixmap(16);-
5244 break;
never executed: break;
0
5245 case
never executed: case SP_ArrowLeft:
SP_ArrowLeft:
never executed: case SP_ArrowLeft:
0
5246 pixmap = QIcon::fromTheme(QLatin1String("go-previous"),-
5247 QIcon::fromTheme(QLatin1String("back"))).pixmap(16);-
5248 break;
never executed: break;
0
5249 case
never executed: case SP_FileDialogDetailedView:
SP_FileDialogDetailedView:
never executed: case SP_FileDialogDetailedView:
0
5250 pixmap = QIcon::fromTheme(QLatin1String("view_detailed")).pixmap(16);-
5251 break;
never executed: break;
0
5252 case
never executed: case SP_FileDialogListView:
SP_FileDialogListView:
never executed: case SP_FileDialogListView:
0
5253 pixmap = QIcon::fromTheme(QLatin1String("view_icon")).pixmap(16);-
5254 break;
never executed: break;
0
5255 case
never executed: case SP_BrowserReload:
SP_BrowserReload:
never executed: case SP_BrowserReload:
0
5256 pixmap = QIcon::fromTheme(QLatin1String("reload")).pixmap(16);-
5257 break;
never executed: break;
0
5258 case
never executed: case SP_BrowserStop:
SP_BrowserStop:
never executed: case SP_BrowserStop:
0
5259 pixmap = QIcon::fromTheme(QLatin1String("process-stop")).pixmap(16);-
5260 break;
never executed: break;
0
5261 case
never executed: case SP_MediaPlay:
SP_MediaPlay:
never executed: case SP_MediaPlay:
0
5262 pixmap = QIcon::fromTheme(QLatin1String("media-playback-start")).pixmap(16);-
5263 break;
never executed: break;
0
5264 case
never executed: case SP_MediaPause:
SP_MediaPause:
never executed: case SP_MediaPause:
0
5265 pixmap = QIcon::fromTheme(QLatin1String("media-playback-pause")).pixmap(16);-
5266 break;
never executed: break;
0
5267 case
never executed: case SP_MediaStop:
SP_MediaStop:
never executed: case SP_MediaStop:
0
5268 pixmap = QIcon::fromTheme(QLatin1String("media-playback-stop")).pixmap(16);-
5269 break;
never executed: break;
0
5270 case
never executed: case SP_MediaSeekForward:
SP_MediaSeekForward:
never executed: case SP_MediaSeekForward:
0
5271 pixmap = QIcon::fromTheme(QLatin1String("media-seek-forward")).pixmap(16);-
5272 break;
never executed: break;
0
5273 case
never executed: case SP_MediaSeekBackward:
SP_MediaSeekBackward:
never executed: case SP_MediaSeekBackward:
0
5274 pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16);-
5275 break;
never executed: break;
0
5276 case
never executed: case SP_MediaSkipForward:
SP_MediaSkipForward:
never executed: case SP_MediaSkipForward:
0
5277 pixmap = QIcon::fromTheme(QLatin1String("media-skip-forward")).pixmap(16);-
5278 break;
never executed: break;
0
5279 case
never executed: case SP_MediaSkipBackward:
SP_MediaSkipBackward:
never executed: case SP_MediaSkipBackward:
0
5280 pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16);-
5281 break;
never executed: break;
0
5282 case
never executed: case SP_DialogResetButton:
SP_DialogResetButton:
never executed: case SP_DialogResetButton:
0
5283 pixmap = QIcon::fromTheme(QLatin1String("edit-clear")).pixmap(24);-
5284 break;
never executed: break;
0
5285 case
never executed: case SP_DialogHelpButton:
SP_DialogHelpButton:
never executed: case SP_DialogHelpButton:
0
5286 pixmap = QIcon::fromTheme(QLatin1String("help-contents")).pixmap(24);-
5287 break;
never executed: break;
0
5288 case
never executed: case SP_DialogNoButton:
SP_DialogNoButton:
never executed: case SP_DialogNoButton:
0
5289 case
never executed: case SP_DialogCancelButton:
SP_DialogCancelButton:
never executed: case SP_DialogCancelButton:
0
5290 pixmap = QIcon::fromTheme(QLatin1String("dialog-cancel"),-
5291 QIcon::fromTheme(QLatin1String("process-stop"))).pixmap(24);-
5292 break;
never executed: break;
0
5293 case
never executed: case SP_DialogSaveButton:
SP_DialogSaveButton:
never executed: case SP_DialogSaveButton:
0
5294 pixmap = QIcon::fromTheme(QLatin1String("document-save")).pixmap(24);-
5295 break;
never executed: break;
0
5296 case
never executed: case SP_FileLinkIcon:
SP_FileLinkIcon:
never executed: case SP_FileLinkIcon:
0
5297 pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16);-
5298 if (!pixmap.isNull()
!pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5299 QPixmap fileIcon = QIcon::fromTheme(QLatin1String("text-x-generic")).pixmap(16);-
5300 if (fileIcon.isNull()
fileIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5301 fileIcon = QIcon::fromTheme(QLatin1String("empty")).pixmap(16);
never executed: fileIcon = QIcon::fromTheme(QLatin1String("empty")).pixmap(16);
0
5302 if (!fileIcon.isNull()
!fileIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5303 QPainter painter(&fileIcon);-
5304 painter.drawPixmap(0, 0, 16, 16, pixmap);-
5305 return
never executed: return fileIcon;
fileIcon;
never executed: return fileIcon;
0
5306 }-
5307 }
never executed: end of block
0
5308 break;
never executed: break;
0
5309 case
never executed: case SP_DirLinkIcon:
SP_DirLinkIcon:
never executed: case SP_DirLinkIcon:
0
5310 pixmap = QIcon::fromTheme(QLatin1String("emblem-symbolic-link")).pixmap(16);-
5311 if (!pixmap.isNull()
!pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5312 QPixmap dirIcon = QIcon::fromTheme(QLatin1String("folder")).pixmap(16);-
5313 if (!dirIcon.isNull()
!dirIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5314 QPainter painter(&dirIcon);-
5315 painter.drawPixmap(0, 0, 16, 16, pixmap);-
5316 return
never executed: return dirIcon;
dirIcon;
never executed: return dirIcon;
0
5317 }-
5318 }
never executed: end of block
0
5319 break;
never executed: break;
0
5320 case
never executed: case SP_LineEditClearButton:
SP_LineEditClearButton:
never executed: case SP_LineEditClearButton:
0
5321 pixmap = clearTextIcon(rtl).pixmap(16);-
5322 break;
never executed: break;
0
5323 default
never executed: default:
:
never executed: default:
0
5324 break;
never executed: break;
0
5325 }-
5326 }-
5327-
5328 if (!pixmap.isNull()
!pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5329 return
never executed: return pixmap;
pixmap;
never executed: return pixmap;
0
5330-
5331 switch (sp) {-
5332-
5333 case
never executed: case SP_ToolBarHorizontalExtensionButton:
SP_ToolBarHorizontalExtensionButton:
never executed: case SP_ToolBarHorizontalExtensionButton:
0
5334 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
5335 QImage im(tb_extension_arrow_h_xpm);-
5336 im = im.convertToFormat(QImage::Format_ARGB32).mirrored(true, false);-
5337 return
never executed: return QPixmap::fromImage(im);
QPixmap::fromImage(im);
never executed: return QPixmap::fromImage(im);
0
5338 }-
5339 return
never executed: return cachedPixmapFromXPM(tb_extension_arrow_h_xpm);
cachedPixmapFromXPM(tb_extension_arrow_h_xpm);
never executed: return cachedPixmapFromXPM(tb_extension_arrow_h_xpm);
0
5340 case
never executed: case SP_ToolBarVerticalExtensionButton:
SP_ToolBarVerticalExtensionButton:
never executed: case SP_ToolBarVerticalExtensionButton:
0
5341 return
never executed: return cachedPixmapFromXPM(tb_extension_arrow_v_xpm);
cachedPixmapFromXPM(tb_extension_arrow_v_xpm);
never executed: return cachedPixmapFromXPM(tb_extension_arrow_v_xpm);
0
5342 case
never executed: case SP_FileDialogStart:
SP_FileDialogStart:
never executed: case SP_FileDialogStart:
0
5343 return
never executed: return cachedPixmapFromXPM(filedialog_start_xpm);
cachedPixmapFromXPM(filedialog_start_xpm);
never executed: return cachedPixmapFromXPM(filedialog_start_xpm);
0
5344 case
never executed: case SP_FileDialogEnd:
SP_FileDialogEnd:
never executed: case SP_FileDialogEnd:
0
5345 return
never executed: return cachedPixmapFromXPM(filedialog_end_xpm);
cachedPixmapFromXPM(filedialog_end_xpm);
never executed: return cachedPixmapFromXPM(filedialog_end_xpm);
0
5346-
5347-
5348 case
never executed: case SP_CommandLink:
SP_CommandLink:
never executed: case SP_CommandLink:
0
5349 case
never executed: case SP_ArrowForward:
SP_ArrowForward:
never executed: case SP_ArrowForward:
0
5350 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5351 return
never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget);
proxy()->standardPixmap(SP_ArrowLeft, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget);
0
5352 return
never executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget);
proxy()->standardPixmap(SP_ArrowRight, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget);
0
5353 case
never executed: case SP_ArrowBack:
SP_ArrowBack:
never executed: case SP_ArrowBack:
0
5354 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5355 return
never executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget);
proxy()->standardPixmap(SP_ArrowRight, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowRight, option, widget);
0
5356 return
never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget);
proxy()->standardPixmap(SP_ArrowLeft, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowLeft, option, widget);
0
5357 case
never executed: case SP_ArrowLeft:
SP_ArrowLeft:
never executed: case SP_ArrowLeft:
0
5358 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"));
0
5359 case
never executed: case SP_ArrowRight:
SP_ArrowRight:
never executed: case SP_ArrowRight:
0
5360 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"));
0
5361 case
never executed: case SP_ArrowUp:
SP_ArrowUp:
never executed: case SP_ArrowUp:
0
5362 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"));
0
5363 case
never executed: case SP_ArrowDown:
SP_ArrowDown:
never executed: case SP_ArrowDown:
0
5364 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"));
0
5365 case
never executed: case SP_FileDialogToParent:
SP_FileDialogToParent:
never executed: case SP_FileDialogToParent:
0
5366 return
never executed: return proxy()->standardPixmap(SP_ArrowUp, option, widget);
proxy()->standardPixmap(SP_ArrowUp, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowUp, option, widget);
0
5367 case
never executed: case SP_FileDialogNewFolder:
SP_FileDialogNewFolder:
never executed: case SP_FileDialogNewFolder:
0
5368 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"));
0
5369 case
never executed: case SP_FileDialogDetailedView:
SP_FileDialogDetailedView:
never executed: case SP_FileDialogDetailedView:
0
5370 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"));
0
5371 case
never executed: case SP_FileDialogInfoView:
SP_FileDialogInfoView:
never executed: case SP_FileDialogInfoView:
0
5372 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"));
0
5373 case
never executed: case SP_FileDialogContentsView:
SP_FileDialogContentsView:
never executed: case SP_FileDialogContentsView:
0
5374 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"));
0
5375 case
never executed: case SP_FileDialogListView:
SP_FileDialogListView:
never executed: case SP_FileDialogListView:
0
5376 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"));
0
5377 case
never executed: case SP_FileDialogBack:
SP_FileDialogBack:
never executed: case SP_FileDialogBack:
0
5378 return
never executed: return proxy()->standardPixmap(SP_ArrowBack, option, widget);
proxy()->standardPixmap(SP_ArrowBack, option, widget);
never executed: return proxy()->standardPixmap(SP_ArrowBack, option, widget);
0
5379 case
never executed: case SP_DriveHDIcon:
SP_DriveHDIcon:
never executed: case SP_DriveHDIcon:
0
5380 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/harddrive-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/harddrive-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/harddrive-16.png"));
0
5381 case
never executed: case SP_TrashIcon:
SP_TrashIcon:
never executed: case SP_TrashIcon:
0
5382 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"));
0
5383 case
never executed: case SP_DriveFDIcon:
SP_DriveFDIcon:
never executed: case SP_DriveFDIcon:
0
5384 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/floppy-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/floppy-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/floppy-16.png"));
0
5385 case
never executed: case SP_DriveNetIcon:
SP_DriveNetIcon:
never executed: case SP_DriveNetIcon:
0
5386 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/networkdrive-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/networkdrive-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/networkdrive-16.png"));
0
5387 case
never executed: case SP_DesktopIcon:
SP_DesktopIcon:
never executed: case SP_DesktopIcon:
0
5388 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/desktop-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/desktop-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/desktop-16.png"));
0
5389 case
never executed: case SP_ComputerIcon:
SP_ComputerIcon:
never executed: case SP_ComputerIcon:
0
5390 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/computer-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/computer-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/computer-16.png"));
0
5391 case
never executed: case SP_DriveCDIcon:
SP_DriveCDIcon:
never executed: case SP_DriveCDIcon:
0
5392 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"));
0
5393 case
never executed: case SP_DriveDVDIcon:
SP_DriveDVDIcon:
never executed: case SP_DriveDVDIcon:
0
5394 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"));
0
5395 case
never executed: case SP_DirHomeIcon:
SP_DirHomeIcon:
never executed: case SP_DirHomeIcon:
0
5396 case
never executed: case SP_DirOpenIcon:
SP_DirOpenIcon:
never executed: case SP_DirOpenIcon:
0
5397 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"));
0
5398 case
never executed: case SP_DirIcon:
SP_DirIcon:
never executed: case SP_DirIcon:
0
5399 case
never executed: case SP_DirClosedIcon:
SP_DirClosedIcon:
never executed: case SP_DirClosedIcon:
0
5400 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"));
0
5401 case
never executed: case SP_DirLinkIcon:
SP_DirLinkIcon:
never executed: case SP_DirLinkIcon:
0
5402 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirlink-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirlink-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirlink-16.png"));
0
5403 case
never executed: case SP_FileIcon:
SP_FileIcon:
never executed: case SP_FileIcon:
0
5404 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"));
0
5405 case
never executed: case SP_FileLinkIcon:
SP_FileLinkIcon:
never executed: case SP_FileLinkIcon:
0
5406 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"));
0
5407 case
never executed: case SP_DialogOkButton:
SP_DialogOkButton:
never executed: case SP_DialogOkButton:
0
5408 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"));
0
5409 case
never executed: case SP_DialogCancelButton:
SP_DialogCancelButton:
never executed: case SP_DialogCancelButton:
0
5410 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"));
0
5411 case
never executed: case SP_DialogHelpButton:
SP_DialogHelpButton:
never executed: case SP_DialogHelpButton:
0
5412 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"));
0
5413 case
never executed: case SP_DialogOpenButton:
SP_DialogOpenButton:
never executed: case SP_DialogOpenButton:
0
5414 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"));
0
5415 case
never executed: case SP_DialogSaveButton:
SP_DialogSaveButton:
never executed: case SP_DialogSaveButton:
0
5416 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"));
0
5417 case
never executed: case SP_DialogCloseButton:
SP_DialogCloseButton:
never executed: case SP_DialogCloseButton:
0
5418 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"));
0
5419 case
never executed: case SP_DialogApplyButton:
SP_DialogApplyButton:
never executed: case SP_DialogApplyButton:
0
5420 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"));
0
5421 case
never executed: case SP_DialogResetButton:
SP_DialogResetButton:
never executed: case SP_DialogResetButton:
0
5422 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"));
0
5423 case
never executed: case SP_DialogDiscardButton:
SP_DialogDiscardButton:
never executed: case SP_DialogDiscardButton:
0
5424 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"));
0
5425 case
never executed: case SP_DialogYesButton:
SP_DialogYesButton:
never executed: case SP_DialogYesButton:
0
5426 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"));
0
5427 case
never executed: case SP_DialogNoButton:
SP_DialogNoButton:
never executed: case SP_DialogNoButton:
0
5428 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"));
0
5429 case
never executed: case SP_BrowserReload:
SP_BrowserReload:
never executed: case SP_BrowserReload:
0
5430 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"));
0
5431 case
never executed: case SP_BrowserStop:
SP_BrowserStop:
never executed: case SP_BrowserStop:
0
5432 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"));
0
5433 case
never executed: case SP_MediaPlay:
SP_MediaPlay:
never executed: case SP_MediaPlay:
0
5434 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"));
0
5435 case
never executed: case SP_MediaPause:
SP_MediaPause:
never executed: case SP_MediaPause:
0
5436 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"));
0
5437 case
never executed: case SP_MediaStop:
SP_MediaStop:
never executed: case SP_MediaStop:
0
5438 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"));
0
5439 case
never executed: case SP_MediaSeekForward:
SP_MediaSeekForward:
never executed: case SP_MediaSeekForward:
0
5440 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"));
0
5441 case
never executed: case SP_MediaSeekBackward:
SP_MediaSeekBackward:
never executed: case SP_MediaSeekBackward:
0
5442 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"));
0
5443 case
never executed: case SP_MediaSkipForward:
SP_MediaSkipForward:
never executed: case SP_MediaSkipForward:
0
5444 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"));
0
5445 case
never executed: case SP_MediaSkipBackward:
SP_MediaSkipBackward:
never executed: case SP_MediaSkipBackward:
0
5446 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"));
0
5447 case
never executed: case SP_MediaVolume:
SP_MediaVolume:
never executed: case SP_MediaVolume:
0
5448 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"));
0
5449 case
never executed: case SP_MediaVolumeMuted:
SP_MediaVolumeMuted:
never executed: case SP_MediaVolumeMuted:
0
5450 return
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"));
QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"));
never executed: return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"));
0
5451 case
never executed: case SP_LineEditClearButton:
SP_LineEditClearButton:
never executed: case SP_LineEditClearButton:
0
5452 return
never executed: return QPixmap(clearText16IconPath());
QPixmap(clearText16IconPath());
never executed: return QPixmap(clearText16IconPath());
0
5453-
5454 default
never executed: default:
:
never executed: default:
0
5455 break;
never executed: break;
0
5456 }-
5457-
5458-
5459 switch (sp) {-
5460 case
never executed: case SP_TitleBarMenuButton:
SP_TitleBarMenuButton:
never executed: case SP_TitleBarMenuButton:
0
5461 return
never executed: return titleBarMenuCachedPixmapFromXPM();
titleBarMenuCachedPixmapFromXPM();
never executed: return titleBarMenuCachedPixmapFromXPM();
0
5462 case
never executed: case SP_TitleBarShadeButton:
SP_TitleBarShadeButton:
never executed: case SP_TitleBarShadeButton:
0
5463 return
never executed: return cachedPixmapFromXPM(qt_shade_xpm);
cachedPixmapFromXPM(qt_shade_xpm);
never executed: return cachedPixmapFromXPM(qt_shade_xpm);
0
5464 case
never executed: case SP_TitleBarUnshadeButton:
SP_TitleBarUnshadeButton:
never executed: case SP_TitleBarUnshadeButton:
0
5465 return
never executed: return cachedPixmapFromXPM(qt_unshade_xpm);
cachedPixmapFromXPM(qt_unshade_xpm);
never executed: return cachedPixmapFromXPM(qt_unshade_xpm);
0
5466 case
never executed: case SP_TitleBarNormalButton:
SP_TitleBarNormalButton:
never executed: case SP_TitleBarNormalButton:
0
5467 return
never executed: return cachedPixmapFromXPM(qt_normalizeup_xpm);
cachedPixmapFromXPM(qt_normalizeup_xpm);
never executed: return cachedPixmapFromXPM(qt_normalizeup_xpm);
0
5468 case
never executed: case SP_TitleBarMinButton:
SP_TitleBarMinButton:
never executed: case SP_TitleBarMinButton:
0
5469 return
never executed: return cachedPixmapFromXPM(qt_minimize_xpm);
cachedPixmapFromXPM(qt_minimize_xpm);
never executed: return cachedPixmapFromXPM(qt_minimize_xpm);
0
5470 case
never executed: case SP_TitleBarMaxButton:
SP_TitleBarMaxButton:
never executed: case SP_TitleBarMaxButton:
0
5471 return
never executed: return cachedPixmapFromXPM(qt_maximize_xpm);
cachedPixmapFromXPM(qt_maximize_xpm);
never executed: return cachedPixmapFromXPM(qt_maximize_xpm);
0
5472 case
never executed: case SP_TitleBarCloseButton:
SP_TitleBarCloseButton:
never executed: case SP_TitleBarCloseButton:
0
5473 return
never executed: return cachedPixmapFromXPM(qt_close_xpm);
cachedPixmapFromXPM(qt_close_xpm);
never executed: return cachedPixmapFromXPM(qt_close_xpm);
0
5474 case
never executed: case SP_TitleBarContextHelpButton:
SP_TitleBarContextHelpButton:
never executed: case SP_TitleBarContextHelpButton:
0
5475 return
never executed: return cachedPixmapFromXPM(qt_help_xpm);
cachedPixmapFromXPM(qt_help_xpm);
never executed: return cachedPixmapFromXPM(qt_help_xpm);
0
5476 case
never executed: case SP_DockWidgetCloseButton:
SP_DockWidgetCloseButton:
never executed: case SP_DockWidgetCloseButton:
0
5477 return
never executed: return cachedPixmapFromXPM(dock_widget_close_xpm);
cachedPixmapFromXPM(dock_widget_close_xpm);
never executed: return cachedPixmapFromXPM(dock_widget_close_xpm);
0
5478 case
never executed: case SP_MessageBoxInformation:
SP_MessageBoxInformation:
never executed: case SP_MessageBoxInformation:
0
5479 return
never executed: return cachedPixmapFromXPM(information_xpm);
cachedPixmapFromXPM(information_xpm);
never executed: return cachedPixmapFromXPM(information_xpm);
0
5480 case
never executed: case SP_MessageBoxWarning:
SP_MessageBoxWarning:
never executed: case SP_MessageBoxWarning:
0
5481 return
never executed: return cachedPixmapFromXPM(warning_xpm);
cachedPixmapFromXPM(warning_xpm);
never executed: return cachedPixmapFromXPM(warning_xpm);
0
5482 case
never executed: case SP_MessageBoxCritical:
SP_MessageBoxCritical:
never executed: case SP_MessageBoxCritical:
0
5483 return
never executed: return cachedPixmapFromXPM(critical_xpm);
cachedPixmapFromXPM(critical_xpm);
never executed: return cachedPixmapFromXPM(critical_xpm);
0
5484 case
never executed: case SP_MessageBoxQuestion:
SP_MessageBoxQuestion:
never executed: case SP_MessageBoxQuestion:
0
5485 return
never executed: return cachedPixmapFromXPM(question_xpm);
cachedPixmapFromXPM(question_xpm);
never executed: return cachedPixmapFromXPM(question_xpm);
0
5486 default
never executed: default:
:
never executed: default:
0
5487 break;
never executed: break;
0
5488 }-
5489-
5490-
5491-
5492 return
never executed: return QPixmap();
QPixmap();
never executed: return QPixmap();
0
5493}-
5494-
5495-
5496-
5497-
5498QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option,-
5499 const QWidget *widget) const-
5500{-
5501 QIcon icon;-
5502 const bool rtl = (option
optionDescription
TRUEnever evaluated
FALSEnever evaluated
&& option->direction == Qt::RightToLeft
option->direct...t::RightToLeftDescription
TRUEnever evaluated
FALSEnever evaluated
) || (!option
!optionDescription
TRUEnever evaluated
FALSEnever evaluated
&& QApplication::isRightToLeft()
QApplication::isRightToLeft()Description
TRUEnever evaluated
FALSEnever evaluated
);
0
5503 if (QApplication::desktopSettingsAware()
QApplication::...ettingsAware()Description
TRUEnever evaluated
FALSEnever evaluated
&& !QIcon::themeName().isEmpty()
!QIcon::themeName().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5504 switch (standardIcon) {-
5505 case
never executed: case SP_DirHomeIcon:
SP_DirHomeIcon:
never executed: case SP_DirHomeIcon:
0
5506 icon = QIcon::fromTheme(QLatin1String("user-home"));-
5507 break;
never executed: break;
0
5508 case
never executed: case SP_MessageBoxInformation:
SP_MessageBoxInformation:
never executed: case SP_MessageBoxInformation:
0
5509 icon = QIcon::fromTheme(QLatin1String("dialog-information"));-
5510 break;
never executed: break;
0
5511 case
never executed: case SP_MessageBoxWarning:
SP_MessageBoxWarning:
never executed: case SP_MessageBoxWarning:
0
5512 icon = QIcon::fromTheme(QLatin1String("dialog-warning"));-
5513 break;
never executed: break;
0
5514 case
never executed: case SP_MessageBoxCritical:
SP_MessageBoxCritical:
never executed: case SP_MessageBoxCritical:
0
5515 icon = QIcon::fromTheme(QLatin1String("dialog-error"));-
5516 break;
never executed: break;
0
5517 case
never executed: case SP_MessageBoxQuestion:
SP_MessageBoxQuestion:
never executed: case SP_MessageBoxQuestion:
0
5518 icon = QIcon::fromTheme(QLatin1String("dialog-question"));-
5519 break;
never executed: break;
0
5520 case
never executed: case SP_DialogOpenButton:
SP_DialogOpenButton:
never executed: case SP_DialogOpenButton:
0
5521 case
never executed: case SP_DirOpenIcon:
SP_DirOpenIcon:
never executed: case SP_DirOpenIcon:
0
5522 icon = QIcon::fromTheme(QLatin1String("folder-open"));-
5523 break;
never executed: break;
0
5524 case
never executed: case SP_DialogSaveButton:
SP_DialogSaveButton:
never executed: case SP_DialogSaveButton:
0
5525 icon = QIcon::fromTheme(QLatin1String("document-save"));-
5526 break;
never executed: break;
0
5527 case
never executed: case SP_DialogApplyButton:
SP_DialogApplyButton:
never executed: case SP_DialogApplyButton:
0
5528 icon = QIcon::fromTheme(QLatin1String("dialog-ok-apply"));-
5529 break;
never executed: break;
0
5530 case
never executed: case SP_DialogYesButton:
SP_DialogYesButton:
never executed: case SP_DialogYesButton:
0
5531 case
never executed: case SP_DialogOkButton:
SP_DialogOkButton:
never executed: case SP_DialogOkButton:
0
5532 icon = QIcon::fromTheme(QLatin1String("dialog-ok"));-
5533 break;
never executed: break;
0
5534 case
never executed: case SP_DialogDiscardButton:
SP_DialogDiscardButton:
never executed: case SP_DialogDiscardButton:
0
5535 icon = QIcon::fromTheme(QLatin1String("edit-delete"));-
5536 break;
never executed: break;
0
5537 case
never executed: case SP_DialogResetButton:
SP_DialogResetButton:
never executed: case SP_DialogResetButton:
0
5538 icon = QIcon::fromTheme(QLatin1String("edit-clear"));-
5539 break;
never executed: break;
0
5540 case
never executed: case SP_DialogHelpButton:
SP_DialogHelpButton:
never executed: case SP_DialogHelpButton:
0
5541 icon = QIcon::fromTheme(QLatin1String("help-contents"));-
5542 break;
never executed: break;
0
5543 case
never executed: case SP_FileIcon:
SP_FileIcon:
never executed: case SP_FileIcon:
0
5544 icon = QIcon::fromTheme(QLatin1String("text-x-generic"));-
5545 break;
never executed: break;
0
5546 case
never executed: case SP_DirClosedIcon:
SP_DirClosedIcon:
never executed: case SP_DirClosedIcon:
0
5547 case
never executed: case SP_DirIcon:
SP_DirIcon:
never executed: case SP_DirIcon:
0
5548 icon = QIcon::fromTheme(QLatin1String("folder"));-
5549 break;
never executed: break;
0
5550 case
never executed: case SP_DriveFDIcon:
SP_DriveFDIcon:
never executed: case SP_DriveFDIcon:
0
5551 icon = QIcon::fromTheme(QLatin1String("floppy_unmount"));-
5552 break;
never executed: break;
0
5553 case
never executed: case SP_ComputerIcon:
SP_ComputerIcon:
never executed: case SP_ComputerIcon:
0
5554 icon = QIcon::fromTheme(QLatin1String("computer"),-
5555 QIcon::fromTheme(QLatin1String("system")));-
5556 break;
never executed: break;
0
5557 case
never executed: case SP_DesktopIcon:
SP_DesktopIcon:
never executed: case SP_DesktopIcon:
0
5558 icon = QIcon::fromTheme(QLatin1String("user-desktop"));-
5559 break;
never executed: break;
0
5560 case
never executed: case SP_TrashIcon:
SP_TrashIcon:
never executed: case SP_TrashIcon:
0
5561 icon = QIcon::fromTheme(QLatin1String("user-trash"));-
5562 break;
never executed: break;
0
5563 case
never executed: case SP_DriveCDIcon:
SP_DriveCDIcon:
never executed: case SP_DriveCDIcon:
0
5564 case
never executed: case SP_DriveDVDIcon:
SP_DriveDVDIcon:
never executed: case SP_DriveDVDIcon:
0
5565 icon = QIcon::fromTheme(QLatin1String("media-optical"));-
5566 break;
never executed: break;
0
5567 case
never executed: case SP_DriveHDIcon:
SP_DriveHDIcon:
never executed: case SP_DriveHDIcon:
0
5568 icon = QIcon::fromTheme(QLatin1String("drive-harddisk"));-
5569 break;
never executed: break;
0
5570 case
never executed: case SP_FileDialogToParent:
SP_FileDialogToParent:
never executed: case SP_FileDialogToParent:
0
5571 icon = QIcon::fromTheme(QLatin1String("go-up"));-
5572 break;
never executed: break;
0
5573 case
never executed: case SP_FileDialogNewFolder:
SP_FileDialogNewFolder:
never executed: case SP_FileDialogNewFolder:
0
5574 icon = QIcon::fromTheme(QLatin1String("folder-new"));-
5575 break;
never executed: break;
0
5576 case
never executed: case SP_ArrowUp:
SP_ArrowUp:
never executed: case SP_ArrowUp:
0
5577 icon = QIcon::fromTheme(QLatin1String("go-up"));-
5578 break;
never executed: break;
0
5579 case
never executed: case SP_ArrowDown:
SP_ArrowDown:
never executed: case SP_ArrowDown:
0
5580 icon = QIcon::fromTheme(QLatin1String("go-down"));-
5581 break;
never executed: break;
0
5582 case
never executed: case SP_ArrowRight:
SP_ArrowRight:
never executed: case SP_ArrowRight:
0
5583 icon = QIcon::fromTheme(QLatin1String("go-next"));-
5584 break;
never executed: break;
0
5585 case
never executed: case SP_ArrowLeft:
SP_ArrowLeft:
never executed: case SP_ArrowLeft:
0
5586 icon = QIcon::fromTheme(QLatin1String("go-previous"));-
5587 break;
never executed: break;
0
5588 case
never executed: case SP_DialogCancelButton:
SP_DialogCancelButton:
never executed: case SP_DialogCancelButton:
0
5589 icon = QIcon::fromTheme(QLatin1String("dialog-cancel"),-
5590 QIcon::fromTheme(QLatin1String("process-stop")));-
5591 break;
never executed: break;
0
5592 case
never executed: case SP_DialogCloseButton:
SP_DialogCloseButton:
never executed: case SP_DialogCloseButton:
0
5593 icon = QIcon::fromTheme(QLatin1String("window-close"));-
5594 break;
never executed: break;
0
5595 case
never executed: case SP_FileDialogDetailedView:
SP_FileDialogDetailedView:
never executed: case SP_FileDialogDetailedView:
0
5596 icon = QIcon::fromTheme(QLatin1String("view-list-details"));-
5597 break;
never executed: break;
0
5598 case
never executed: case SP_FileDialogListView:
SP_FileDialogListView:
never executed: case SP_FileDialogListView:
0
5599 icon = QIcon::fromTheme(QLatin1String("view-list-icons"));-
5600 break;
never executed: break;
0
5601 case
never executed: case SP_BrowserReload:
SP_BrowserReload:
never executed: case SP_BrowserReload:
0
5602 icon = QIcon::fromTheme(QLatin1String("view-refresh"));-
5603 break;
never executed: break;
0
5604 case
never executed: case SP_BrowserStop:
SP_BrowserStop:
never executed: case SP_BrowserStop:
0
5605 icon = QIcon::fromTheme(QLatin1String("process-stop"));-
5606 break;
never executed: break;
0
5607 case
never executed: case SP_MediaPlay:
SP_MediaPlay:
never executed: case SP_MediaPlay:
0
5608 icon = QIcon::fromTheme(QLatin1String("media-playback-start"));-
5609 break;
never executed: break;
0
5610 case
never executed: case SP_MediaPause:
SP_MediaPause:
never executed: case SP_MediaPause:
0
5611 icon = QIcon::fromTheme(QLatin1String("media-playback-pause"));-
5612 break;
never executed: break;
0
5613 case
never executed: case SP_MediaStop:
SP_MediaStop:
never executed: case SP_MediaStop:
0
5614 icon = QIcon::fromTheme(QLatin1String("media-playback-stop"));-
5615 break;
never executed: break;
0
5616 case
never executed: case SP_MediaSeekForward:
SP_MediaSeekForward:
never executed: case SP_MediaSeekForward:
0
5617 icon = QIcon::fromTheme(QLatin1String("media-seek-forward"));-
5618 break;
never executed: break;
0
5619 case
never executed: case SP_MediaSeekBackward:
SP_MediaSeekBackward:
never executed: case SP_MediaSeekBackward:
0
5620 icon = QIcon::fromTheme(QLatin1String("media-seek-backward"));-
5621 break;
never executed: break;
0
5622 case
never executed: case SP_MediaSkipForward:
SP_MediaSkipForward:
never executed: case SP_MediaSkipForward:
0
5623 icon = QIcon::fromTheme(QLatin1String("media-skip-forward"));-
5624 break;
never executed: break;
0
5625 case
never executed: case SP_MediaSkipBackward:
SP_MediaSkipBackward:
never executed: case SP_MediaSkipBackward:
0
5626 icon = QIcon::fromTheme(QLatin1String("media-skip-backward"));-
5627 break;
never executed: break;
0
5628 case
never executed: case SP_MediaVolume:
SP_MediaVolume:
never executed: case SP_MediaVolume:
0
5629 icon = QIcon::fromTheme(QLatin1String("audio-volume-medium"));-
5630 break;
never executed: break;
0
5631 case
never executed: case SP_MediaVolumeMuted:
SP_MediaVolumeMuted:
never executed: case SP_MediaVolumeMuted:
0
5632 icon = QIcon::fromTheme(QLatin1String("audio-volume-muted"));-
5633 break;
never executed: break;
0
5634 case
never executed: case SP_ArrowForward:
SP_ArrowForward:
never executed: case SP_ArrowForward:
0
5635 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5636 return
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
0
5637 return
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
0
5638 case
never executed: case SP_ArrowBack:
SP_ArrowBack:
never executed: case SP_ArrowBack:
0
5639 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5640 return
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
0
5641 return
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
0
5642 case
never executed: case SP_FileLinkIcon:
SP_FileLinkIcon:
never executed: case SP_FileLinkIcon:
0
5643 {-
5644 QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link"));-
5645 if (!linkIcon.isNull()
!linkIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5646 QIcon baseIcon = QCommonStyle::standardIcon(SP_FileIcon, option, widget);-
5647 const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off);-
5648 for (int i = 0 ; i < sizes.size()
i < sizes.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
5649 int size = sizes[i].width();-
5650 QPixmap basePixmap = baseIcon.pixmap(qt_getWindow(widget), QSize(size, size));-
5651 QPixmap linkPixmap = linkIcon.pixmap(qt_getWindow(widget), QSize(size / 2, size / 2));-
5652 QPainter painter(&basePixmap);-
5653 painter.drawPixmap(size/2, size/2, linkPixmap);-
5654 icon.addPixmap(basePixmap);-
5655 }
never executed: end of block
0
5656 }
never executed: end of block
0
5657 }-
5658 break;
never executed: break;
0
5659 case
never executed: case SP_DirLinkIcon:
SP_DirLinkIcon:
never executed: case SP_DirLinkIcon:
0
5660 {-
5661 QIcon linkIcon = QIcon::fromTheme(QLatin1String("emblem-symbolic-link"));-
5662 if (!linkIcon.isNull()
!linkIcon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
5663 QIcon baseIcon = QCommonStyle::standardIcon(SP_DirIcon, option, widget);-
5664 const QList<QSize> sizes = baseIcon.availableSizes(QIcon::Normal, QIcon::Off);-
5665 for (int i = 0 ; i < sizes.size()
i < sizes.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
5666 int size = sizes[i].width();-
5667 QPixmap basePixmap = baseIcon.pixmap(qt_getWindow(widget), QSize(size, size));-
5668 QPixmap linkPixmap = linkIcon.pixmap(qt_getWindow(widget), QSize(size / 2, size / 2));-
5669 QPainter painter(&basePixmap);-
5670 painter.drawPixmap(size/2, size/2, linkPixmap);-
5671 icon.addPixmap(basePixmap);-
5672 }
never executed: end of block
0
5673 }
never executed: end of block
0
5674 }-
5675 break;
never executed: break;
0
5676 default
never executed: default:
:
never executed: default:
0
5677 break;
never executed: break;
0
5678 }-
5679 }-
5680-
5681 if (!icon.isNull()
!icon.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5682 return
never executed: return icon;
icon;
never executed: return icon;
0
5683 switch (standardIcon) {-
5684-
5685 case
never executed: case SP_FileDialogNewFolder:
SP_FileDialogNewFolder:
never executed: case SP_FileDialogNewFolder:
0
5686 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16));-
5687 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32));-
5688 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/newdirectory-128.png"), QSize(128, 128));-
5689 break;
never executed: break;
0
5690 case
never executed: case SP_FileDialogBack:
SP_FileDialogBack:
never executed: case SP_FileDialogBack:
0
5691 return
never executed: return QCommonStyle::standardIcon(SP_ArrowBack, option, widget);
QCommonStyle::standardIcon(SP_ArrowBack, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowBack, option, widget);
0
5692 case
never executed: case SP_FileDialogToParent:
SP_FileDialogToParent:
never executed: case SP_FileDialogToParent:
0
5693 return
never executed: return QCommonStyle::standardIcon(SP_ArrowUp, option, widget);
QCommonStyle::standardIcon(SP_ArrowUp, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowUp, option, widget);
0
5694 case
never executed: case SP_FileDialogDetailedView:
SP_FileDialogDetailedView:
never executed: case SP_FileDialogDetailedView:
0
5695 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-16.png"), QSize(16, 16));-
5696 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-32.png"), QSize(32, 32));-
5697 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewdetailed-128.png"), QSize(128, 128));-
5698 break;
never executed: break;
0
5699 case
never executed: case SP_FileDialogInfoView:
SP_FileDialogInfoView:
never executed: case SP_FileDialogInfoView:
0
5700 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-16.png"), QSize(16, 16));-
5701 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-32.png"), QSize(32, 32));-
5702 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/fileinfo-128.png"), QSize(128, 128));-
5703 break;
never executed: break;
0
5704 case
never executed: case SP_FileDialogContentsView:
SP_FileDialogContentsView:
never executed: case SP_FileDialogContentsView:
0
5705 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-16.png"), QSize(16, 16));-
5706 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-32.png"), QSize(32, 32));-
5707 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filecontents-128.png"), QSize(128, 128));-
5708 break;
never executed: break;
0
5709 case
never executed: case SP_FileDialogListView:
SP_FileDialogListView:
never executed: case SP_FileDialogListView:
0
5710 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-16.png"), QSize(16, 16));-
5711 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-32.png"), QSize(32, 32));-
5712 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/viewlist-128.png"), QSize(128, 128));-
5713 break;
never executed: break;
0
5714 case
never executed: case SP_DialogOkButton:
SP_DialogOkButton:
never executed: case SP_DialogOkButton:
0
5715 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-16.png"), QSize(16, 16));-
5716 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-32.png"), QSize(32, 32));-
5717 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-ok-128.png"), QSize(128, 128));-
5718 break;
never executed: break;
0
5719 case
never executed: case SP_DialogCancelButton:
SP_DialogCancelButton:
never executed: case SP_DialogCancelButton:
0
5720 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-16.png"), QSize(16, 16));-
5721 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-32.png"), QSize(32, 32));-
5722 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-cancel-128.png"), QSize(128, 128));-
5723 break;
never executed: break;
0
5724 case
never executed: case SP_DialogHelpButton:
SP_DialogHelpButton:
never executed: case SP_DialogHelpButton:
0
5725 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-16.png"), QSize(16, 16));-
5726 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-32.png"), QSize(32, 32));-
5727 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-help-128.png"), QSize(128, 128));-
5728 break;
never executed: break;
0
5729 case
never executed: case SP_DialogOpenButton:
SP_DialogOpenButton:
never executed: case SP_DialogOpenButton:
0
5730 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-16.png"), QSize(16, 16));-
5731 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-32.png"), QSize(32, 32));-
5732 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-open-128.png"), QSize(128, 128));-
5733 break;
never executed: break;
0
5734 case
never executed: case SP_DialogSaveButton:
SP_DialogSaveButton:
never executed: case SP_DialogSaveButton:
0
5735 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-16.png"), QSize(16, 16));-
5736 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-32.png"), QSize(32, 32));-
5737 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-save-128.png"), QSize(128, 128));-
5738 break;
never executed: break;
0
5739 case
never executed: case SP_DialogCloseButton:
SP_DialogCloseButton:
never executed: case SP_DialogCloseButton:
0
5740 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-16.png"), QSize(16, 16));-
5741 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-32.png"), QSize(32, 32));-
5742 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-close-128.png"), QSize(128, 128));-
5743 break;
never executed: break;
0
5744 case
never executed: case SP_DialogApplyButton:
SP_DialogApplyButton:
never executed: case SP_DialogApplyButton:
0
5745 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-16.png"), QSize(16, 16));-
5746 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-32.png"), QSize(32, 32));-
5747 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-apply-128.png"), QSize(128, 128));-
5748 break;
never executed: break;
0
5749 case
never executed: case SP_DialogResetButton:
SP_DialogResetButton:
never executed: case SP_DialogResetButton:
0
5750 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-16.png"), QSize(16, 16));-
5751 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-32.png"), QSize(32, 32));-
5752 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-clear-128.png"), QSize(128, 128));-
5753 break;
never executed: break;
0
5754 case
never executed: case SP_DialogDiscardButton:
SP_DialogDiscardButton:
never executed: case SP_DialogDiscardButton:
0
5755 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-16.png"), QSize(16, 16));-
5756 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-32.png"), QSize(32, 32));-
5757 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-delete-128.png"), QSize(128, 128));-
5758 break;
never executed: break;
0
5759 case
never executed: case SP_DialogYesButton:
SP_DialogYesButton:
never executed: case SP_DialogYesButton:
0
5760 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-16.png"), QSize(16, 16));-
5761 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-32.png"), QSize(32, 32));-
5762 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-yes-128.png"), QSize(128, 128));-
5763 break;
never executed: break;
0
5764 case
never executed: case SP_DialogNoButton:
SP_DialogNoButton:
never executed: case SP_DialogNoButton:
0
5765 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-16.png"), QSize(16, 16));-
5766 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-32.png"), QSize(32, 32));-
5767 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/standardbutton-no-128.png"), QSize(128, 128));-
5768 break;
never executed: break;
0
5769 case
never executed: case SP_ArrowForward:
SP_ArrowForward:
never executed: case SP_ArrowForward:
0
5770 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5771 return
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
0
5772 return
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
0
5773 case
never executed: case SP_ArrowBack:
SP_ArrowBack:
never executed: case SP_ArrowBack:
0
5774 if (rtl
rtlDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5775 return
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowRight, option, widget);
0
5776 return
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
never executed: return QCommonStyle::standardIcon(SP_ArrowLeft, option, widget);
0
5777 case
never executed: case SP_ArrowLeft:
SP_ArrowLeft:
never executed: case SP_ArrowLeft:
0
5778 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-16.png"), QSize(16, 16));-
5779 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-32.png"), QSize(32, 32));-
5780 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/left-128.png"), QSize(128, 128));-
5781 break;
never executed: break;
0
5782 case
never executed: case SP_ArrowRight:
SP_ArrowRight:
never executed: case SP_ArrowRight:
0
5783 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-16.png"), QSize(16, 16));-
5784 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-32.png"), QSize(32, 32));-
5785 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/right-128.png"), QSize(128, 128));-
5786 break;
never executed: break;
0
5787 case
never executed: case SP_ArrowUp:
SP_ArrowUp:
never executed: case SP_ArrowUp:
0
5788 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-16.png"), QSize(16, 16));-
5789 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-32.png"), QSize(32, 32));-
5790 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/up-128.png"), QSize(128, 128));-
5791 break;
never executed: break;
0
5792 case
never executed: case SP_ArrowDown:
SP_ArrowDown:
never executed: case SP_ArrowDown:
0
5793 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-16.png"), QSize(16, 16));-
5794 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-32.png"), QSize(32, 32));-
5795 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/down-128.png"), QSize(128, 128));-
5796 break;
never executed: break;
0
5797 case
never executed: case SP_DirHomeIcon:
SP_DirHomeIcon:
never executed: case SP_DirHomeIcon:
0
5798 case
never executed: case SP_DirIcon:
SP_DirIcon:
never executed: case SP_DirIcon:
0
5799 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-16.png"),-
5800 QSize(), QIcon::Normal, QIcon::Off);-
5801 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-16.png"),-
5802 QSize(), QIcon::Normal, QIcon::On);-
5803 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-32.png"),-
5804 QSize(32, 32), QIcon::Normal, QIcon::Off);-
5805 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-32.png"),-
5806 QSize(32, 32), QIcon::Normal, QIcon::On);-
5807 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dirclosed-128.png"),-
5808 QSize(128, 128), QIcon::Normal, QIcon::Off);-
5809 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/diropen-128.png"),-
5810 QSize(128, 128), QIcon::Normal, QIcon::On);-
5811 break;
never executed: break;
0
5812 case
never executed: case SP_DriveCDIcon:
SP_DriveCDIcon:
never executed: case SP_DriveCDIcon:
0
5813 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-16.png"), QSize(16, 16));-
5814 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-32.png"), QSize(32, 32));-
5815 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/cdr-128.png"), QSize(128, 128));-
5816 break;
never executed: break;
0
5817 case
never executed: case SP_DriveDVDIcon:
SP_DriveDVDIcon:
never executed: case SP_DriveDVDIcon:
0
5818 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-16.png"), QSize(16, 16));-
5819 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-32.png"), QSize(32, 32));-
5820 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/dvd-128.png"), QSize(128, 128));-
5821 break;
never executed: break;
0
5822 case
never executed: case SP_FileIcon:
SP_FileIcon:
never executed: case SP_FileIcon:
0
5823 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png"), QSize(16, 16));-
5824 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-32.png"), QSize(32, 32));-
5825 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-128.png"), QSize(128, 128));-
5826 break;
never executed: break;
0
5827 case
never executed: case SP_FileLinkIcon:
SP_FileLinkIcon:
never executed: case SP_FileLinkIcon:
0
5828 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-16.png"), QSize(16, 16));-
5829 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-32.png"), QSize(32, 32));-
5830 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/filelink-128.png"), QSize(128, 128));-
5831 break;
never executed: break;
0
5832 case
never executed: case SP_TrashIcon:
SP_TrashIcon:
never executed: case SP_TrashIcon:
0
5833 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-16.png"), QSize(16, 16));-
5834 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-32.png"), QSize(32, 32));-
5835 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/trash-128.png"), QSize(128, 128));-
5836 break;
never executed: break;
0
5837 case
never executed: case SP_BrowserReload:
SP_BrowserReload:
never executed: case SP_BrowserReload:
0
5838 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-24.png"), QSize(24, 24));-
5839 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/refresh-32.png"), QSize(32, 32));-
5840 break;
never executed: break;
0
5841 case
never executed: case SP_BrowserStop:
SP_BrowserStop:
never executed: case SP_BrowserStop:
0
5842 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-24.png"), QSize(24, 24));-
5843 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/stop-32.png"), QSize(32, 32));-
5844 break;
never executed: break;
0
5845 case
never executed: case SP_MediaPlay:
SP_MediaPlay:
never executed: case SP_MediaPlay:
0
5846 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-16.png"), QSize(16, 16));-
5847 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-play-32.png"), QSize(32, 32));-
5848 break;
never executed: break;
0
5849 case
never executed: case SP_MediaPause:
SP_MediaPause:
never executed: case SP_MediaPause:
0
5850 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-16.png"), QSize(16, 16));-
5851 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-pause-32.png"), QSize(32, 32));-
5852 break;
never executed: break;
0
5853 case
never executed: case SP_MediaStop:
SP_MediaStop:
never executed: case SP_MediaStop:
0
5854 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-16.png"), QSize(16, 16));-
5855 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-stop-32.png"), QSize(32, 32));-
5856 break;
never executed: break;
0
5857 case
never executed: case SP_MediaSeekForward:
SP_MediaSeekForward:
never executed: case SP_MediaSeekForward:
0
5858 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-16.png"), QSize(16, 16));-
5859 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-forward-32.png"), QSize(32, 32));-
5860 break;
never executed: break;
0
5861 case
never executed: case SP_MediaSeekBackward:
SP_MediaSeekBackward:
never executed: case SP_MediaSeekBackward:
0
5862 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-16.png"), QSize(16, 16));-
5863 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-seek-backward-32.png"), QSize(32, 32));-
5864 break;
never executed: break;
0
5865 case
never executed: case SP_MediaSkipForward:
SP_MediaSkipForward:
never executed: case SP_MediaSkipForward:
0
5866 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-16.png"), QSize(16, 16));-
5867 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-forward-32.png"), QSize(32, 32));-
5868 break;
never executed: break;
0
5869 case
never executed: case SP_MediaSkipBackward:
SP_MediaSkipBackward:
never executed: case SP_MediaSkipBackward:
0
5870 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-16.png"), QSize(16, 16));-
5871 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-skip-backward-32.png"), QSize(32, 32));-
5872 break;
never executed: break;
0
5873 case
never executed: case SP_MediaVolume:
SP_MediaVolume:
never executed: case SP_MediaVolume:
0
5874 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-16.png"), QSize(16, 16));-
5875 break;
never executed: break;
0
5876 case
never executed: case SP_MediaVolumeMuted:
SP_MediaVolumeMuted:
never executed: case SP_MediaVolumeMuted:
0
5877 icon.addFile(QLatin1String(":/qt-project.org/styles/commonstyle/images/media-volume-muted-16.png"), QSize(16, 16));-
5878 break;
never executed: break;
0
5879 case
never executed: case SP_TitleBarMenuButton:
SP_TitleBarMenuButton:
never executed: case SP_TitleBarMenuButton:
0
5880-
5881 icon.addPixmap(titleBarMenuCachedPixmapFromXPM());-
5882-
5883 icon.addFile(QLatin1String(":/qt-project.org/qmessagebox/images/qtlogo-64.png"));-
5884 break;
never executed: break;
0
5885-
5886 default
never executed: default:
:
never executed: default:
0
5887 icon.addPixmap(proxy()->standardPixmap(standardIcon, option, widget));-
5888 break;
never executed: break;
0
5889 }-
5890 return
never executed: return icon;
icon;
never executed: return icon;
0
5891}-
5892-
5893static inline uint qt_intensity(uint r, uint g, uint b)-
5894{-
5895-
5896 return
never executed: return (77 * r + 150 * g + 28 * b) / 255;
(77 * r + 150 * g + 28 * b) / 255;
never executed: return (77 * r + 150 * g + 28 * b) / 255;
0
5897}-
5898-
5899-
5900QPixmap QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,-
5901 const QStyleOption *opt) const-
5902{-
5903 switch (iconMode) {-
5904 case
never executed: case QIcon::Disabled:
QIcon::Disabled:
never executed: case QIcon::Disabled:
{
0
5905 QImage im = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);-
5906-
5907-
5908 QColor bg = opt->palette.color(QPalette::Disabled, QPalette::Window);-
5909 int red = bg.red();-
5910 int green = bg.green();-
5911 int blue = bg.blue();-
5912 uchar reds[256], greens[256], blues[256];-
5913 for (int i=0; i<128
i<128Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
5914 reds[i] = uchar((red * (i<<1)) >> 8);-
5915 greens[i] = uchar((green * (i<<1)) >> 8);-
5916 blues[i] = uchar((blue * (i<<1)) >> 8);-
5917 }
never executed: end of block
0
5918 for (int i=0; i<128
i<128Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
5919 reds[i+128] = uchar(qMin(red + (i << 1), 255));-
5920 greens[i+128] = uchar(qMin(green + (i << 1), 255));-
5921 blues[i+128] = uchar(qMin(blue + (i << 1), 255));-
5922 }
never executed: end of block
0
5923-
5924 int intensity = qt_intensity(red, green, blue);-
5925 const int factor = 191;-
5926-
5927-
5928-
5929-
5930 if ((red - factor > green
red - factor > greenDescription
TRUEnever evaluated
FALSEnever evaluated
&& red - factor > blue
red - factor > blueDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5931 || (green - factor > red
green - factor > redDescription
TRUEnever evaluated
FALSEnever evaluated
&& green - factor > blue
green - factor > blueDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
5932 || (blue - factor > red
blue - factor > redDescription
TRUEnever evaluated
FALSEnever evaluated
&& blue - factor > green
blue - factor > greenDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
5933 intensity = qMin(255, intensity + 91);
never executed: intensity = qMin(255, intensity + 91);
0
5934 else if (intensity <= 128
intensity <= 128Description
TRUEnever evaluated
FALSEnever evaluated
)
0
5935 intensity -= 51;
never executed: intensity -= 51;
0
5936-
5937 for (int y=0; y<im.height()
y<im.height()Description
TRUEnever evaluated
FALSEnever evaluated
; ++y) {
0
5938 QRgb *scanLine = (QRgb*)im.scanLine(y);-
5939 for (int x=0; x<im.width()
x<im.width()Description
TRUEnever evaluated
FALSEnever evaluated
; ++x) {
0
5940 QRgb pixel = *scanLine;-
5941-
5942-
5943 uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3));-
5944 *scanLine = qRgba(reds[ci], greens[ci], blues[ci], qAlpha(pixel));-
5945 ++scanLine;-
5946 }
never executed: end of block
0
5947 }
never executed: end of block
0
5948-
5949 return
never executed: return QPixmap::fromImage(im);
QPixmap::fromImage(im);
never executed: return QPixmap::fromImage(im);
0
5950 }-
5951 case
never executed: case QIcon::Selected:
QIcon::Selected:
never executed: case QIcon::Selected:
{
0
5952 QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);-
5953 QColor color = opt->palette.color(QPalette::Normal, QPalette::Highlight);-
5954 color.setAlphaF(qreal(0.3));-
5955 QPainter painter(&img);-
5956 painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);-
5957 painter.fillRect(0, 0, img.width(), img.height(), color);-
5958 painter.end();-
5959 return
never executed: return QPixmap::fromImage(img);
QPixmap::fromImage(img);
never executed: return QPixmap::fromImage(img);
}
0
5960 case
never executed: case QIcon::Active:
QIcon::Active:
never executed: case QIcon::Active:
0
5961 return
never executed: return pixmap;
pixmap;
never executed: return pixmap;
0
5962 default
never executed: default:
:
never executed: default:
0
5963 break;
never executed: break;
0
5964 }-
5965 return
never executed: return pixmap;
pixmap;
never executed: return pixmap;
0
5966}-
5967-
5968-
5969-
5970-
5971int QCommonStyle::layoutSpacing(QSizePolicy::ControlType , QSizePolicy::ControlType ,-
5972 Qt::Orientation , const QStyleOption * ,-
5973 const QWidget * ) const-
5974{-
5975 return
never executed: return -1;
-1;
never executed: return -1;
0
5976}-
5977-
5978-
5979-
5980-
5981void QCommonStyle::polish(QPalette &pal)-
5982{-
5983 QStyle::polish(pal);-
5984}
never executed: end of block
0
5985-
5986-
5987-
5988-
5989void QCommonStyle::polish(QWidget *widget)-
5990{-
5991 QStyle::polish(widget);-
5992}
never executed: end of block
0
5993-
5994-
5995-
5996-
5997void QCommonStyle::unpolish(QWidget *widget)-
5998{-
5999 QStyle::unpolish(widget);-
6000}
never executed: end of block
0
6001-
6002-
6003-
6004-
6005void QCommonStyle::polish(QApplication *app)-
6006{-
6007 QStyle::polish(app);-
6008}
never executed: end of block
0
6009-
6010-
6011-
6012-
6013void QCommonStyle::unpolish(QApplication *application)-
6014{-
6015 const QCommonStylePrivate * const d = d_func();-
6016 d->tabBarcloseButtonIcon = QIcon();-
6017 QStyle::unpolish(application);-
6018}
never executed: end of block
0
6019-
6020-
6021-
6022-
Switch to Source codePreprocessed file

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