Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/widgets/qtoolbarseparator.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | void QToolBarSeparator::initStyleOption(QStyleOption *option) const | - | ||||||
8 | { | - | ||||||
9 | option->initFrom(this); | - | ||||||
10 | if (orientation() == Qt::Horizontal
| 0 | ||||||
11 | option->state |= QStyle::State_Horizontal; never executed: option->state |= QStyle::State_Horizontal; | 0 | ||||||
12 | } never executed: end of block | 0 | ||||||
13 | - | |||||||
14 | QToolBarSeparator::QToolBarSeparator(QToolBar *parent) | - | ||||||
15 | : QWidget(parent), orient(parent->orientation()) | - | ||||||
16 | { setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); } never executed: end of block | 0 | ||||||
17 | - | |||||||
18 | void QToolBarSeparator::setOrientation(Qt::Orientation orientation) | - | ||||||
19 | { | - | ||||||
20 | orient = orientation; | - | ||||||
21 | update(); | - | ||||||
22 | } never executed: end of block | 0 | ||||||
23 | - | |||||||
24 | Qt::Orientation QToolBarSeparator::orientation() const | - | ||||||
25 | { return never executed: orient;return orient; never executed: }return orient; | 0 | ||||||
26 | - | |||||||
27 | QSize QToolBarSeparator::sizeHint() const | - | ||||||
28 | { | - | ||||||
29 | QStyleOption opt; | - | ||||||
30 | initStyleOption(&opt); | - | ||||||
31 | const int extent = style()->pixelMetric(QStyle::PM_ToolBarSeparatorExtent, &opt, parentWidget()); | - | ||||||
32 | return never executed: QSize(extent, extent);return QSize(extent, extent); never executed: return QSize(extent, extent); | 0 | ||||||
33 | } | - | ||||||
34 | - | |||||||
35 | void QToolBarSeparator::paintEvent(QPaintEvent *) | - | ||||||
36 | { | - | ||||||
37 | QPainter p(this); | - | ||||||
38 | QStyleOption opt; | - | ||||||
39 | initStyleOption(&opt); | - | ||||||
40 | style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, &p, parentWidget()); | - | ||||||
41 | } never executed: end of block | 0 | ||||||
42 | - | |||||||
43 | - | |||||||
44 | - | |||||||
Switch to Source code | Preprocessed file |