widgets/qtoolbarextension.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6QToolBarExtension::QToolBarExtension(QWidget *parent) -
7 : QToolButton(parent) -
8{ -
9 setObjectName(QLatin1String("qt_toolbar_ext_button")); -
10 setAutoRaise(true); -
11 setOrientation(Qt::Horizontal); -
12 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); -
13 setCheckable(true); -
14}
executed: }
Execution Count:16
16
15 -
16void QToolBarExtension::setOrientation(Qt::Orientation o) -
17{ -
18 QStyleOption opt; -
19 opt.init(this); -
20 if (o == Qt::Horizontal) {
partially evaluated: o == Qt::Horizontal
TRUEFALSE
yes
Evaluation Count:16
no
Evaluation Count:0
0-16
21 setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, &opt)); -
22 } else {
executed: }
Execution Count:16
16
23 setIcon(style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton, &opt)); -
24 }
never executed: }
0
25} -
26 -
27void QToolBarExtension::paintEvent(QPaintEvent *) -
28{ -
29 QStylePainter p(this); -
30 QStyleOptionToolButton opt; -
31 initStyleOption(&opt); -
32 -
33 opt.features &= ~QStyleOptionToolButton::HasMenu; -
34 p.drawComplexControl(QStyle::CC_ToolButton, opt); -
35}
never executed: }
0
36 -
37 -
38QSize QToolBarExtension::sizeHint() const -
39{ -
40 int ext = style()->pixelMetric(QStyle::PM_ToolBarExtensionExtent); -
41 return QSize(ext, ext);
never executed: return QSize(ext, ext);
0
42} -
43 -
44 -
45 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial