Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | void QToolBarSeparator::initStyleOption(QStyleOption *option) const | - |
8 | { | - |
9 | option->initFrom(this); | - |
10 | if (orientation() == Qt::Horizontal) never evaluated: orientation() == Qt::Horizontal | 0 |
11 | option->state |= QStyle::State_Horizontal; never executed: option->state |= QStyle::State_Horizontal; | 0 |
12 | } | 0 |
13 | | - |
14 | QToolBarSeparator::QToolBarSeparator(QToolBar *parent) | - |
15 | : QWidget(parent), orient(parent->orientation()) | - |
16 | { setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); } | 0 |
17 | | - |
18 | void QToolBarSeparator::setOrientation(Qt::Orientation orientation) | - |
19 | { | - |
20 | orient = orientation; | - |
21 | update(); | - |
22 | } | 0 |
23 | | - |
24 | Qt::Orientation QToolBarSeparator::orientation() const | - |
25 | { 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 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 | } | 0 |
42 | | - |
43 | | - |
44 | | - |
| | |