QFontMetrics fmId(params->defaultBlockFont);
nameWidth = fmId.width(refBlock->getName());
nameHeight = fmId.height();
- nameMargin = 10;
+ nameMargin = 5;
ifaceMargin = 10;
// the six following values will be override in subclass constructors
bool AbstractBoxItem::isGroupItem() {
return false;
}
+
+bool AbstractBoxItem::isSourceItem() {
+ return false;
+}
+
void AbstractBoxItem::setRstClkVisible(bool b) {
rstClkVisible = b;
foreach(InterfaceItem* ifaceItem, interfaces) {
int orientation = Parameters::West;
foreach(AbstractInterface *inter, refBlock->getInterfaces()){
-
+
+ /* NB: create InterfaceItem for every interfaces, even if they do not have a graphical representation
+ It will allow to save them in the XML project file and thus to create their equivalent
+ in the graph while the file is loaded.
+ */
InterfaceItem *item;
if(inter->getDirection() == AbstractInterface::Input){
orientation = Parameters::West;
orientation = Parameters::North;
}
item = new InterfaceItem(0.0 , orientation, (ConnectedInterface *)inter, this, params);
- interfaces.append(item);
- }
+ interfaces.append(item);
+ }
}
InterfaceItem* AbstractBoxItem::searchInterfaceByName(QString name) {