void GroupWidget::closeEvent(QCloseEvent *e) {
clearFocus();
focusNextChild();
+
}
void GroupWidget::slotNewEmptyGroup() {
- // creating the GroupBlock in graph model
- GroupBlock* parent = AB_TO_GRP(scene->getGroupItem()->getRefBlock());
- cout << "new group : parent = "<< qPrintable(parent->getName()) << endl;
- GroupBlock* groupBlock = params->getGraph()->createChildBlock(parent);
- cout << "new group : child = "<< qPrintable(groupBlock->getName()) << ", child of " << qPrintable(groupBlock->getParent()->getName()) << endl;
- // creating the BlockItem in the scene
- BoxItem* newItem = scene->createBlockItem(groupBlock);
+ dispatcher->addNewEmptyGroup(scene);
- GroupWidget* child = dispatcher->createChildScene(this,newItem);
- child->show();
}
void GroupWidget::slotNewGroup()