void UBGraphicsGroupContainerItem::removeFromGroup(QGraphicsItem *item) { if (!item) { qDebug() << "can't specify the item because of the null pointer"; } UBGraphicsScene *groupScene = scene(); if (groupScene) { groupScene->addItemToDeletion(item); } pRemoveFromGroup(item); }
void UBGraphicsGroupContainerItem::removeFromGroup(QGraphicsItem *item) { if (!item) { qDebug() << "can't specify the item because of the null pointer"; return; } UBCoreGraphicsScene *groupScene = corescene(); if (groupScene) { groupScene->addItemToDeletion(item); } pRemoveFromGroup(item); item->setFlags(ItemIsSelectable | ItemIsFocusable); }
void UBGraphicsGroupContainerItem::destroy() { UBGraphicsScene *groupScene = scene(); foreach (QGraphicsItem *item, childItems()) { if (groupScene) { groupScene->addItemToDeletion(item); } pRemoveFromGroup(item); item->setFlag(QGraphicsItem::ItemIsSelectable, true); item->setFlag(QGraphicsItem::ItemIsFocusable, true); } remove(); }
foreach (QGraphicsItem *item, childItems()) { pRemoveFromGroup(item); item->setFlag(QGraphicsItem::ItemIsSelectable, true); item->setFlag(QGraphicsItem::ItemIsFocusable, true); }