X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/3bcfe4df6fdde086eb1b59f7a0173358170174a1..8fb3c55ee009a11db5e1c08a4cfb286979412745:/BlockLibraryWidget.cpp?ds=inline diff --git a/BlockLibraryWidget.cpp b/BlockLibraryWidget.cpp index 5dfd4b0..d80a78e 100644 --- a/BlockLibraryWidget.cpp +++ b/BlockLibraryWidget.cpp @@ -135,12 +135,13 @@ void BlockLibraryWidget::addClicked() { cout << "adding block to scene " << v.toInt() << endl; QHash clkRstToGen; - for(int i=0;irowCount();i++) { + for(int i=1;iitemAtPosition(i,0); QLabel* lab = (QLabel *)(item->widget()); item = layClkRst->itemAtPosition(i,1); QComboBox* combo = (QComboBox *)(item->widget()); clkRstToGen.insert(lab->text(),combo->currentIndex()); + cout << "addblock: have to connect " << qPrintable(lab->text()) << " to clk/rst n° " << combo->currentIndex() << endl; } @@ -218,7 +219,7 @@ void BlockLibraryWidget::updateClkRst(int idCat, int idBlock) { QWidget* widget = layClkRst->itemAt(0)->widget(); layClkRst->removeWidget(widget); delete widget; - } + } if (nbClock != 0) { delete [] comboClkGen; @@ -235,6 +236,7 @@ void BlockLibraryWidget::updateClkRst(int idCat, int idBlock) { nbClock = lstClocks.size(); QList lstRst = currentRefBlock->getInterfaces(AbstractInterface::Input, AbstractInterface::Reset); nbRst = lstRst.size(); + cout << "For chosen block there are " << nbClock << " clocks and " << nbRst << " resets" << endl; comboClkGen = new QComboBox*[lstClocks.size()]; for(int i=0;i