MCPcopy Create free account
hub / github.com/KDE/labplot / setContainerRect

Method setContainerRect

src/backend/worksheet/Worksheet.cpp:1710–1727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1708}
1709
1710void WorksheetPrivate::setContainerRect(WorksheetElementContainer* elem, double x, double y, double h, double w, bool undoable) {
1711 if (useViewSize) {
1712 // when using the view size, no need to put rect changes onto the undo-stack
1713 elem->setUndoAware(false);
1714 elem->setRect(QRectF(x, y, w, h));
1715 elem->setUndoAware(true);
1716 } else {
1717 // don't put rect changed onto the undo-stack if undoable-flag is set to true,
1718 // e.g. when new child is added or removed (the layout and the childrend rects will be updated anyway)
1719 if (!undoable) {
1720 elem->setUndoAware(false);
1721 elem->setRect(QRectF(x, y, w, h));
1722 elem->setUndoAware(true);
1723 } else
1724 elem->setRect(QRectF(x, y, w, h));
1725 }
1726 elem->graphicsItem()->setFlag(QGraphicsItem::ItemIsMovable, false);
1727}
1728
1729// ##############################################################################
1730// ################## Serialization/Deserialization ###########################

Callers

nothing calls this directly

Calls 4

QRectFClass · 0.85
setUndoAwareMethod · 0.80
setRectMethod · 0.45
graphicsItemMethod · 0.45

Tested by

no test coverage detected