X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/d43174d0eb3d293b3bb5fbe76662241134e74d0d..56f7c4239666506c59af42885f0bf0141d21a614:/MainWindow.cpp diff --git a/MainWindow.cpp b/MainWindow.cpp index 6afabcd..38ec48a 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -4,7 +4,7 @@ #include "BlockLibraryWidget.h" #include "GroupWidget.h" #include "GroupScene.h" -#include "BlockWidget.h" +#include "VHDLConverter.h" #include "AbstractBoxItem.h" #include "Graph.h" #include "GroupItem.h" @@ -280,7 +280,7 @@ void MainWindow::slotLoadProject(){ msgBox.setStandardButtons(QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); - int ret = msgBox.exec(); + msgBox.exec(); } } } @@ -292,6 +292,7 @@ void MainWindow::slotNewProject(){ GroupWidget* topGroup = dispatcher->createTopScene(); addTopGroup(topGroup); library->updateComboScene(); + library->show(); params->isCurrentProject = true; } @@ -319,6 +320,9 @@ bool MainWindow::slotCloseProject(){ break; } } + else { + doClose = true; + } if (doClose) { // removing the GroupWidget from stack QWidget *widget = stackedWidget->widget(1); @@ -339,7 +343,7 @@ bool MainWindow::slotCloseProject(){ void MainWindow::slotNewBlockWidget() { - new BlockWidget(); + new VHDLConverter(); } void MainWindow::slotSaveProject(){ @@ -369,7 +373,12 @@ void MainWindow::slotOpenBlockLibrary() { void MainWindow::slotGraphValidation() { - params->parametersValidation(); + try { + params->getGraph()->computeOutputPatterns(5); + } + catch(Exception e) { + cerr << qPrintable(e.getMessage()) << endl; + } } void MainWindow::addTopGroup(GroupWidget *_topGroup) { @@ -390,6 +399,9 @@ void MainWindow::closeEvent(QCloseEvent *event) { slotCloseProject(); event->ignore(); } + else { + library->deleteLater(); + } }