| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/widgets/qtoolbarextension.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | QToolBarExtension::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 | - | |||||||
| 16 | void QToolBarExtension::setOrientation(Qt::Orientation o) | - | ||||||
| 17 | { | - | ||||||
| 18 | QStyleOption opt; | - | ||||||
| 19 | opt.init(this); | - | ||||||
| 20 | if (o == Qt::Horizontal
| 0 | ||||||
| 21 | setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, &opt)); | - | ||||||
| 22 | } never executed: else {end of block | 0 | ||||||
| 23 | setIcon(style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton, &opt)); | - | ||||||
| 24 | } never executed: end of block | 0 | ||||||
| 25 | } | - | ||||||
| 26 | - | |||||||
| 27 | void 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 | - | |||||||
| 38 | QSize QToolBarExtension::sizeHint() const | - | ||||||
| 39 | { | - | ||||||
| 40 | int ext = style()->pixelMetric(QStyle::PM_ToolBarExtensionExtent); | - | ||||||
| 41 | return never executed: QSize(ext, ext);return QSize(ext, ext);never executed: return QSize(ext, ext); | 0 | ||||||
| 42 | } | - | ||||||
| 43 | - | |||||||
| 44 | - | |||||||
| 45 | - | |||||||
| Switch to Source code | Preprocessed file |