UBGraphicsGroupContainerItem *UBGraphicsGroupContainerItem::deepCopy() const { UBGraphicsGroupContainerItem *copy = new UBGraphicsGroupContainerItem(parentItem()); copy->setUuid(this->uuid()); // this is OK for now as long as Widgets are imutable copyItemParameters(copy); // copy->resize(this->size()); return copy; }
UBGraphicsGroupContainerItem *UBGraphicsGroupContainerItem::deepCopy() const { UBGraphicsGroupContainerItem *copy = new UBGraphicsGroupContainerItem(parentItem()); copy->setPos(this->pos()); copy->setTransform(this->transform()); copy->setFlag(QGraphicsItem::ItemIsMovable, true); copy->setFlag(QGraphicsItem::ItemIsSelectable, true); copy->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType)); copy->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked)); copy->setUuid(this->uuid()); // this is OK for now as long as Widgets are imutable // copy->resize(this->size()); return copy; }