X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/dd016ff4a3d4c5d4f90277637f86cdc31a7a91f8..d43174d0eb3d293b3bb5fbe76662241134e74d0d:/InterfaceItem.cpp?ds=sidebyside diff --git a/InterfaceItem.cpp b/InterfaceItem.cpp index 552e159..0e87a19 100644 --- a/InterfaceItem.cpp +++ b/InterfaceItem.cpp @@ -19,10 +19,9 @@ InterfaceItem::InterfaceItem(double _position, // CAUTION : the owner must add explicitely this item to its interface, calling addInterface() owner = _owner; params = _params; - selected = false; - name = refInter->getName(); + selected = false; QFontMetrics fmName(params->defaultIfaceFont); - nameWidth = fmName.width(name); + nameWidth = fmName.width(refInter->getName()); nameHeight = fmName.height(); // by default, only data interface are visible if (refInter->getPurpose() == AbstractInterface::Data) { @@ -42,6 +41,10 @@ InterfaceItem::InterfaceItem(){ this->id = counter++; } +QString InterfaceItem::getName() { + return refInter->getName(); +} + /* boundingRect() : give the bounding rect in the blockitem coord. system */ QRectF InterfaceItem::boundingRect() const { @@ -364,11 +367,11 @@ void InterfaceItem::unconnectTo(InterfaceItem *iface) iface->refInter->connectFrom(NULL); } if(iface->refInter->getConnectedTo().contains(refInter)){ - cout << "abnormal case while removing iface conn from " << qPrintable(name) << " to " << qPrintable(iface->name) << endl; + cout << "abnormal case while removing iface conn from " << qPrintable(refInter->getName()) << " to " << qPrintable(iface->refInter->getName()) << endl; iface->refInter->removeConnectedTo(refInter); } if(refInter->getConnectedFrom() == iface->refInter) { - cout << "abnormal case while removing iface conn from " << qPrintable(name) << " to " << qPrintable(iface->name) << endl; + cout << "abnormal case while removing iface conn from " << qPrintable(refInter->getName()) << " to " << qPrintable(iface->refInter->getName()) << endl; refInter->connectFrom(NULL); } if(refInter->getConnectedTo().contains(iface->refInter)){