X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8fb3c55ee009a11db5e1c08a4cfb286979412745..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()) {