X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/a13795fc34cd1e74f94695d35253c3d00abec9bc..4327c2b8817b627249d98d889835726217c81a4e:/Parameters.cpp diff --git a/Parameters.cpp b/Parameters.cpp index ec0041f..23b798f 100644 --- a/Parameters.cpp +++ b/Parameters.cpp @@ -78,6 +78,7 @@ Graph* Parameters::initGraph(bool createTopGroupIfaces) { void Parameters::destroyGraph() { delete graph; + graph = new Graph(); } ReferenceBlock* Parameters::getReferenceBlock(int idCategory, int idBlock) { @@ -275,6 +276,14 @@ GroupWidget *Parameters::loadProject(QDomElement root) throw(Exception) { if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); if (idUpperScene == -1) { + QString clkList = currentSceneNode.attribute("clklist","none"); + if (clkList == "none") throw(Exception(PROJECTFILE_CORRUPTED)); + QStringList clks = clkList.split(","); + for(int j=0;jaddClock(freq); + } topGroup = dispatcher->createTopScene(Dispatcher::Load); topScene->setId(idScene); groupItem = topScene->getGroupItem(); @@ -460,12 +469,16 @@ GroupWidget *Parameters::loadProject(QDomElement root) throw(Exception) { int to = currentConnectionNode.attribute("to","none").toInt(&ok); if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); - + bool showConn = true; + QString visStr = currentConnectionNode.attribute("visible","none"); + if (visStr == "false") { + showConn = false; + } InterfaceItem *iface1 = searchInterfaceItemById(from,topScene); InterfaceItem *iface2 = searchInterfaceItemById(to,topScene); if(iface1 != NULL && iface2 != NULL){ - dispatcher->createConnection(Dispatcher::Load, iface1,iface2); + dispatcher->createConnection(Dispatcher::Load, iface1,iface2,showConn); } else { cout << "interfaces not found, connect canceled!" << endl; } @@ -1173,7 +1186,9 @@ void Parameters::save(QString confFile) { writer.writeAttribute("from",QString::number(item->getFromInterfaceItem()->getId())); writer.writeAttribute("to", QString::number(item->getToInterfaceItem()->getId())); - + if (!item->isVisible()) { + writer.writeAttribute("visible","false"); + } writer.writeEndElement(); }