int _orientation,
ConnectedInterface *_refInter,
AbstractBoxItem* _owner,
- Parameters* _params) {
+ Parameters* _params, bool forceVisible) {
positionRatio = _position;
orientation = _orientation;
refInter = _refInter;
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 {
if(owner->isBoxItem()) {
painter->setPen(QPen(Qt::black,1));
}
- else if(owner->isSourceItem()) {
+ else if(owner->isStimuliItem()) {
painter->setPen(QPen(Qt::darkCyan,1));
}
}
if(owner->isGroupItem()){
painter->drawText(-(w+params->arrowWidth+params->arrowLineLength),-h/2,w,h,Qt::AlignLeft | Qt::TextWordWrap, refInter->getName());
}
- else if((owner->isBoxItem()) || (owner->isSourceItem())){
+ else if((owner->isBoxItem()) || (owner->isStimuliItem())){
painter->drawText(0,-h/2,w,h,Qt::AlignRight | Qt::TextWordWrap, refInter->getName());
}
}
if(owner->isGroupItem()) {
painter->drawText(params->arrowWidth+params->arrowLineLength,-h/2,w,h,Qt::AlignRight | Qt::TextWordWrap, refInter->getName());
}
- else if((owner->isBoxItem()) || (owner->isSourceItem())){
+ else if((owner->isBoxItem()) || (owner->isStimuliItem())){
painter->drawText(-w,-h/2,w,h,Qt::AlignLeft | Qt::TextWordWrap, refInter->getName());
}
}