qgraphicslayoutitem.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/graphicsview/qgraphicslayoutitem.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static void combineSize(QSizeF &result, const QSizeF &size)-
8{-
9 if (result.width() < 0
result.width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
10 result.setWidth(size.width());
never executed: result.setWidth(size.width());
0
11 if (result.height() < 0
result.height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
12 result.setHeight(size.height());
never executed: result.setHeight(size.height());
0
13}
never executed: end of block
0
14-
15static void boundSize(QSizeF &result, const QSizeF &size)-
16{-
17 if (size.width() >= 0
size.width() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& size.width() < result.width()
size.width() < result.width()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
18 result.setWidth(size.width());
never executed: result.setWidth(size.width());
0
19 if (size.height() >= 0
size.height() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& size.height() < result.height()
size.height() ...esult.height()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
20 result.setHeight(size.height());
never executed: result.setHeight(size.height());
0
21}
never executed: end of block
0
22-
23static void expandSize(QSizeF &result, const QSizeF &size)-
24{-
25 if (size.width() >= 0
size.width() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& size.width() > result.width()
size.width() > result.width()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
26 result.setWidth(size.width());
never executed: result.setWidth(size.width());
0
27 if (size.height() >= 0
size.height() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& size.height() > result.height()
size.height() ...esult.height()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
28 result.setHeight(size.height());
never executed: result.setHeight(size.height());
0
29}
never executed: end of block
0
30-
31static void normalizeHints(qreal &minimum, qreal &preferred, qreal &maximum, qreal &descent)-
32{-
33 if (minimum >= 0
minimum >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& maximum >= 0
maximum >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& minimum > maximum
minimum > maximumDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
34 minimum = maximum;
never executed: minimum = maximum;
0
35-
36 if (preferred >= 0
preferred >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
37 if (minimum >= 0
minimum >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& preferred < minimum
preferred < minimumDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
38 preferred = minimum;-
39 }
never executed: end of block
else if (maximum >= 0
maximum >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& preferred > maximum
preferred > maximumDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
40 preferred = maximum;-
41 }
never executed: end of block
0
42 }
never executed: end of block
0
43-
44 if (minimum >= 0
minimum >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& descent > minimum
descent > minimumDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
45 descent = minimum;
never executed: descent = minimum;
0
46}
never executed: end of block
0
47-
48-
49-
50-
51QGraphicsLayoutItemPrivate::QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *par, bool layout)-
52 : parent(par), userSizeHints(0), isLayout(layout), ownedByLayout(false), graphicsItem(0)-
53{-
54}
never executed: end of block
0
55-
56-
57-
58-
59QGraphicsLayoutItemPrivate::~QGraphicsLayoutItemPrivate()-
60{-
61-
62 delete[] userSizeHints;-
63}
never executed: end of block
0
64-
65-
66-
67-
68void QGraphicsLayoutItemPrivate::init()-
69{-
70 sizeHintCacheDirty = true;-
71 sizeHintWithConstraintCacheDirty = true;-
72}
never executed: end of block
0
73-
74-
75-
76-
77QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint) const-
78{-
79 const QGraphicsLayoutItem * const q = q_func();-
80 QSizeF *sizeHintCache;-
81 const bool hasConstraint = constraint.width() >= 0
constraint.width() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| constraint.height() >= 0
constraint.height() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
;
0
82 if (hasConstraint
hasConstraintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
83 if (!sizeHintWithConstraintCacheDirty
!sizeHintWithC...aintCacheDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
&& constraint == cachedConstraint
constraint == cachedConstraintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
84 return
never executed: return cachedSizeHintsWithConstraints;
cachedSizeHintsWithConstraints;
never executed: return cachedSizeHintsWithConstraints;
0
85 sizeHintCache = cachedSizeHintsWithConstraints;-
86 }
never executed: end of block
else {
0
87 if (!sizeHintCacheDirty
!sizeHintCacheDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
88 return
never executed: return cachedSizeHints;
cachedSizeHints;
never executed: return cachedSizeHints;
0
89 sizeHintCache = cachedSizeHints;-
90 }
never executed: end of block
0
91-
92 for (int i = 0; i < Qt::NSizeHints
i < Qt::NSizeHintsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
93 sizeHintCache[i] = constraint;-
94 if (userSizeHints
userSizeHintsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
95 combineSize(sizeHintCache[i], userSizeHints[i]);
never executed: combineSize(sizeHintCache[i], userSizeHints[i]);
0
96 }
never executed: end of block
0
97-
98 QSizeF &minS = sizeHintCache[Qt::MinimumSize];-
99 QSizeF &prefS = sizeHintCache[Qt::PreferredSize];-
100 QSizeF &maxS = sizeHintCache[Qt::MaximumSize];-
101 QSizeF &descentS = sizeHintCache[Qt::MinimumDescent];-
102-
103 normalizeHints(minS.rwidth(), prefS.rwidth(), maxS.rwidth(), descentS.rwidth());-
104 normalizeHints(minS.rheight(), prefS.rheight(), maxS.rheight(), descentS.rheight());-
105-
106-
107-
108-
109 do { if ((
(maxS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
maxS).width() < 0
(maxS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(maxS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
maxS).height() < 0
(maxS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) combineSize((maxS), (q->sizeHint(Qt::MaximumSize, maxS)));
never executed: combineSize((maxS), (q->sizeHint(Qt::MaximumSize, maxS)));
} while (false);
0
110 combineSize(maxS, QSizeF(((1<<24)-1), ((1<<24)-1)));-
111 expandSize(maxS, prefS);-
112 expandSize(maxS, minS);-
113 boundSize(maxS, QSizeF(((1<<24)-1), ((1<<24)-1)));-
114-
115 do { if ((
(minS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
minS).width() < 0
(minS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(minS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
minS).height() < 0
(minS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) combineSize((minS), (q->sizeHint(Qt::MinimumSize, minS)));
never executed: combineSize((minS), (q->sizeHint(Qt::MinimumSize, minS)));
} while (false);
0
116 expandSize(minS, QSizeF(0, 0));-
117 boundSize(minS, prefS);-
118 boundSize(minS, maxS);-
119-
120 do { if ((
(prefS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
prefS).width() < 0
(prefS).width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(prefS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
prefS).height() < 0
(prefS).height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) combineSize((prefS), (q->sizeHint(Qt::PreferredSize, prefS)));
never executed: combineSize((prefS), (q->sizeHint(Qt::PreferredSize, prefS)));
} while (false);
0
121 expandSize(prefS, minS);-
122 boundSize(prefS, maxS);-
123-
124-
125-
126-
127 if (hasConstraint
hasConstraintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
128 cachedConstraint = constraint;-
129 sizeHintWithConstraintCacheDirty = false;-
130 }
never executed: end of block
else {
0
131 sizeHintCacheDirty = false;-
132 }
never executed: end of block
0
133 return
never executed: return sizeHintCache;
sizeHintCache;
never executed: return sizeHintCache;
0
134}-
135QGraphicsItem *QGraphicsLayoutItemPrivate::parentItem() const-
136{-
137 const QGraphicsLayoutItem * const q = q_func();-
138-
139 const QGraphicsLayoutItem *parent = q;-
140 while (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& parent->isLayout()
parent->isLayout()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
141 parent = parent->parentLayoutItem();-
142 }
never executed: end of block
0
143 return
never executed: return parent ? parent->graphicsItem() : 0;
parent ? parent->graphicsItem() : 0;
never executed: return parent ? parent->graphicsItem() : 0;
0
144}-
145-
146-
147-
148-
149-
150-
151-
152void QGraphicsLayoutItemPrivate::ensureUserSizeHints()-
153{-
154 if (!userSizeHints
!userSizeHintsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
155 userSizeHints = new QSizeF[Qt::NSizeHints];
never executed: userSizeHints = new QSizeF[Qt::NSizeHints];
0
156}
never executed: end of block
0
157-
158-
159-
160-
161-
162-
163void QGraphicsLayoutItemPrivate::setSize(Qt::SizeHint which, const QSizeF &size)-
164{-
165 QGraphicsLayoutItem * const q = q_func();-
166-
167 if (userSizeHints
userSizeHintsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
168 if (size == userSizeHints[which]
size == userSizeHints[which]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
169 return;
never executed: return;
0
170 }
never executed: end of block
else if (size.width() < 0
size.width() < 0Description
TRUEnever evaluated
FALSEnever evaluated
&& size.height() < 0
size.height() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
171 return;
never executed: return;
0
172 }-
173-
174 ensureUserSizeHints();-
175 userSizeHints[which] = size;-
176 q->updateGeometry();-
177}
never executed: end of block
0
178-
179-
180-
181-
182-
183-
184void QGraphicsLayoutItemPrivate::setSizeComponent(-
185 Qt::SizeHint which, SizeComponent component, qreal value)-
186{-
187 QGraphicsLayoutItem * const q = q_func();-
188 ensureUserSizeHints();-
189 qreal &userValue = (
(component == Width)Description
TRUEnever evaluated
FALSEnever evaluated
component == Width)
(component == Width)Description
TRUEnever evaluated
FALSEnever evaluated
0
190 ? userSizeHints[which].rwidth()-
191 : userSizeHints[which].rheight();-
192 if (value == userValue
value == userValueDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
193 return;
never executed: return;
0
194 userValue = value;-
195 q->updateGeometry();-
196}
never executed: end of block
0
197-
198-
199bool QGraphicsLayoutItemPrivate::hasHeightForWidth() const-
200{-
201 const QGraphicsLayoutItem * const q = q_func();-
202 if (isLayout
isLayoutDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
203 const QGraphicsLayout *l = static_cast<const QGraphicsLayout *>(q);-
204 for (int i = l->count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
205 if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasHeightForWidth()
QGraphicsLayou...ightForWidth()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
206 return
never executed: return true;
true;
never executed: return true;
0
207 }
never executed: end of block
0
208 }
never executed: end of block
else if (QGraphicsItem *item = q->graphicsItem()
QGraphicsItem ...graphicsItem()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
209 if (item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
210 QGraphicsWidget *w = static_cast<QGraphicsWidget *>(item);-
211 if (w->layout()
w->layout()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
212 return
never executed: return QGraphicsLayoutItemPrivate::get(w->layout())->hasHeightForWidth();
QGraphicsLayoutItemPrivate::get(w->layout())->hasHeightForWidth();
never executed: return QGraphicsLayoutItemPrivate::get(w->layout())->hasHeightForWidth();
0
213 }-
214 }
never executed: end of block
0
215 }
never executed: end of block
0
216 return
never executed: return q->sizePolicy().hasHeightForWidth();
q->sizePolicy().hasHeightForWidth();
never executed: return q->sizePolicy().hasHeightForWidth();
0
217}-
218-
219bool QGraphicsLayoutItemPrivate::hasWidthForHeight() const-
220{-
221 const QGraphicsLayoutItem * const q = q_func();-
222 if (isLayout
isLayoutDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
223 const QGraphicsLayout *l = static_cast<const QGraphicsLayout *>(q);-
224 for (int i = l->count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
225 if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasWidthForHeight()
QGraphicsLayou...dthForHeight()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
226 return
never executed: return true;
true;
never executed: return true;
0
227 }
never executed: end of block
0
228 }
never executed: end of block
else if (QGraphicsItem *item = q->graphicsItem()
QGraphicsItem ...graphicsItem()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
229 if (item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
230 QGraphicsWidget *w = static_cast<QGraphicsWidget *>(item);-
231 if (w->layout()
w->layout()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
232 return
never executed: return QGraphicsLayoutItemPrivate::get(w->layout())->hasWidthForHeight();
QGraphicsLayoutItemPrivate::get(w->layout())->hasWidthForHeight();
never executed: return QGraphicsLayoutItemPrivate::get(w->layout())->hasWidthForHeight();
0
233 }-
234 }
never executed: end of block
0
235 }
never executed: end of block
0
236 return
never executed: return q->sizePolicy().hasWidthForHeight();
q->sizePolicy().hasWidthForHeight();
never executed: return q->sizePolicy().hasWidthForHeight();
0
237}-
238QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLayout)-
239 : d_ptr(new QGraphicsLayoutItemPrivate(parent, isLayout))-
240{-
241 QGraphicsLayoutItemPrivate * const d = d_func();-
242 d->init();-
243 d->sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);-
244 d->q_ptr = this;-
245}
never executed: end of block
0
246-
247-
248-
249-
250QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItemPrivate &dd)-
251 : d_ptr(&dd)-
252{-
253 QGraphicsLayoutItemPrivate * const d = d_func();-
254 d->init();-
255 d->q_ptr = this;-
256}
never executed: end of block
0
257-
258-
259-
260-
261QGraphicsLayoutItem::~QGraphicsLayoutItem()-
262{-
263 QGraphicsLayoutItem *parentLI = parentLayoutItem();-
264 if (parentLI
parentLIDescription
TRUEnever evaluated
FALSEnever evaluated
&& parentLI->isLayout()
parentLI->isLayout()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
265 QGraphicsLayout *lay = static_cast<QGraphicsLayout*>(parentLI);-
266-
267 for (int i = lay->count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
268 if (lay->itemAt(i) == this
lay->itemAt(i) == thisDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
269 lay->removeAt(i);-
270 break;
never executed: break;
0
271 }-
272 }
never executed: end of block
0
273 }
never executed: end of block
0
274}
never executed: end of block
0
275void QGraphicsLayoutItem::setSizePolicy(const QSizePolicy &policy)-
276{-
277 QGraphicsLayoutItemPrivate * const d = d_func();-
278 if (d->sizePolicy == policy
d->sizePolicy == policyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
279 return;
never executed: return;
0
280 d->sizePolicy = policy;-
281 updateGeometry();-
282}
never executed: end of block
0
283void QGraphicsLayoutItem::setSizePolicy(QSizePolicy::Policy hPolicy,-
284 QSizePolicy::Policy vPolicy,-
285 QSizePolicy::ControlType controlType)-
286{-
287 setSizePolicy(QSizePolicy(hPolicy, vPolicy, controlType));-
288}
never executed: end of block
0
289-
290-
291-
292-
293-
294-
295QSizePolicy QGraphicsLayoutItem::sizePolicy() const-
296{-
297 const QGraphicsLayoutItemPrivate * const d = d_func();-
298 return
never executed: return d->sizePolicy;
d->sizePolicy;
never executed: return d->sizePolicy;
0
299}-
300void QGraphicsLayoutItem::setMinimumSize(const QSizeF &size)-
301{-
302 d_ptr->setSize(Qt::MinimumSize, size);-
303}
never executed: end of block
0
304QSizeF QGraphicsLayoutItem::minimumSize() const-
305{-
306 return
never executed: return effectiveSizeHint(Qt::MinimumSize);
effectiveSizeHint(Qt::MinimumSize);
never executed: return effectiveSizeHint(Qt::MinimumSize);
0
307}-
308-
309-
310-
311-
312-
313-
314void QGraphicsLayoutItem::setMinimumWidth(qreal width)-
315{-
316 d_ptr->setSizeComponent(Qt::MinimumSize, d_ptr->Width, width);-
317}
never executed: end of block
0
318-
319-
320-
321-
322-
323-
324void QGraphicsLayoutItem::setMinimumHeight(qreal height)-
325{-
326 d_ptr->setSizeComponent(Qt::MinimumSize, d_ptr->Height, height);-
327}
never executed: end of block
0
328void QGraphicsLayoutItem::setPreferredSize(const QSizeF &size)-
329{-
330 d_ptr->setSize(Qt::PreferredSize, size);-
331}
never executed: end of block
0
332QSizeF QGraphicsLayoutItem::preferredSize() const-
333{-
334 return
never executed: return effectiveSizeHint(Qt::PreferredSize);
effectiveSizeHint(Qt::PreferredSize);
never executed: return effectiveSizeHint(Qt::PreferredSize);
0
335}-
336-
337-
338-
339-
340-
341-
342void QGraphicsLayoutItem::setPreferredHeight(qreal height)-
343{-
344 d_ptr->setSizeComponent(Qt::PreferredSize, d_ptr->Height, height);-
345}
never executed: end of block
0
346-
347-
348-
349-
350-
351-
352void QGraphicsLayoutItem::setPreferredWidth(qreal width)-
353{-
354 d_ptr->setSizeComponent(Qt::PreferredSize, d_ptr->Width, width);-
355}
never executed: end of block
0
356void QGraphicsLayoutItem::setMaximumSize(const QSizeF &size)-
357{-
358 d_ptr->setSize(Qt::MaximumSize, size);-
359}
never executed: end of block
0
360QSizeF QGraphicsLayoutItem::maximumSize() const-
361{-
362 return
never executed: return effectiveSizeHint(Qt::MaximumSize);
effectiveSizeHint(Qt::MaximumSize);
never executed: return effectiveSizeHint(Qt::MaximumSize);
0
363}-
364-
365-
366-
367-
368-
369-
370void QGraphicsLayoutItem::setMaximumWidth(qreal width)-
371{-
372 d_ptr->setSizeComponent(Qt::MaximumSize, d_ptr->Width, width);-
373}
never executed: end of block
0
374-
375-
376-
377-
378-
379-
380void QGraphicsLayoutItem::setMaximumHeight(qreal height)-
381{-
382 d_ptr->setSizeComponent(Qt::MaximumSize, d_ptr->Height, height);-
383}
never executed: end of block
0
384void QGraphicsLayoutItem::setGeometry(const QRectF &rect)-
385{-
386 QGraphicsLayoutItemPrivate * const d = d_func();-
387 QSizeF effectiveSize = rect.size().expandedTo(effectiveSizeHint(Qt::MinimumSize))-
388 .boundedTo(effectiveSizeHint(Qt::MaximumSize));-
389 d->geom = QRectF(rect.topLeft(), effectiveSize);-
390}
never executed: end of block
0
391QRectF QGraphicsLayoutItem::geometry() const-
392{-
393 const QGraphicsLayoutItemPrivate * const d = d_func();-
394 return
never executed: return d->geom;
d->geom;
never executed: return d->geom;
0
395}-
396void QGraphicsLayoutItem::getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const-
397{-
398 if (left
leftDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
399 *
never executed: *left = 0;
left = 0;
never executed: *left = 0;
0
400 if (top
topDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
401 *
never executed: *top = 0;
top = 0;
never executed: *top = 0;
0
402 if (right
rightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
403 *
never executed: *right = 0;
right = 0;
never executed: *right = 0;
0
404 if (bottom
bottomDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
405 *
never executed: *bottom = 0;
bottom = 0;
never executed: *bottom = 0;
0
406}
never executed: end of block
0
407QRectF QGraphicsLayoutItem::contentsRect() const-
408{-
409 qreal left, top, right, bottom;-
410 getContentsMargins(&left, &top, &right, &bottom);-
411 return
never executed: return QRectF(QPointF(), geometry().size()).adjusted(+left, +top, -right, -bottom);
QRectF(QPointF(), geometry().size()).adjusted(+left, +top, -right, -bottom);
never executed: return QRectF(QPointF(), geometry().size()).adjusted(+left, +top, -right, -bottom);
0
412}-
413QSizeF QGraphicsLayoutItem::effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint) const-
414{-
415 const QGraphicsLayoutItemPrivate * const d = d_func();-
416-
417 if (!d->userSizeHints
!d->userSizeHintsDescription
TRUEnever evaluated
FALSEnever evaluated
&& constraint.isValid()
constraint.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
418 return
never executed: return constraint;
constraint;
never executed: return constraint;
0
419-
420-
421 return
never executed: return d_ptr->effectiveSizeHints(constraint)[which];
d_ptr->effectiveSizeHints(constraint)[which];
never executed: return d_ptr->effectiveSizeHints(constraint)[which];
0
422}-
423void QGraphicsLayoutItem::updateGeometry()-
424{-
425 QGraphicsLayoutItemPrivate * const d = d_func();-
426 d->sizeHintCacheDirty = true;-
427 d->sizeHintWithConstraintCacheDirty = true;-
428}
never executed: end of block
0
429QGraphicsLayoutItem *QGraphicsLayoutItem::parentLayoutItem() const-
430{-
431 return
never executed: return d_func()->parent;
d_func()->parent;
never executed: return d_func()->parent;
0
432}-
433-
434-
435-
436-
437-
438-
439void QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem *parent)-
440{-
441 d_func()->parent = parent;-
442}
never executed: end of block
0
443bool QGraphicsLayoutItem::isLayout() const-
444{-
445 return
never executed: return d_func()->isLayout;
d_func()->isLayout;
never executed: return d_func()->isLayout;
0
446}-
447bool QGraphicsLayoutItem::ownedByLayout() const-
448{-
449 return
never executed: return d_func()->ownedByLayout;
d_func()->ownedByLayout;
never executed: return d_func()->ownedByLayout;
0
450}-
451-
452-
453-
454-
455-
456-
457-
458void QGraphicsLayoutItem::setOwnedByLayout(bool ownership)-
459{-
460 d_func()->ownedByLayout = ownership;-
461}
never executed: end of block
0
462QGraphicsItem *QGraphicsLayoutItem::graphicsItem() const-
463{-
464 return
never executed: return d_func()->graphicsItem;
d_func()->graphicsItem;
never executed: return d_func()->graphicsItem;
0
465}-
466void QGraphicsLayoutItem::setGraphicsItem(QGraphicsItem *item)-
467{-
468 d_func()->graphicsItem = item;-
469}
never executed: end of block
0
470-
471-
Switch to Source codePreprocessed file

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