X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/cfe8322b50c9ef08ffbc3e52b0849bca4cd1d0bf..18fecf25efe710631fabecbb9f689c2997fdfe18:/InterfaceItem.cpp diff --git a/InterfaceItem.cpp b/InterfaceItem.cpp index 10158d7..18397f3 100644 --- a/InterfaceItem.cpp +++ b/InterfaceItem.cpp @@ -118,16 +118,29 @@ 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 + 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); + painter->restore(); } + // draw names if(selected) { painter->setPen(QPen(Qt::red,2)); @@ -164,7 +177,9 @@ void InterfaceItem::paint(QPainter *painter) { else if((owner->isBoxItem()) || (owner->isSourceItem())){ painter->drawText(-w,-h/2,w,h,Qt::AlignLeft | Qt::TextWordWrap, refInter->getName()); } - } + } + + painter->restore(); }