qgraphicswidget_p.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/graphicsview/qgraphicswidget_p.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10void QGraphicsWidgetPrivate::init(QGraphicsItem *parentItem, Qt::WindowFlags wFlags)-
11{-
12 QGraphicsWidget * const q = q_func();-
13-
14 attributes = 0;-
15 isWidget = 1;-
16 focusNext = focusPrev = q;-
17 focusPolicy = Qt::NoFocus;-
18-
19 adjustWindowFlags(&wFlags);-
20 windowFlags = wFlags;-
21-
22 q->setParentItem(parentItem);-
23 q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::DefaultType));-
24 q->setGraphicsItem(q);-
25-
26 resolveLayoutDirection();-
27 q->unsetWindowFrameMargins();-
28 flags |= QGraphicsItem::ItemUsesExtendedStyleOption;-
29 flags |= QGraphicsItem::ItemSendsGeometryChanges;-
30 if (windowFlags & Qt::Window
windowFlags & Qt::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
31 flags |= QGraphicsItem::ItemIsPanel;
never executed: flags |= QGraphicsItem::ItemIsPanel;
0
32}
never executed: end of block
0
33-
34qreal QGraphicsWidgetPrivate::titleBarHeight(const QStyleOptionTitleBar &options) const-
35{-
36 const QGraphicsWidget * const q = q_func();-
37 int height = q->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options);-
38 return
never executed: return (qreal)height;
(qreal)height;
never executed: return (qreal)height;
0
39}-
40-
41-
42-
43-
44QGraphicsWidgetPrivate::QGraphicsWidgetPrivate()-
45 : margins(nullptr),-
46 layout(nullptr),-
47 inheritedPaletteResolveMask(0),-
48 inheritedFontResolveMask(0),-
49 inSetGeometry(false),-
50 polished(false),-
51 inSetPos(false),-
52 autoFillBackground(false),-
53 focusPolicy(Qt::NoFocus),-
54 focusNext(nullptr),-
55 focusPrev(nullptr),-
56 windowFlags(),-
57 windowData(nullptr),-
58 setWindowFrameMargins(false),-
59 windowFrameMargins(nullptr)-
60{-
61}
never executed: end of block
0
62-
63QGraphicsWidgetPrivate::~QGraphicsWidgetPrivate()-
64{-
65-
66 delete[] margins;-
67 delete[] windowFrameMargins;-
68 delete windowData;-
69}
never executed: end of block
0
70-
71-
72-
73-
74-
75-
76-
77void QGraphicsWidgetPrivate::ensureMargins() const-
78{-
79 if (!margins
!marginsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
80 margins = new qreal[4];-
81 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
82 margins[i] = 0;
never executed: margins[i] = 0;
0
83 }
never executed: end of block
0
84}
never executed: end of block
0
85-
86-
87-
88-
89-
90-
91-
92void QGraphicsWidgetPrivate::ensureWindowFrameMargins() const-
93{-
94 if (!windowFrameMargins
!windowFrameMarginsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
95 windowFrameMargins = new qreal[4];-
96 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
97 windowFrameMargins[i] = 0;
never executed: windowFrameMargins[i] = 0;
0
98 }
never executed: end of block
0
99}
never executed: end of block
0
100-
101-
102-
103-
104-
105-
106-
107void QGraphicsWidgetPrivate::ensureWindowData()-
108{-
109 if (!windowData
!windowDataDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
110 windowData = new WindowData;
never executed: windowData = new WindowData;
0
111}
never executed: end of block
0
112-
113void QGraphicsWidgetPrivate::setPalette_helper(const QPalette &palette)-
114{-
115 if (this->palette == palette
this->palette == paletteDescription
TRUEnever evaluated
FALSEnever evaluated
&& this->palette.resolve() == palette.resolve()
this->palette....ette.resolve()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
116 return;
never executed: return;
0
117 updatePalette(palette);-
118}
never executed: end of block
0
119-
120void QGraphicsWidgetPrivate::resolvePalette(uint inheritedMask)-
121{-
122 inheritedPaletteResolveMask = inheritedMask;-
123 QPalette naturalPalette = naturalWidgetPalette();-
124 QPalette resolvedPalette = palette.resolve(naturalPalette);-
125 updatePalette(resolvedPalette);-
126}
never executed: end of block
0
127-
128void QGraphicsWidgetPrivate::updatePalette(const QPalette &palette)-
129{-
130 QGraphicsWidget * const q = q_func();-
131-
132 this->palette = palette;-
133-
134-
135 if (q->isWindow()
q->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& !q->testAttribute(Qt::WA_WindowPropagation)
!q->testAttrib...owPropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
136 inheritedPaletteResolveMask = 0;
never executed: inheritedPaletteResolveMask = 0;
0
137 int mask = palette.resolve() | inheritedPaletteResolveMask;-
138-
139-
140 for (int i = 0; i < children.size()
i < children.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
141 QGraphicsItem *item = children.at(i);-
142 if (item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
143 QGraphicsWidget *w = static_cast<QGraphicsWidget *>(item);-
144 if (!w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_WindowPropagation)
w->testAttribu...owPropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
145 w->d_func()->resolvePalette(mask);
never executed: w->d_func()->resolvePalette(mask);
0
146 }
never executed: end of block
else {
0
147 item->d_ptr->resolvePalette(mask);-
148 }
never executed: end of block
0
149 }-
150-
151-
152 QEvent event(QEvent::PaletteChange);-
153 QApplication::sendEvent(q, &event);-
154}
never executed: end of block
0
155-
156void QGraphicsWidgetPrivate::setLayoutDirection_helper(Qt::LayoutDirection direction)-
157{-
158 QGraphicsWidget * const q = q_func();-
159 if ((
(direction == ..._RightToLeft))Description
TRUEnever evaluated
FALSEnever evaluated
direction == Qt::RightToLeft) == (testAttribute(Qt::WA_RightToLeft))
(direction == ..._RightToLeft))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
160 return;
never executed: return;
0
161 q->setAttribute(Qt::WA_RightToLeft, (direction == Qt::RightToLeft));-
162-
163-
164 for (int i = 0; i < children.size()
i < children.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
165 QGraphicsItem *item = children.at(i);-
166 if (item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
167 QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);-
168 if (widget->parentWidget()
widget->parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
&& !widget->testAttribute(Qt::WA_SetLayoutDirection)
!widget->testA...youtDirection)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
169 widget->d_func()->setLayoutDirection_helper(direction);
never executed: widget->d_func()->setLayoutDirection_helper(direction);
0
170 }
never executed: end of block
0
171 }
never executed: end of block
0
172-
173-
174 QEvent e(QEvent::LayoutDirectionChange);-
175 QApplication::sendEvent(q, &e);-
176}
never executed: end of block
0
177-
178void QGraphicsWidgetPrivate::resolveLayoutDirection()-
179{-
180 QGraphicsWidget * const q = q_func();-
181 if (q->testAttribute(Qt::WA_SetLayoutDirection)
q->testAttribu...youtDirection)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
182 return;
never executed: return;
0
183 }-
184 if (QGraphicsWidget *parentWidget = q->parentWidget()
QGraphicsWidge...parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
185 setLayoutDirection_helper(parentWidget->layoutDirection());-
186 }
never executed: end of block
else if (scene
sceneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
187-
188-
189 setLayoutDirection_helper(QApplication::layoutDirection());-
190 }
never executed: end of block
else {
0
191 setLayoutDirection_helper(QApplication::layoutDirection());-
192 }
never executed: end of block
0
193}-
194-
195QPalette QGraphicsWidgetPrivate::naturalWidgetPalette() const-
196{-
197 const QGraphicsWidget * const q = q_func();-
198 QPalette palette;-
199 if (QGraphicsWidget *parent = q->parentWidget()
QGraphicsWidge...parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
200 palette = parent->palette();-
201 }
never executed: end of block
else if (scene
sceneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
202 palette = scene->palette();-
203 }
never executed: end of block
0
204 palette.resolve(0);-
205 return
never executed: return palette;
palette;
never executed: return palette;
0
206}-
207-
208void QGraphicsWidgetPrivate::setFont_helper(const QFont &font)-
209{-
210 if (this->font == font
this->font == fontDescription
TRUEnever evaluated
FALSEnever evaluated
&& this->font.resolve() == font.resolve()
this->font.res...font.resolve()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
211 return;
never executed: return;
0
212 updateFont(font);-
213}
never executed: end of block
0
214-
215void QGraphicsWidgetPrivate::resolveFont(uint inheritedMask)-
216{-
217 QGraphicsWidget * const q = q_func();-
218 inheritedFontResolveMask = inheritedMask;-
219 if (QGraphicsWidget *p = q->parentWidget()
QGraphicsWidge...parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
220 inheritedFontResolveMask |= p->d_func()->inheritedFontResolveMask;
never executed: inheritedFontResolveMask |= p->d_func()->inheritedFontResolveMask;
0
221 QFont naturalFont = naturalWidgetFont();-
222 QFont resolvedFont = font.resolve(naturalFont);-
223 updateFont(resolvedFont);-
224}
never executed: end of block
0
225-
226void QGraphicsWidgetPrivate::updateFont(const QFont &font)-
227{-
228 QGraphicsWidget * const q = q_func();-
229-
230 this->font = font;-
231-
232-
233 if (q->isWindow()
q->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& !q->testAttribute(Qt::WA_WindowPropagation)
!q->testAttrib...owPropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
234 inheritedFontResolveMask = 0;
never executed: inheritedFontResolveMask = 0;
0
235 int mask = font.resolve() | inheritedFontResolveMask;-
236-
237-
238 for (int i = 0; i < children.size()
i < children.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
239 QGraphicsItem *item = children.at(i);-
240 if (item->isWidget()
item->isWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
241 QGraphicsWidget *w = static_cast<QGraphicsWidget *>(item);-
242 if (!w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
|| w->testAttribute(Qt::WA_WindowPropagation)
w->testAttribu...owPropagation)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
243 w->d_func()->resolveFont(mask);
never executed: w->d_func()->resolveFont(mask);
0
244 }
never executed: end of block
else {
0
245 item->d_ptr->resolveFont(mask);-
246 }
never executed: end of block
0
247 }-
248-
249 if (!polished
!polishedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
250 return;
never executed: return;
0
251-
252 QEvent event(QEvent::FontChange);-
253 QApplication::sendEvent(q, &event);-
254}
never executed: end of block
0
255-
256QFont QGraphicsWidgetPrivate::naturalWidgetFont() const-
257{-
258 const QGraphicsWidget * const q = q_func();-
259 QFont naturalFont;-
260 if (QGraphicsWidget *parent = q->parentWidget()
QGraphicsWidge...parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
261 naturalFont = parent->font();-
262 }
never executed: end of block
else if (scene
sceneDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
263 naturalFont = scene->font();-
264 }
never executed: end of block
0
265 naturalFont.resolve(0);-
266 return
never executed: return naturalFont;
naturalFont;
never executed: return naturalFont;
0
267}-
268-
269void QGraphicsWidgetPrivate::initStyleOptionTitleBar(QStyleOptionTitleBar *option)-
270{-
271 QGraphicsWidget * const q = q_func();-
272 ensureWindowData();-
273 q->initStyleOption(option);-
274 option->rect.setHeight(titleBarHeight(*option));-
275 option->titleBarFlags = windowFlags;-
276 option->subControls = QStyle::SC_TitleBarCloseButton | QStyle::SC_TitleBarLabel | QStyle::SC_TitleBarSysMenu;-
277 option->activeSubControls = windowData->hoveredSubControl;-
278 bool isActive = q->isActiveWindow();-
279 option->state.setFlag(QStyle::State_Active, isActive);-
280 if (isActive
isActiveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
281 option->titleBarState = Qt::WindowActive;-
282 option->titleBarState |= QStyle::State_Active;-
283 }
never executed: end of block
else {
0
284 option->titleBarState = Qt::WindowNoState;-
285 }
never executed: end of block
0
286 QFont windowTitleFont = QApplication::font("QMdiSubWindowTitleBar");-
287 QRect textRect = q->style()->subControlRect(QStyle::CC_TitleBar, option, QStyle::SC_TitleBarLabel, 0);-
288 option->text = QFontMetrics(windowTitleFont).elidedText(-
289 windowData->windowTitle, Qt::ElideRight, textRect.width());-
290}
never executed: end of block
0
291-
292void QGraphicsWidgetPrivate::adjustWindowFlags(Qt::WindowFlags *flags)-
293{-
294 bool customize = (*flags & (Qt::CustomizeWindowHint-
295 | Qt::FramelessWindowHint-
296 | Qt::WindowTitleHint-
297 | Qt::WindowSystemMenuHint-
298 | Qt::WindowMinimizeButtonHint-
299 | Qt::WindowMaximizeButtonHint-
300 | Qt::WindowContextHelpButtonHint));-
301-
302 uint type = (*flags & Qt::WindowType_Mask);-
303 if (customize
customizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
304 ;
never executed: ;
0
305 else if (type == Qt::Dialog
type == Qt::DialogDescription
TRUEnever evaluated
FALSEnever evaluated
|| type == Qt::Sheet
type == Qt::SheetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
306 *
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint;
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint;
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint;
0
307 else if (type == Qt::Tool
type == Qt::ToolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
308 *
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint;
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint;
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint;
0
309 else if (type == Qt::Window
type == Qt::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
|| type == Qt::SubWindow
type == Qt::SubWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
310 *
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint;
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint;
0
311 | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint;
never executed: *flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint;
0
312}
never executed: end of block
0
313-
314void QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent(QGraphicsSceneMouseEvent *event)-
315{-
316 QGraphicsWidget * const q = q_func();-
317 ensureWindowData();-
318 if (windowData->grabbedSection != Qt::NoSection
windowData->gr... Qt::NoSectionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
319 if (windowData->grabbedSection == Qt::TitleBarArea
windowData->gr...::TitleBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
320 windowData->buttonSunken = false;-
321 QStyleOptionTitleBar bar;-
322 initStyleOptionTitleBar(&bar);-
323-
324 bar.rect = q->windowFrameRect().toRect();-
325 bar.rect.moveTo(0,0);-
326 bar.rect.setHeight(q->style()->pixelMetric(QStyle::PM_TitleBarHeight, &bar));-
327 QPointF pos = event->pos();-
328 if (windowFrameMargins
windowFrameMarginsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
329 pos.rx() += windowFrameMargins[Left];-
330 pos.ry() += windowFrameMargins[Top];-
331 }
never executed: end of block
0
332 bar.subControls = QStyle::SC_TitleBarCloseButton;-
333 if (q->style()->subControlRect(QStyle::CC_TitleBar, &bar,
q->style()->su...pos.toPoint())Description
TRUEnever evaluated
FALSEnever evaluated
0
334 QStyle::SC_TitleBarCloseButton,
q->style()->su...pos.toPoint())Description
TRUEnever evaluated
FALSEnever evaluated
0
335 event->widget()).contains(pos.toPoint())
q->style()->su...pos.toPoint())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
336 q->close();-
337 }
never executed: end of block
0
338 }
never executed: end of block
0
339 if (!(static_cast<QGraphicsSceneMouseEvent *>(event)->buttons())
!(static_cast<...t)->buttons())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
340 windowData->grabbedSection = Qt::NoSection;
never executed: windowData->grabbedSection = Qt::NoSection;
0
341 event->accept();-
342 }
never executed: end of block
0
343}
never executed: end of block
0
344-
345void QGraphicsWidgetPrivate::windowFrameMousePressEvent(QGraphicsSceneMouseEvent *event)-
346{-
347 QGraphicsWidget * const q = q_func();-
348 if (event->button() != Qt::LeftButton
event->button(...Qt::LeftButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
349 return;
never executed: return;
0
350-
351 ensureWindowData();-
352 windowData->startGeometry = q->geometry();-
353 windowData->grabbedSection = q->windowFrameSectionAt(event->pos());-
354 ensureWindowData();-
355 if (windowData->grabbedSection == Qt::TitleBarArea
windowData->gr...::TitleBarAreaDescription
TRUEnever evaluated
FALSEnever evaluated
0
356 && windowData->hoveredSubControl == QStyle::SC_TitleBarCloseButton
windowData->ho...BarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
357 windowData->buttonSunken = true;-
358 q->update();-
359 }
never executed: end of block
0
360 event->setAccepted(windowData->grabbedSection != Qt::NoSection);-
361}
never executed: end of block
0
362static qreal minimumHeightForWidth(qreal width, qreal minh, qreal maxh,-
363 const QGraphicsWidget *widget,-
364 bool heightForWidth = true)-
365{-
366 qreal minimumHeightForWidth = -1;-
367 const bool hasHFW = QGraphicsLayoutItemPrivate::get(widget)->hasHeightForWidth();-
368 if (hasHFW == heightForWidth
hasHFW == heightForWidthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
369 minimumHeightForWidth = hasHFW
hasHFWDescription
TRUEnever evaluated
FALSEnever evaluated
0
370 ? widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(width, -1)).height()-
371 : widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, width)).width();-
372 }
never executed: end of block
else {
0
373-
374 const qreal constraint = width;-
375 while (maxh - minh > 0.1
maxh - minh > 0.1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
376 qreal middle = minh + (maxh - minh)/2;-
377-
378-
379-
380 qreal hfw = hasHFW
hasHFWDescription
TRUEnever evaluated
FALSEnever evaluated
0
381 ? widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(middle, -1)).height()-
382 : widget->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, middle)).width();-
383 if (hfw > constraint
hfw > constraintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
384 minh = middle;-
385 }
never executed: end of block
else if (hfw <= constraint
hfw <= constraintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
386 maxh = middle;-
387 }
never executed: end of block
0
388 }
never executed: end of block
0
389 minimumHeightForWidth = maxh;-
390 }
never executed: end of block
0
391 return
never executed: return minimumHeightForWidth;
minimumHeightForWidth;
never executed: return minimumHeightForWidth;
0
392}-
393-
394static qreal minimumWidthForHeight(qreal height, qreal minw, qreal maxw,-
395 const QGraphicsWidget *widget)-
396{-
397 return
never executed: return minimumHeightForWidth(height, minw, maxw, widget, false);
minimumHeightForWidth(height, minw, maxw, widget, false);
never executed: return minimumHeightForWidth(height, minw, maxw, widget, false);
0
398}-
399-
400static QSizeF closestAcceptableSize(const QSizeF &proposed,-
401 const QGraphicsWidget *widget)-
402{-
403 const QSizeF current = widget->size();-
404-
405 qreal minw = proposed.width();-
406 qreal maxw = current.width();-
407 qreal minh = proposed.height();-
408 qreal maxh = current.height();-
409-
410 qreal middlew = maxw;-
411 qreal middleh = maxh;-
412 qreal min_hfw;-
413 min_hfw = minimumHeightForWidth(maxw, minh, maxh, widget);-
414-
415 do {-
416 if (maxw - minw < 0.1
maxw - minw < 0.1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
417-
418 minw = maxw;-
419 minh = maxh;-
420 }
never executed: end of block
0
421 middlew = minw + (maxw - minw)/2.0;-
422 middleh = minh + (maxh - minh)/2.0;-
423-
424 min_hfw = minimumHeightForWidth(middlew, minh, maxh, widget);-
425-
426 if (min_hfw > middleh
min_hfw > middlehDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
427 minw = middlew;-
428 minh = middleh;-
429 }
never executed: end of block
else if (min_hfw <= middleh
min_hfw <= middlehDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
430 maxw = middlew;-
431 maxh = middleh;-
432 }
never executed: end of block
0
433 }
never executed: end of block
while (maxw != minw
maxw != minwDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
434-
435 min_hfw = minimumHeightForWidth(middlew, minh, maxh, widget);-
436-
437 QSizeF result;-
438 if (min_hfw < maxh
min_hfw < maxhDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
439 result = QSizeF(middlew, min_hfw);-
440 }
never executed: end of block
else {
0
441-
442 result = QSizeF(minimumWidthForHeight(maxh, proposed.width(), current.width(), widget), maxh);-
443 }
never executed: end of block
0
444 return
never executed: return result;
result;
never executed: return result;
0
445}-
446-
447static void _q_boundGeometryToSizeConstraints(const QRectF &startGeometry,-
448 QRectF *rect, Qt::WindowFrameSection section,-
449 const QSizeF &min, const QSizeF &max,-
450 const QGraphicsWidget *widget)-
451{-
452 const QRectF proposedRect = *rect;-
453 qreal width = qBound(min.width(), proposedRect.width(), max.width());-
454 qreal height = qBound(min.height(), proposedRect.height(), max.height());-
455-
456 const bool hasHFW = QGraphicsLayoutItemPrivate::get(widget)->hasHeightForWidth();-
457 const bool hasWFH = QGraphicsLayoutItemPrivate::get(widget)->hasWidthForHeight();-
458-
459 const bool widthChanged = proposedRect.width() != widget->size().width();-
460 const bool heightChanged = proposedRect.height() != widget->size().height();-
461-
462 if (hasHFW
hasHFWDescription
TRUEnever evaluated
FALSEnever evaluated
|| hasWFH
hasWFHDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
463 if (widthChanged
widthChangedDescription
TRUEnever evaluated
FALSEnever evaluated
|| heightChanged
heightChangedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
464 qreal minExtent;-
465 qreal maxExtent;-
466 qreal constraint;-
467 qreal proposed;-
468 if (hasHFW
hasHFWDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
469 minExtent = min.height();-
470 maxExtent = max.height();-
471 constraint = width;-
472 proposed = proposedRect.height();-
473 }
never executed: end of block
else {
0
474-
475 minExtent = min.width();-
476 maxExtent = max.width();-
477 constraint = height;-
478 proposed = proposedRect.width();-
479 }
never executed: end of block
0
480 if (minimumHeightForWidth(constraint, minExtent, maxExtent, widget, hasHFW) > proposed
minimumHeightF...FW) > proposedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
481 QSizeF effectiveSize = closestAcceptableSize(QSizeF(width, height), widget);-
482 width = effectiveSize.width();-
483 height = effectiveSize.height();-
484 }
never executed: end of block
0
485 }
never executed: end of block
0
486 }
never executed: end of block
0
487-
488 switch (section) {-
489 case
never executed: case Qt::LeftSection:
Qt::LeftSection:
never executed: case Qt::LeftSection:
0
490 rect->setRect(startGeometry.right() - qRound(width), startGeometry.top(),-
491 qRound(width), startGeometry.height());-
492 break;
never executed: break;
0
493 case
never executed: case Qt::TopLeftSection:
Qt::TopLeftSection:
never executed: case Qt::TopLeftSection:
0
494 rect->setRect(startGeometry.right() - qRound(width), startGeometry.bottom() - qRound(height),-
495 qRound(width), qRound(height));-
496 break;
never executed: break;
0
497 case
never executed: case Qt::TopSection:
Qt::TopSection:
never executed: case Qt::TopSection:
0
498 rect->setRect(startGeometry.left(), startGeometry.bottom() - qRound(height),-
499 startGeometry.width(), qRound(height));-
500 break;
never executed: break;
0
501 case
never executed: case Qt::TopRightSection:
Qt::TopRightSection:
never executed: case Qt::TopRightSection:
0
502 rect->setTop(rect->bottom() - qRound(height));-
503 rect->setWidth(qRound(width));-
504 break;
never executed: break;
0
505 case
never executed: case Qt::RightSection:
Qt::RightSection:
never executed: case Qt::RightSection:
0
506 rect->setWidth(qRound(width));-
507 break;
never executed: break;
0
508 case
never executed: case Qt::BottomRightSection:
Qt::BottomRightSection:
never executed: case Qt::BottomRightSection:
0
509 rect->setWidth(qRound(width));-
510 rect->setHeight(qRound(height));-
511 break;
never executed: break;
0
512 case
never executed: case Qt::BottomSection:
Qt::BottomSection:
never executed: case Qt::BottomSection:
0
513 rect->setHeight(qRound(height));-
514 break;
never executed: break;
0
515 case
never executed: case Qt::BottomLeftSection:
Qt::BottomLeftSection:
never executed: case Qt::BottomLeftSection:
0
516 rect->setRect(startGeometry.right() - qRound(width), startGeometry.top(),-
517 qRound(width), qRound(height));-
518 break;
never executed: break;
0
519 default
never executed: default:
:
never executed: default:
0
520 break;
never executed: break;
0
521 }-
522}-
523-
524void QGraphicsWidgetPrivate::windowFrameMouseMoveEvent(QGraphicsSceneMouseEvent *event)-
525{-
526 QGraphicsWidget * const q = q_func();-
527 ensureWindowData();-
528 if (!(event->buttons() & Qt::LeftButton)
!(event->butto...t::LeftButton)Description
TRUEnever evaluated
FALSEnever evaluated
|| windowData->hoveredSubControl != QStyle::SC_TitleBarLabel
windowData->ho..._TitleBarLabelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
529 return;
never executed: return;
0
530-
531 QLineF delta(q->mapFromScene(event->buttonDownScenePos(Qt::LeftButton)), event->pos());-
532 QLineF parentDelta(q->mapToParent(delta.p1()), q->mapToParent(delta.p2()));-
533 QLineF parentXDelta(q->mapToParent(QPointF(delta.p1().x(), 0)), q->mapToParent(QPointF(delta.p2().x(), 0)));-
534 QLineF parentYDelta(q->mapToParent(QPointF(0, delta.p1().y())), q->mapToParent(QPointF(0, delta.p2().y())));-
535-
536 QRectF newGeometry;-
537 switch (windowData->grabbedSection) {-
538 case
never executed: case Qt::LeftSection:
Qt::LeftSection:
never executed: case Qt::LeftSection:
0
539 newGeometry = QRectF(windowData->startGeometry.topLeft()-
540 + QPointF(parentXDelta.dx(), parentXDelta.dy()),-
541 windowData->startGeometry.size() - QSizeF(delta.dx(), delta.dy()));-
542 break;
never executed: break;
0
543 case
never executed: case Qt::TopLeftSection:
Qt::TopLeftSection:
never executed: case Qt::TopLeftSection:
0
544 newGeometry = QRectF(windowData->startGeometry.topLeft()-
545 + QPointF(parentDelta.dx(), parentDelta.dy()),-
546 windowData->startGeometry.size() - QSizeF(delta.dx(), delta.dy()));-
547 break;
never executed: break;
0
548 case
never executed: case Qt::TopSection:
Qt::TopSection:
never executed: case Qt::TopSection:
0
549 newGeometry = QRectF(windowData->startGeometry.topLeft()-
550 + QPointF(parentYDelta.dx(), parentYDelta.dy()),-
551 windowData->startGeometry.size() - QSizeF(0, delta.dy()));-
552 break;
never executed: break;
0
553 case
never executed: case Qt::TopRightSection:
Qt::TopRightSection:
never executed: case Qt::TopRightSection:
0
554 newGeometry = QRectF(windowData->startGeometry.topLeft()-
555 + QPointF(parentYDelta.dx(), parentYDelta.dy()),-
556 windowData->startGeometry.size() - QSizeF(-delta.dx(), delta.dy()));-
557 break;
never executed: break;
0
558 case
never executed: case Qt::RightSection:
Qt::RightSection:
never executed: case Qt::RightSection:
0
559 newGeometry = QRectF(windowData->startGeometry.topLeft(),-
560 windowData->startGeometry.size() + QSizeF(delta.dx(), 0));-
561 break;
never executed: break;
0
562 case
never executed: case Qt::BottomRightSection:
Qt::BottomRightSection:
never executed: case Qt::BottomRightSection:
0
563 newGeometry = QRectF(windowData->startGeometry.topLeft(),-
564 windowData->startGeometry.size() + QSizeF(delta.dx(), delta.dy()));-
565 break;
never executed: break;
0
566 case
never executed: case Qt::BottomSection:
Qt::BottomSection:
never executed: case Qt::BottomSection:
0
567 newGeometry = QRectF(windowData->startGeometry.topLeft(),-
568 windowData->startGeometry.size() + QSizeF(0, delta.dy()));-
569 break;
never executed: break;
0
570 case
never executed: case Qt::BottomLeftSection:
Qt::BottomLeftSection:
never executed: case Qt::BottomLeftSection:
0
571 newGeometry = QRectF(windowData->startGeometry.topLeft()-
572 + QPointF(parentXDelta.dx(), parentXDelta.dy()),-
573 windowData->startGeometry.size() - QSizeF(delta.dx(), -delta.dy()));-
574 break;
never executed: break;
0
575 case
never executed: case Qt::TitleBarArea:
Qt::TitleBarArea:
never executed: case Qt::TitleBarArea:
0
576 newGeometry = QRectF(windowData->startGeometry.topLeft()-
577 + QPointF(parentDelta.dx(), parentDelta.dy()),-
578 windowData->startGeometry.size());-
579 break;
never executed: break;
0
580 case
never executed: case Qt::NoSection:
Qt::NoSection:
never executed: case Qt::NoSection:
0
581 break;
never executed: break;
0
582 }-
583-
584 if (windowData->grabbedSection != Qt::NoSection
windowData->gr... Qt::NoSectionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
585 _q_boundGeometryToSizeConstraints(windowData->startGeometry, &newGeometry,-
586 windowData->grabbedSection,-
587 q->effectiveSizeHint(Qt::MinimumSize),-
588 q->effectiveSizeHint(Qt::MaximumSize),-
589 q);-
590 q->setGeometry(newGeometry);-
591 }
never executed: end of block
0
592}
never executed: end of block
0
593-
594void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent *event)-
595{-
596 QGraphicsWidget * const q = q_func();-
597 if (!hasDecoration()
!hasDecoration()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
598 return;
never executed: return;
0
599-
600 ensureWindowData();-
601-
602 if (q->rect().contains(event->pos())
q->rect().cont...(event->pos())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
603 if (windowData->buttonMouseOver
windowData->buttonMouseOverDescription
TRUEnever evaluated
FALSEnever evaluated
|| windowData->hoveredSubControl != QStyle::SC_None
windowData->ho...Style::SC_NoneDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
604 windowFrameHoverLeaveEvent(event);
never executed: windowFrameHoverLeaveEvent(event);
0
605 return;
never executed: return;
0
606 }-
607-
608 bool wasMouseOver = windowData->buttonMouseOver;-
609 QRect oldButtonRect = windowData->buttonRect;-
610 windowData->buttonRect = QRect();-
611 windowData->buttonMouseOver = false;-
612 QPointF pos = event->pos();-
613 QStyleOptionTitleBar bar;-
614-
615 if (windowFrameMargins
windowFrameMarginsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
616 pos.rx() += windowFrameMargins[Left];-
617 pos.ry() += windowFrameMargins[Top];-
618 }
never executed: end of block
0
619 initStyleOptionTitleBar(&bar);-
620 bar.rect = q->windowFrameRect().toRect();-
621 bar.rect.moveTo(0,0);-
622 bar.rect.setHeight(int(titleBarHeight(bar)));-
623-
624 Qt::CursorShape cursorShape = Qt::ArrowCursor;-
625 bool needsSetCursorCall = true;-
626 switch (q->windowFrameSectionAt(event->pos())) {-
627 case
never executed: case Qt::TopLeftSection:
Qt::TopLeftSection:
never executed: case Qt::TopLeftSection:
0
628 case
never executed: case Qt::BottomRightSection:
Qt::BottomRightSection:
never executed: case Qt::BottomRightSection:
0
629 cursorShape = Qt::SizeFDiagCursor;-
630 break;
never executed: break;
0
631 case
never executed: case Qt::TopRightSection:
Qt::TopRightSection:
never executed: case Qt::TopRightSection:
0
632 case
never executed: case Qt::BottomLeftSection:
Qt::BottomLeftSection:
never executed: case Qt::BottomLeftSection:
0
633 cursorShape = Qt::SizeBDiagCursor;-
634 break;
never executed: break;
0
635 case
never executed: case Qt::LeftSection:
Qt::LeftSection:
never executed: case Qt::LeftSection:
0
636 case
never executed: case Qt::RightSection:
Qt::RightSection:
never executed: case Qt::RightSection:
0
637 cursorShape = Qt::SizeHorCursor;-
638 break;
never executed: break;
0
639 case
never executed: case Qt::TopSection:
Qt::TopSection:
never executed: case Qt::TopSection:
0
640 case
never executed: case Qt::BottomSection:
Qt::BottomSection:
never executed: case Qt::BottomSection:
0
641 cursorShape = Qt::SizeVerCursor;-
642 break;
never executed: break;
0
643 case
never executed: case Qt::TitleBarArea:
Qt::TitleBarArea:
never executed: case Qt::TitleBarArea:
0
644 windowData->buttonRect = q->style()->subControlRect(-
645 QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarCloseButton, 0);-
646-
647-
648-
649-
650-
651-
652-
653 if (windowData->buttonRect.contains(pos.toPoint())
windowData->bu...pos.toPoint())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
654 windowData->buttonMouseOver = true;
never executed: windowData->buttonMouseOver = true;
0
655 event->ignore();-
656 break;
never executed: break;
0
657 default
never executed: default:
:
never executed: default:
0
658 needsSetCursorCall = false;-
659 event->ignore();-
660 }
never executed: end of block
0
661-
662 if (needsSetCursorCall
needsSetCursorCallDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
663 q->setCursor(cursorShape);
never executed: q->setCursor(cursorShape);
0
664-
665-
666 windowData->hoveredSubControl = q->style()->hitTestComplexControl(QStyle::CC_TitleBar, &bar, pos.toPoint(), 0);-
667 if (windowData->hoveredSubControl != QStyle::SC_TitleBarCloseButton
windowData->ho...BarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
668 windowData->hoveredSubControl = QStyle::SC_TitleBarLabel;
never executed: windowData->hoveredSubControl = QStyle::SC_TitleBarLabel;
0
669-
670 if (windowData->buttonMouseOver != wasMouseOver
windowData->bu...= wasMouseOverDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
671 if (!oldButtonRect.isNull()
!oldButtonRect.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
672 q->update(QRectF(oldButtonRect).translated(q->windowFrameRect().topLeft()));
never executed: q->update(QRectF(oldButtonRect).translated(q->windowFrameRect().topLeft()));
0
673 if (!windowData->buttonRect.isNull()
!windowData->b...nRect.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
674 q->update(QRectF(windowData->buttonRect).translated(q->windowFrameRect().topLeft()));
never executed: q->update(QRectF(windowData->buttonRect).translated(q->windowFrameRect().topLeft()));
0
675 }
never executed: end of block
0
676}
never executed: end of block
0
677-
678void QGraphicsWidgetPrivate::windowFrameHoverLeaveEvent(QGraphicsSceneHoverEvent *event)-
679{-
680 (void)event;;-
681 QGraphicsWidget * const q = q_func();-
682 if (hasDecoration()
hasDecoration()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
683-
684-
685 q->unsetCursor();-
686-
687-
688 ensureWindowData();-
689-
690 bool needsUpdate = false;-
691 if (windowData->hoveredSubControl == QStyle::SC_TitleBarCloseButton
windowData->ho...BarCloseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
0
692 || windowData->buttonMouseOver
windowData->buttonMouseOverDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
693 needsUpdate = true;
never executed: needsUpdate = true;
0
694-
695-
696 windowData->hoveredSubControl = QStyle::SC_None;-
697 windowData->buttonMouseOver = false;-
698 windowData->buttonRect = QRect();-
699 if (needsUpdate
needsUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
700 q->update(windowData->buttonRect);
never executed: q->update(windowData->buttonRect);
0
701 }
never executed: end of block
0
702}
never executed: end of block
0
703-
704bool QGraphicsWidgetPrivate::hasDecoration() const-
705{-
706 return
never executed: return (windowFlags & Qt::Window) && (windowFlags & Qt::WindowTitleHint);
(windowFlags & Qt::Window) && (windowFlags & Qt::WindowTitleHint);
never executed: return (windowFlags & Qt::Window) && (windowFlags & Qt::WindowTitleHint);
0
707}-
708-
709-
710-
711-
712void QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget *newParent, QGraphicsScene *oldScene, QGraphicsScene *newScene)-
713{-
714 QGraphicsWidget * const q = q_func();-
715 ((!(focusNext && focusPrev)) ? qt_assert("focusNext && focusPrev",__FILE__,776) : qt_noop());-
716-
717 if (q_ptr->isPanel()
q_ptr->isPanel()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
718-
719-
720-
721 return;
never executed: return;
0
722 }-
723-
724-
725-
726-
727-
728 QGraphicsWidget *focusFirst = q;-
729 QGraphicsWidget *focusBefore = focusPrev;-
730 QGraphicsWidget *focusLast = focusFirst;-
731 QGraphicsWidget *focusAfter = focusNext;-
732 do {-
733 if (!q->isAncestorOf(focusAfter)
!q->isAncestorOf(focusAfter)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
734 break;
never executed: break;
0
735 focusLast = focusAfter;-
736 }
never executed: end of block
while ((
(focusAfter = ...()->focusNext)Description
TRUEnever evaluated
FALSEnever evaluated
focusAfter = focusAfter->d_func()->focusNext)
(focusAfter = ...()->focusNext)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
737-
738 if (!parent
!parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldScene
oldSceneDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldScene != newScene
oldScene != newSceneDescription
TRUEnever evaluated
FALSEnever evaluated
&& oldScene->d_func()->tabFocusFirst == q
oldScene->d_fu...ocusFirst == qDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
739-
740 oldScene->d_func()->tabFocusFirst = (
(focusAfter != q)Description
TRUEnever evaluated
FALSEnever evaluated
focusAfter != q)
(focusAfter != q)Description
TRUEnever evaluated
FALSEnever evaluated
? focusAfter : 0;
0
741 }
never executed: end of block
0
742-
743-
744 focusBefore->d_func()->focusNext = focusAfter;-
745 focusAfter->d_func()->focusPrev = focusBefore;-
746-
747 if (newParent
newParentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
748-
749-
750 QGraphicsWidget *newFocusFirst = newParent;-
751 QGraphicsWidget *newFocusLast = newFocusFirst;-
752 QGraphicsWidget *newFocusAfter = newFocusFirst->d_func()->focusNext;-
753 do {-
754 if (!newParent->isAncestorOf(newFocusAfter)
!newParent->is...newFocusAfter)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
755 break;
never executed: break;
0
756 newFocusLast = newFocusAfter;-
757 }
never executed: end of block
while ((
(newFocusAfter...()->focusNext)Description
TRUEnever evaluated
FALSEnever evaluated
newFocusAfter = newFocusAfter->d_func()->focusNext)
(newFocusAfter...()->focusNext)Description
TRUEnever evaluated
FALSEnever evaluated
);
0
758-
759 newFocusLast->d_func()->focusNext = q;-
760 focusLast->d_func()->focusNext = newFocusAfter;-
761 newFocusAfter->d_func()->focusPrev = focusLast;-
762 focusPrev = newFocusLast;-
763 }
never executed: end of block
else {
0
764-
765 focusPrev = focusLast;-
766 focusLast->d_func()->focusNext = q;-
767 }
never executed: end of block
0
768}-
769-
770void QGraphicsWidgetPrivate::setLayout_helper(QGraphicsLayout *l)-
771{-
772 delete (this->layout);-
773 layout = l;-
774 if (!l
!lDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
775 QGraphicsWidget * const q = q_func();-
776 q->updateGeometry();-
777 }
never executed: end of block
0
778}
never executed: end of block
0
779-
780qreal QGraphicsWidgetPrivate::width() const-
781{-
782 const QGraphicsWidget * const q = q_func();-
783 return
never executed: return q->geometry().width();
q->geometry().width();
never executed: return q->geometry().width();
0
784}-
785-
786void QGraphicsWidgetPrivate::setWidth(qreal w)-
787{-
788 if (qIsNaN(w)
qIsNaN(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
789 return;
never executed: return;
0
790 QGraphicsWidget * const q = q_func();-
791 if (q->geometry().width() == w
q->geometry().width() == wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
792 return;
never executed: return;
0
793-
794 q->setGeometry(QRectF(q->x(), q->y(), w, height()));-
795}
never executed: end of block
0
796-
797void QGraphicsWidgetPrivate::resetWidth()-
798{-
799 QGraphicsWidget * const q = q_func();-
800 q->setGeometry(QRectF(q->x(), q->y(), 0, height()));-
801}
never executed: end of block
0
802-
803qreal QGraphicsWidgetPrivate::height() const-
804{-
805 const QGraphicsWidget * const q = q_func();-
806 return
never executed: return q->geometry().height();
q->geometry().height();
never executed: return q->geometry().height();
0
807}-
808-
809void QGraphicsWidgetPrivate::setHeight(qreal h)-
810{-
811 if (qIsNaN(h)
qIsNaN(h)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
812 return;
never executed: return;
0
813 QGraphicsWidget * const q = q_func();-
814 if (q->geometry().height() == h
q->geometry().height() == hDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
815 return;
never executed: return;
0
816-
817 q->setGeometry(QRectF(q->x(), q->y(), width(), h));-
818}
never executed: end of block
0
819-
820void QGraphicsWidgetPrivate::resetHeight()-
821{-
822 QGraphicsWidget * const q = q_func();-
823 q->setGeometry(QRectF(q->x(), q->y(), width(), 0));-
824}
never executed: end of block
0
825-
826void QGraphicsWidgetPrivate::setGeometryFromSetPos()-
827{-
828 if (inSetGeometry
inSetGeometryDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
829 return;
never executed: return;
0
830 QGraphicsWidget * const q = q_func();-
831 inSetPos = 1;-
832-
833-
834 q->setGeometry(QRectF(pos, q->size()));-
835 inSetPos = 0 ;-
836}
never executed: end of block
0
837-
838-
Switch to Source codePreprocessed file

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