X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..fc9f5b8b77edda9e49a35d8ef75c4d71caf1c832:/GroupWidget.cpp?ds=inline diff --git a/GroupWidget.cpp b/GroupWidget.cpp index 1446a13..318e596 100644 --- a/GroupWidget.cpp +++ b/GroupWidget.cpp @@ -41,7 +41,13 @@ GroupWidget::GroupWidget(GroupWidget *_upperGroup, Dispatcher *_dispatcher, } -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) { /* @@ -95,6 +101,7 @@ void GroupWidget::focusInEvent(QFocusEvent *e) { void GroupWidget::closeEvent(QCloseEvent *e) { clearFocus(); focusNextChild(); + } @@ -158,7 +165,7 @@ void GroupWidget::createToolbar() { toolbarEditMode->addWidget(butAddConnection); toolbarEditMode->addWidget(butEdit); - toolbarAdd->addAction(copyBlockAct); + //toolbarAdd->addAction(copyBlockAct); toolbarAdd->addAction(newEmptyGroupAct); toolbarAdd->addAction(newGroupAct); @@ -178,9 +185,9 @@ void GroupWidget::slotEdit() { } void GroupWidget::slotCopyBlock() { - foreach (BoxItem *item, params->getCurrentScene()->getBlockItems()) { + foreach (BoxItem *item, params->getCurrentScene()->getBoxItems()) { if(item->isSelected()){ - dispatcher->duplicateBlock(item); + dispatcher->duplicateBoxItem(item); } } } @@ -222,13 +229,8 @@ void GroupWidget::updateBlockButton() { 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() @@ -237,9 +239,9 @@ 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()) {