X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/a13795fc34cd1e74f94695d35253c3d00abec9bc..4327c2b8817b627249d98d889835726217c81a4e:/GroupScene.cpp?ds=sidebyside diff --git a/GroupScene.cpp b/GroupScene.cpp index 70c88e2..13b6e11 100644 --- a/GroupScene.cpp +++ b/GroupScene.cpp @@ -9,6 +9,7 @@ #include "ConnectionItem.h" #include "InterfaceItem.h" #include "AbstractBlock.h" +#include "Graph.h" GroupScene::GroupScene(GroupScene *_parentScene, GroupWidget *_window, Dispatcher* _dispatcher, Parameters* _params, bool _topScene, QObject *parent) : QGraphicsScene(parent) { dispatcher = _dispatcher; @@ -156,6 +157,15 @@ void GroupScene::removeBoxItem(BoxItem* item) { groupItem->updateShape(); } +BoxItem* GroupScene::searchBoxItemByName(QString name) { + foreach(BoxItem* item, boxItems) { + if (item->getRefBlock()->getName() == name) { + return item; + } + } + return NULL; +} + StimuliItem *GroupScene::createStimuliItem(AbstractBlock *block) { StimuliItem* item = new StimuliItem(block,dispatcher,params); @@ -268,6 +278,16 @@ void GroupScene::save(QXmlStreamWriter &writer) { else { writer.writeAttribute("upper_scene",QString::number(parentScene->getId())); } + if (isTopScene()) { + QString clkList = ""; + QList lst = params->getGraph()->getClocks(); + foreach(double d, lst) { + clkList += QString::number(d)+","; + } + clkList.chop(1); + writer.writeAttribute("clkList",clkList); + + } groupItem->save(writer); if (isTopScene()) {