widgets/qtoolbarseparator.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7void 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}
never executed: }
0
13 -
14QToolBarSeparator::QToolBarSeparator(QToolBar *parent) -
15 : QWidget(parent), orient(parent->orientation()) -
16{ setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); }
never executed: }
0
17 -
18void QToolBarSeparator::setOrientation(Qt::Orientation orientation) -
19{ -
20 orient = orientation; -
21 update(); -
22}
never executed: }
0
23 -
24Qt::Orientation QToolBarSeparator::orientation() const -
25{ return orient; }
never executed: return orient;
0
26 -
27QSize 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 -
35void 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: }
0
42 -
43 -
44 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial