X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/4cf57e6db08da791233d75237f62e74bc88dd427..2bdaa0aa3fab52f0808f60d9bbdabcd56d0efae9:/InterfaceItem.cpp?ds=inline diff --git a/InterfaceItem.cpp b/InterfaceItem.cpp index 443cee0..1ef3aae 100644 --- a/InterfaceItem.cpp +++ b/InterfaceItem.cpp @@ -11,7 +11,7 @@ InterfaceItem::InterfaceItem(double _position, int _orientation, ConnectedInterface *_refInter, AbstractBoxItem* _owner, - Parameters* _params) { + Parameters* _params, bool forceVisible) { positionRatio = _position; orientation = _orientation; refInter = _refInter; @@ -24,7 +24,7 @@ InterfaceItem::InterfaceItem(double _position, nameWidth = fmName.width(refInter->getName()); nameHeight = fmName.height(); // by default, only data interface are visible - if (refInter->getPurpose() == AbstractInterface::Data) { + if ((forceVisible) || (refInter->getPurpose() == AbstractInterface::Data)) { visible = true; } else { @@ -118,19 +118,22 @@ void InterfaceItem::paint(QPainter *painter) { } // draw arrows - if(refInter->getDirection() == AbstractInterface::Input) { - painter->drawPath(params->inArrow); + if ( (refInter->getPurpose() == AbstractInterface::Clock) || (refInter->getPurpose() == AbstractInterface::Reset)) { + painter->drawPath(params->clkrstArrow); + } + else if(refInter->getDirection() == AbstractInterface::Input) { + painter->drawPath(params->dataArrowIn); } else if(refInter->getDirection() == AbstractInterface::Output) { - painter->drawPath(params->outArrow); + painter->drawPath(params->dataArrowOut); } else if(refInter->getDirection() == AbstractInterface::InOut) { - painter->drawPath(params->inArrow); - painter->drawPath(params->outArrow); + painter->drawPath(params->dataArrowIn); + painter->drawPath(params->dataArrowOut); } // paint modifier box if needed - - if (refInter->getInputModifier() != NULL) { + ConnectedInterface* connIface = AI_TO_CON(refInter->getAssociatedIface()); + if ((connIface != NULL) && (connIface->getInputModifier() != NULL)) { painter->save(); painter->translate(params->arrowWidth+params->arrowLineLength,0); painter->drawRect(0,-5,10,10);