]> AND Private Git Repository - blast.git/blobdiff - MainWindow.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
finished testbench generation
[blast.git] / MainWindow.cpp
index c7ff634194becd6261e230c5d2c859a47adc18eb..6f4716ad57dfe346ab2efb149a2848f3bf281e8a 100644 (file)
@@ -311,15 +311,21 @@ void MainWindow::save(QString projectFile) {
   params->save(projectFile);
 }
 
   params->save(projectFile);
 }
 
-void MainWindow::slotLoadProject(){
+void MainWindow::slotLoadProject(QString fileName){
 
 
-  params->projectFile = QFileDialog::getOpenFileName(0, "select a project file", "save/",tr("sauvegardes (*.xml)"));
+  if (fileName == "") {
+    params->projectFile = QFileDialog::getOpenFileName(0, "select a project file", "save/",tr("sauvegardes (*.xml)"));
+  }
+  else {
+    params->projectFile = fileName;
+  }
 
   if(! params->projectFile.isEmpty()){
     GroupWidget* topGroup = dispatcher->loadProject(params->projectFile);
     if (topGroup != NULL) {
       addTopGroup(topGroup);
 
   if(! params->projectFile.isEmpty()){
     GroupWidget* topGroup = dispatcher->loadProject(params->projectFile);
     if (topGroup != NULL) {
       addTopGroup(topGroup);
-      library->updateComboScene();      
+      library->updateComboScene();
+      library->updateBoxConn();
       params->isCurrentProject = true;
       enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ);
       enableAnalysisActions(true, ANALYSIS_ANALYZE | ANALYSIS_GENERATE, OP_RAZ);
       params->isCurrentProject = true;
       enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ);
       enableAnalysisActions(true, ANALYSIS_ANALYZE | ANALYSIS_GENERATE, OP_RAZ);
@@ -344,9 +350,10 @@ void MainWindow::slotNewProject(){
   if (ret == 1) {
     enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ);
     enableAnalysisActions(true, ANALYSIS_ANALYZE | ANALYSIS_GENERATE, OP_RAZ);
   if (ret == 1) {
     enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ);
     enableAnalysisActions(true, ANALYSIS_ANALYZE | ANALYSIS_GENERATE, OP_RAZ);
-    GroupWidget* topGroup = dispatcher->createTopScene(Dispatcher::Design);
+    GroupWidget* topGroup = dispatcher->createTopScene(Dispatcher::Design, params->mainClock);
     addTopGroup(topGroup);
     addTopGroup(topGroup);
-    library->updateComboScene();    
+    library->updateComboScene();
+    library->updateBoxConn();
     library->show();
     params->isCurrentProject = true;
   }
     library->show();
     params->isCurrentProject = true;
   }