qtoolbarextension.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/widgets/qtoolbarextension.cpp
Switch to Source codePreprocessed file
LineSourceCount
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}
never executed: end of block
0
15-
16void QToolBarExtension::setOrientation(Qt::Orientation o)-
17{-
18 QStyleOption opt;-
19 opt.init(this);-
20 if (o == Qt::Horizontal
o == Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
21 setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, &opt));-
22 }
never executed: end of block
else {
0
23 setIcon(style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton, &opt));-
24 }
never executed: end of block
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: end of block
0
36-
37-
38QSize QToolBarExtension::sizeHint() const-
39{-
40 int ext = style()->pixelMetric(QStyle::PM_ToolBarExtensionExtent);-
41 return
never executed: return QSize(ext, ext);
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 4.3.0-BETA-master-30-08-2018-4cb69e9