X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/4cf57e6db08da791233d75237f62e74bc88dd427..14cd6d834ab531525a51c6a6992583b3e9143e02:/InterfacePropertiesWindow.cpp?ds=sidebyside diff --git a/InterfacePropertiesWindow.cpp b/InterfacePropertiesWindow.cpp index 6999a16..5a571c0 100644 --- a/InterfacePropertiesWindow.cpp +++ b/InterfacePropertiesWindow.cpp @@ -9,6 +9,15 @@ InterfacePropertiesWindow::InterfacePropertiesWindow(InterfaceItem *_inter, QWid layout = new QGridLayout; + int w = inter->refInter->getWidth(); + QString wStr = ""; + if (w == -1) { + wStr = "invalid_size"; + } + else { + if (w == 0) w++; // 0 means a boolean thus, size of 1 bit + wStr.setNum(w); + } layout->addWidget(new QLabel("Interface properties"), 0, 0); layout->addWidget(new QLabel(" "), 1, 0); @@ -16,7 +25,7 @@ InterfacePropertiesWindow::InterfacePropertiesWindow(InterfaceItem *_inter, QWid layout->addWidget(new QLabel("Name :"), 2, 0); layout->addWidget(new QLabel(inter->getName()), 2, 1); layout->addWidget(new QLabel("Width :"), 3, 0); - layout->addWidget(new QLabel(inter->refInter->getWidth()), 3, 1); + layout->addWidget(new QLabel(wStr), 3, 1); layout->addWidget(new QLabel("Direction :"), 4, 0); layout->addWidget(new QLabel(inter->refInter->getDirectionString()), 4, 1); layout->addWidget(new QLabel("Purpose :"), 5, 0);