Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | QGraphicsLayoutStyleInfo::QGraphicsLayoutStyleInfo(const QGraphicsLayoutPrivate *layout) | - | ||||||||||||
8 | : m_layout(layout), m_style(0) | - | ||||||||||||
9 | { | - | ||||||||||||
10 | m_widget = new QWidget; | - | ||||||||||||
11 | if (m_widget
| 0 | ||||||||||||
12 | m_styleOption.initFrom(m_widget); never executed: m_styleOption.initFrom(m_widget); | 0 | ||||||||||||
13 | m_isWindow = m_styleOption.state & QStyle::State_Window; | - | ||||||||||||
14 | } never executed: end of block | 0 | ||||||||||||
15 | - | |||||||||||||
16 | QGraphicsLayoutStyleInfo::~QGraphicsLayoutStyleInfo() | - | ||||||||||||
17 | { | - | ||||||||||||
18 | delete m_widget; | - | ||||||||||||
19 | } never executed: end of block | 0 | ||||||||||||
20 | - | |||||||||||||
21 | qreal QGraphicsLayoutStyleInfo::combinedLayoutSpacing(QLayoutPolicy::ControlTypes controls1, | - | ||||||||||||
22 | QLayoutPolicy::ControlTypes controls2, | - | ||||||||||||
23 | Qt::Orientation orientation) const | - | ||||||||||||
24 | { | - | ||||||||||||
25 | ((!(style())) ? qt_assert("style()",__FILE__,70) : qt_noop()); | - | ||||||||||||
26 | return never executed: style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)),return style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
27 | orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
28 | } | - | ||||||||||||
29 | - | |||||||||||||
30 | qreal QGraphicsLayoutStyleInfo::perItemSpacing(QLayoutPolicy::ControlType control1, | - | ||||||||||||
31 | QLayoutPolicy::ControlType control2, | - | ||||||||||||
32 | Qt::Orientation orientation) const | - | ||||||||||||
33 | { | - | ||||||||||||
34 | ((!(style())) ? qt_assert("style()",__FILE__,79) : qt_noop()); | - | ||||||||||||
35 | return never executed: style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2),return style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
36 | orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2), orientation, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
37 | } | - | ||||||||||||
38 | - | |||||||||||||
39 | qreal QGraphicsLayoutStyleInfo::spacing(Qt::Orientation orientation) const | - | ||||||||||||
40 | { | - | ||||||||||||
41 | ((!(style())) ? qt_assert("style()",__FILE__,86) : qt_noop()); | - | ||||||||||||
42 | return never executed: style()->pixelMetric(orientation == Qt::Horizontal ? QStyle::PM_LayoutHorizontalSpacing : QStyle::PM_LayoutVerticalSpacing);return style()->pixelMetric(orientation == Qt::Horizontal ? QStyle::PM_LayoutHorizontalSpacing : QStyle::PM_LayoutVerticalSpacing); never executed: return style()->pixelMetric(orientation == Qt::Horizontal ? QStyle::PM_LayoutHorizontalSpacing : QStyle::PM_LayoutVerticalSpacing); | 0 | ||||||||||||
43 | } | - | ||||||||||||
44 | - | |||||||||||||
45 | qreal QGraphicsLayoutStyleInfo::windowMargin(Qt::Orientation orientation) const | - | ||||||||||||
46 | { | - | ||||||||||||
47 | return never executed: style()->pixelMetric(orientation == Qt::Verticalreturn style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
48 | ? QStyle::PM_LayoutBottomMargin never executed: return style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
49 | : QStyle::PM_LayoutRightMargin, never executed: return style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
50 | const_cast<QStyleOption*>(&m_styleOption), widget()); never executed: return style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget()); | 0 | ||||||||||||
51 | } | - | ||||||||||||
52 | - | |||||||||||||
53 | QWidget *QGraphicsLayoutStyleInfo::widget() const { return never executed: m_widget;return m_widget; never executed: }return m_widget; | 0 | ||||||||||||
54 | - | |||||||||||||
55 | QStyle *QGraphicsLayoutStyleInfo::style() const | - | ||||||||||||
56 | { | - | ||||||||||||
57 | if (!m_style
| 0 | ||||||||||||
58 | ((!(m_layout)) ? qt_assert("m_layout",__FILE__,103) : qt_noop()); | - | ||||||||||||
59 | QGraphicsItem *item = m_layout->parentItem(); | - | ||||||||||||
60 | m_style = (item
| 0 | ||||||||||||
61 | } never executed: end of block | 0 | ||||||||||||
62 | return never executed: m_style;return m_style; never executed: return m_style; | 0 | ||||||||||||
63 | } | - | ||||||||||||
64 | - | |||||||||||||
65 | - | |||||||||||||
Switch to Source code | Preprocessed file |