1 #include "InterfacePropertiesWindow.h"
3 #include "ConnectedInterface.h"
5 InterfacePropertiesWindow::InterfacePropertiesWindow(InterfaceItem *_inter, QWidget *parent) :
10 layout = new QGridLayout;
12 int w = inter->refInter->getWidth();
15 wStr = "invalid_size";
18 if (w == 0) w++; // 0 means a boolean thus, size of 1 bit
22 layout->addWidget(new QLabel("Interface properties"), 0, 0);
23 layout->addWidget(new QLabel(" "), 1, 0);
25 layout->addWidget(new QLabel("Name :"), 2, 0);
26 layout->addWidget(new QLabel(inter->getName()), 2, 1);
27 layout->addWidget(new QLabel("Width :"), 3, 0);
28 layout->addWidget(new QLabel(wStr), 3, 1);
29 layout->addWidget(new QLabel("Direction :"), 4, 0);
30 layout->addWidget(new QLabel(inter->refInter->getDirectionString()), 4, 1);
31 layout->addWidget(new QLabel("Purpose :"), 5, 0);
32 layout->addWidget(new QLabel(inter->refInter->getPurposeString()), 5, 1);
33 layout->addWidget(new QLabel("Type :"), 6, 0);
34 layout->addWidget(new QLabel(inter->refInter->getTypeString()), 6, 1);
36 this->setLayout(layout);