}
-GroupWidget::~GroupWidget(){}
+GroupWidget::~GroupWidget(){
+ static QString fctName = "GroupWidget::~GroupWidget()";
+#ifdef DEBUG_FCTNAME
+ cout << "call to " << qPrintable(fctName) << endl;
+#endif
+ // delete scene; // TO DO: must check if it is needed
+}
void GroupWidget::changeConnectionMode(int mode) {
/*
void GroupWidget::closeEvent(QCloseEvent *e) {
clearFocus();
focusNextChild();
+
}
toolbarEditMode->addWidget(butAddConnection);
toolbarEditMode->addWidget(butEdit);
- toolbarAdd->addAction(copyBlockAct);
+ //toolbarAdd->addAction(copyBlockAct);
toolbarAdd->addAction(newEmptyGroupAct);
toolbarAdd->addAction(newGroupAct);
}
void GroupWidget::slotCopyBlock() {
- foreach (BoxItem *item, params->getCurrentScene()->getBlockItems()) {
+ foreach (BoxItem *item, params->getCurrentScene()->getBoxItems()) {
if(item->isSelected()){
- dispatcher->duplicateBlock(item);
+ dispatcher->duplicateBoxItem(item);
}
}
}
void GroupWidget::slotNewEmptyGroup() {
- // creating the GroupBlock in graph model
- GroupBlock* groupBlock = params->addGroupBlock();
- // creating the BlockItem in the inner scene
- BoxItem* block = new BoxItem(groupBlock, dispatcher, params, scene->getGroupItem());
+ dispatcher->addNewEmptyGroup(scene);
- GroupWidget* child = dispatcher->createChildScene(this,block);
- child->show();
}
void GroupWidget::slotNewGroup()
}
void GroupWidget::slotDeleteItems() {
- foreach (BoxItem *item, scene->getBlockItems()) {
+ foreach (BoxItem *item, scene->getBoxItems()) {
if(item->isSelected()){
- dispatcher->removeBlock(item);
+ dispatcher->removeBoxItem(item);
}
}
foreach (ConnectionItem *item, scene->getConnectionItems()) {