qgraphicslayoutstyleinfo.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7QGraphicsLayoutStyleInfo::QGraphicsLayoutStyleInfo(const QGraphicsLayoutPrivate *layout)-
8 : m_layout(layout), m_style(0)-
9{-
10 m_widget = new QWidget;-
11 if (m_widget
m_widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
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-
16QGraphicsLayoutStyleInfo::~QGraphicsLayoutStyleInfo()-
17{-
18 delete m_widget;-
19}
never executed: end of block
0
20-
21qreal 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: return style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)), orientation, const_cast<QStyleOption*>(&m_styleOption), widget());
style()->combinedLayoutSpacing(QSizePolicy::ControlTypes(int(controls1)), QSizePolicy::ControlTypes(int(controls2)),
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-
30qreal 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: return style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2), orientation, const_cast<QStyleOption*>(&m_styleOption), widget());
style()->layoutSpacing(QSizePolicy::ControlType(control1), QSizePolicy::ControlType(control2),
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-
39qreal QGraphicsLayoutStyleInfo::spacing(Qt::Orientation orientation) const-
40{-
41 ((!(style())) ? qt_assert("style()",__FILE__,86) : qt_noop());-
42 return
never executed: return style()->pixelMetric(orientation == Qt::Horizontal ? QStyle::PM_LayoutHorizontalSpacing : QStyle::PM_LayoutVerticalSpacing);
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-
45qreal QGraphicsLayoutStyleInfo::windowMargin(Qt::Orientation orientation) const-
46{-
47 return
never executed: return style()->pixelMetric(orientation == Qt::Vertical ? QStyle::PM_LayoutBottomMargin : QStyle::PM_LayoutRightMargin, const_cast<QStyleOption*>(&m_styleOption), widget());
style()->pixelMetric(orientation == Qt::Vertical
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-
53QWidget *QGraphicsLayoutStyleInfo::widget() const { return
never executed: return m_widget;
m_widget;
never executed: return m_widget;
}
0
54-
55QStyle *QGraphicsLayoutStyleInfo::style() const-
56{-
57 if (!m_style
!m_styleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
58 ((!(m_layout)) ? qt_assert("m_layout",__FILE__,103) : qt_noop());-
59 QGraphicsItem *item = m_layout->parentItem();-
60 m_style = (item
itemDescription
TRUEnever evaluated
FALSEnever evaluated
&& item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
0
61 }
never executed: end of block
0
62 return
never executed: return m_style;
m_style;
never executed: return m_style;
0
63}-
64-
65-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9