X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8fb3c55ee009a11db5e1c08a4cfb286979412745..HEAD:/BlockLibraryWidget.cpp diff --git a/BlockLibraryWidget.cpp b/BlockLibraryWidget.cpp index d80a78e..47fd875 100644 --- a/BlockLibraryWidget.cpp +++ b/BlockLibraryWidget.cpp @@ -1,5 +1,6 @@ #include "BlockLibraryWidget.h" #include "BlockLibraryTree.h" +#include "Graph.h" BlockLibraryWidget::BlockLibraryWidget(Dispatcher* _dispatcher, Parameters* _params, @@ -31,7 +32,7 @@ BlockLibraryWidget::BlockLibraryWidget(Dispatcher* _dispatcher, QString msg = "Connect to main clock/rst ext_clk/reset_0 ("; - msg += QString::number(params->clocks.at(0)); + msg += QString::number(params->getGraph()->getClock(0)); msg += ")"; radAutoClk = new QRadioButton(msg); radChooseClk = new QRadioButton("Choose among available clk/rst"); @@ -135,7 +136,7 @@ void BlockLibraryWidget::addClicked() { cout << "adding block to scene " << v.toInt() << endl; QHash clkRstToGen; - for(int i=1;iitemAtPosition(i,0); QLabel* lab = (QLabel *)(item->widget()); item = layClkRst->itemAtPosition(i,1); @@ -198,7 +199,7 @@ void BlockLibraryWidget::updateBoxConn() { //enableAvailableClocks(true); } QString msg = "Auto-connect to main clk/rst (ext_clk_0 at "; - msg += QString::number(params->clocks.at(0)); + msg += QString::number(params->getGraph()->getClock(0)); msg += " MHz)"; radAutoClk->setText(msg); } @@ -243,7 +244,7 @@ void BlockLibraryWidget::updateClkRst(int idCat, int idBlock) { comboClkGen[i] = new QComboBox(); QString name = ""; int id = 0; - foreach(double d, params->clocks) { + foreach(double d, params->getGraph()->getClocks()) { name = "ext_clk_"+QString::number(id)+" ("; name += QString::number(d) + " MHz)"; comboClkGen[i]->addItem(name); @@ -255,7 +256,7 @@ void BlockLibraryWidget::updateClkRst(int idCat, int idBlock) { for(int i=0;iclocks.size();j++) { + for(int j=0;jgetGraph()->getClocks().size();j++) { name = "ext_rst_"+QString::number(j); comboRstGen[i]->addItem(name); }