X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/1df76ccc8673a2760af17b88ebfba4bfd7f5c11d..0d3590739ff5a4ca9e87c052ac142f5d1d3a68ab:/AbstractBoxItem.cpp diff --git a/AbstractBoxItem.cpp b/AbstractBoxItem.cpp index a05247f..8ef607a 100644 --- a/AbstractBoxItem.cpp +++ b/AbstractBoxItem.cpp @@ -20,7 +20,7 @@ AbstractBoxItem:: AbstractBoxItem(AbstractBlock *_refBlock, Dispatcher *_dispat 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 @@ -86,6 +86,11 @@ bool AbstractBoxItem::isBoxItem() { bool AbstractBoxItem::isGroupItem() { return false; } + +bool AbstractBoxItem::isSourceItem() { + return false; +} + void AbstractBoxItem::setRstClkVisible(bool b) { rstClkVisible = b; foreach(InterfaceItem* ifaceItem, interfaces) { @@ -128,7 +133,11 @@ void AbstractBoxItem::initInterfaces() { 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; @@ -138,8 +147,8 @@ void AbstractBoxItem::initInterfaces() { orientation = Parameters::North; } item = new InterfaceItem(0.0 , orientation, (ConnectedInterface *)inter, this, params); - interfaces.append(item); - } + interfaces.append(item); + } } InterfaceItem* AbstractBoxItem::searchInterfaceByName(QString name) {