Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickanchors_p_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | class QQuickAnchorLine | - |
5 | { | - |
6 | public: | - |
7 | QQuickAnchorLine() {} | - |
8 | QQuickAnchorLine(QQuickItem *i, QQuickAnchors::Anchor l) : item(i), anchorLine(l) {} executed 6576 times by 30 tests: end of block Executed by:
| 6576 |
9 | QQuickAnchorLine(QQuickItem *i, uint l) | - |
10 | : item(i) | - |
11 | , anchorLine(static_cast<QQuickAnchors::Anchor>(l)) | - |
12 | { ((l < ((QQuickAnchors::BaselineAnchor << 1) - 1)) ? static_cast<void>(0) : qt_assert("l < ((QQuickAnchors::BaselineAnchor << 1) - 1)", __FILE__, 68)); } never executed: end of block | 0 |
13 | - | |
14 | QQuickItem *item = nullptr; | - |
15 | QQuickAnchors::Anchor anchorLine = QQuickAnchors::InvalidAnchor; | - |
16 | }; | - |
17 | - | |
18 | inline bool operator==(const QQuickAnchorLine& a, const QQuickAnchorLine& b) | - |
19 | { | - |
20 | return never executed: a.item == b.item && a.anchorLine == b.anchorLine;return a.item == b.item && a.anchorLine == b.anchorLine; never executed: return a.item == b.item && a.anchorLine == b.anchorLine; | 0 |
21 | } | - |
22 | - | |
23 | class QQuickAnchorsPrivate : public QObjectPrivate, public QQuickItemChangeListener | - |
24 | { | - |
25 | inline QQuickAnchors* q_func() { return static_cast<QQuickAnchors *>(q_ptr); } inline const QQuickAnchors* q_func() const { return static_cast<const QQuickAnchors *>(q_ptr); } friend class QQuickAnchors; | - |
26 | public: | - |
27 | QQuickAnchorsPrivate(QQuickItem *i) | - |
28 | : leftMargin(0) | - |
29 | , rightMargin(0) | - |
30 | , topMargin(0) | - |
31 | , bottomMargin(0) | - |
32 | , margins(0) | - |
33 | , vCenterOffset(0) | - |
34 | , hCenterOffset(0) | - |
35 | , baselineOffset(0) | - |
36 | , item(i) | - |
37 | , fill(nullptr) | - |
38 | , centerIn(nullptr) | - |
39 | , leftAnchorItem(nullptr) | - |
40 | , rightAnchorItem(nullptr) | - |
41 | , topAnchorItem(nullptr) | - |
42 | , bottomAnchorItem(nullptr) | - |
43 | , vCenterAnchorItem(nullptr) | - |
44 | , hCenterAnchorItem(nullptr) | - |
45 | , baselineAnchorItem(nullptr) | - |
46 | , leftAnchorLine(QQuickAnchors::InvalidAnchor) | - |
47 | , leftMarginExplicit(false) | - |
48 | , rightAnchorLine(QQuickAnchors::InvalidAnchor) | - |
49 | , rightMarginExplicit(false) | - |
50 | , topAnchorLine(QQuickAnchors::InvalidAnchor) | - |
51 | , topMarginExplicit(false) | - |
52 | , bottomAnchorLine(QQuickAnchors::InvalidAnchor) | - |
53 | , bottomMarginExplicit(false) | - |
54 | , vCenterAnchorLine(QQuickAnchors::InvalidAnchor) | - |
55 | , updatingMe(false) | - |
56 | , hCenterAnchorLine(QQuickAnchors::InvalidAnchor) | - |
57 | , inDestructor(false) | - |
58 | , baselineAnchorLine(QQuickAnchors::InvalidAnchor) | - |
59 | , centerAligned(true) | - |
60 | , usedAnchors(QQuickAnchors::InvalidAnchor) | - |
61 | , componentComplete(true) | - |
62 | , updatingFill(0) | - |
63 | , updatingCenterIn(0) | - |
64 | , updatingHorizontalAnchor(0) | - |
65 | , updatingVerticalAnchor(0) | - |
66 | { | - |
67 | } executed 12546 times by 84 tests: end of block Executed by:
| 12546 |
68 | - | |
69 | void clearItem(QQuickItem *); | - |
70 | - | |
71 | QQuickGeometryChange calculateDependency(QQuickItem *) const; | - |
72 | void addDepend(QQuickItem *); | - |
73 | void remDepend(QQuickItem *); | - |
74 | bool isItemComplete() const; | - |
75 | - | |
76 | void setItemHeight(qreal); | - |
77 | void setItemWidth(qreal); | - |
78 | void setItemX(qreal); | - |
79 | void setItemY(qreal); | - |
80 | void setItemPos(const QPointF &); | - |
81 | void setItemSize(const QSizeF &); | - |
82 | - | |
83 | void update(); | - |
84 | void updateOnComplete(); | - |
85 | void updateMe(); | - |
86 | - | |
87 | - | |
88 | void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; | - |
89 | QQuickAnchorsPrivate *anchorPrivate() override { return executed 24672 times by 71 tests: this;return this; Executed by:
executed 24672 times by 71 tests: }return this; Executed by:
| 24672 |
90 | - | |
91 | bool checkHValid() const; | - |
92 | bool checkVValid() const; | - |
93 | bool checkHAnchorValid(QQuickAnchorLine anchor) const; | - |
94 | bool checkVAnchorValid(QQuickAnchorLine anchor) const; | - |
95 | bool calcStretch(QQuickItem *edge1Item, QQuickAnchors::Anchor edge1Line, | - |
96 | QQuickItem *edge2Item, QQuickAnchors::Anchor edge2Line, | - |
97 | qreal offset1, qreal offset2, QQuickAnchors::Anchor line, qreal &stretch) const; | - |
98 | - | |
99 | bool isMirrored() const; | - |
100 | void updateHorizontalAnchors(); | - |
101 | void updateVerticalAnchors(); | - |
102 | void fillChanged(); | - |
103 | void centerInChanged(); | - |
104 | - | |
105 | qreal leftMargin; | - |
106 | qreal rightMargin; | - |
107 | qreal topMargin; | - |
108 | qreal bottomMargin; | - |
109 | qreal margins; | - |
110 | qreal vCenterOffset; | - |
111 | qreal hCenterOffset; | - |
112 | qreal baselineOffset; | - |
113 | - | |
114 | QQuickItem *item; | - |
115 | - | |
116 | QQuickItem *fill; | - |
117 | QQuickItem *centerIn; | - |
118 | - | |
119 | QQuickItem *leftAnchorItem; | - |
120 | QQuickItem *rightAnchorItem; | - |
121 | QQuickItem *topAnchorItem; | - |
122 | QQuickItem *bottomAnchorItem; | - |
123 | QQuickItem *vCenterAnchorItem; | - |
124 | QQuickItem *hCenterAnchorItem; | - |
125 | QQuickItem *baselineAnchorItem; | - |
126 | - | |
127 | - | |
128 | - | |
129 | - | |
130 | QQuickAnchors::Anchor leftAnchorLine : 7; | - |
131 | uint leftMarginExplicit : 1; | - |
132 | QQuickAnchors::Anchor rightAnchorLine : 7; | - |
133 | uint rightMarginExplicit : 1; | - |
134 | QQuickAnchors::Anchor topAnchorLine : 7; | - |
135 | uint topMarginExplicit : 1; | - |
136 | QQuickAnchors::Anchor bottomAnchorLine : 7; | - |
137 | uint bottomMarginExplicit : 1; | - |
138 | - | |
139 | QQuickAnchors::Anchor vCenterAnchorLine : 7; | - |
140 | uint updatingMe : 1; | - |
141 | QQuickAnchors::Anchor hCenterAnchorLine : 7; | - |
142 | uint inDestructor : 1; | - |
143 | QQuickAnchors::Anchor baselineAnchorLine : 7; | - |
144 | uint centerAligned : 1; | - |
145 | uint usedAnchors : 7; | - |
146 | uint componentComplete : 1; | - |
147 | - | |
148 | - | |
149 | - | |
150 | qint8 updatingFill; | - |
151 | qint8 updatingCenterIn; | - |
152 | qint8 updatingHorizontalAnchor; | - |
153 | qint8 updatingVerticalAnchor; | - |
154 | - | |
155 | - | |
156 | static inline QQuickAnchorsPrivate *get(QQuickAnchors *o) { | - |
157 | return executed 76950 times by 80 tests: static_cast<QQuickAnchorsPrivate *>(QObjectPrivate::get(o));return static_cast<QQuickAnchorsPrivate *>(QObjectPrivate::get(o)); Executed by:
executed 76950 times by 80 tests: return static_cast<QQuickAnchorsPrivate *>(QObjectPrivate::get(o)); Executed by:
| 76950 |
158 | } | - |
159 | }; | - |
160 | - | |
161 | - | |
162 | - | |
163 | template <> struct QMetaTypeId< QQuickAnchorLine > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickAnchorLine >("QQuickAnchorLine", reinterpret_cast< QQuickAnchorLine *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
Switch to Source code | Preprocessed file |