X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/2bdaa0aa3fab52f0808f60d9bbdabcd56d0efae9..8fb3c55ee009a11db5e1c08a4cfb286979412745:/BlockLibraryWidget.cpp?ds=sidebyside 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