X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/4cf57e6db08da791233d75237f62e74bc88dd427..HEAD:/GroupWidget.cpp diff --git a/GroupWidget.cpp b/GroupWidget.cpp index 54cdfc1..c530c2b 100644 --- a/GroupWidget.cpp +++ b/GroupWidget.cpp @@ -21,7 +21,7 @@ GroupWidget::GroupWidget(GroupWidget *_upperGroup, Dispatcher *_dispatcher, scene = new GroupScene(NULL, this, dispatcher, params, true); } else { - topGroup = true; + topGroup = false; scene = new GroupScene(upperGroup->getScene(), this, dispatcher, params, false); } @@ -85,7 +85,7 @@ void GroupWidget::enableGroupButton(bool b) { void GroupWidget::mousePressEvent(QMouseEvent *e) { - dispatcher->setCurrentGroupWidget(this); + dispatcher->setCurrentGroupWidget(Dispatcher::Design, this); QWidget::mousePressEvent(e); } @@ -179,7 +179,7 @@ void GroupWidget::createToolbar() { } void GroupWidget::slotEdit() { - dispatcher->unselectAllItems(); + dispatcher->unselectAllItems(Dispatcher::Design); getScene()->setEditionMode(GroupScene::ItemEdition); updateBlockButton(); } @@ -187,13 +187,13 @@ void GroupWidget::slotEdit() { void GroupWidget::slotCopyBlock() { foreach (BoxItem *item, params->getCurrentScene()->getBoxItems()) { if(item->isSelected()){ - dispatcher->duplicateBoxItem(item); + dispatcher->duplicateBoxItem(Dispatcher::Design, item); } } } void GroupWidget::slotAddConnection() { - dispatcher->unselectAllItems(); + dispatcher->unselectAllItems(Dispatcher::Design); getScene()->setEditionMode(GroupScene::AddConnection); updateBlockButton(); } @@ -229,24 +229,24 @@ void GroupWidget::updateBlockButton() { void GroupWidget::slotNewEmptyGroup() { - dispatcher->addNewEmptyGroup(scene); + dispatcher->addNewEmptyGroup(Dispatcher::Design, scene); } void GroupWidget::slotNewGroup() { - dispatcher->addNewFullGroup(); + dispatcher->addNewFullGroup(Dispatcher::Design ); } void GroupWidget::slotDeleteItems() { foreach (BoxItem *item, scene->getBoxItems()) { if(item->isSelected()){ - dispatcher->removeBoxItem(item); + dispatcher->removeBoxItem(Dispatcher::Design, item); } } foreach (ConnectionItem *item, scene->getConnectionItems()) { if(item->isSelected()){ - dispatcher->removeConnection(item); + dispatcher->removeConnection(Dispatcher::Design, item); } } }