40 #include <QGraphicsSceneHoverEvent>
52 using namespace YACS::ENGINE;
53 using namespace YACS::HMI;
56 QString label,
Subject *subject)
81 parent->removeChildFromList(
this);
88 prepareGeometryChange();
92 QGraphicsItem::update();
100 prepareGeometryChange();
103 QGraphicsItem::update();
128 DEBTRACE(
"SceneNodeItem::addProgressItem ");
141 const QStyleOptionGraphicsItem *option,
249 return "yacs/subjectNode";
254 DEBTRACE(
"SceneNodeItem::mousePressEvent " <<
_label.toStdString());
288 QPointF oldPos = pos();
289 QPointF aPos = oldPos +
event->scenePos() -
event->lastScenePos();
292 if (aPos.x() > oldPos.x())
_blocX =
false;
293 if (aPos.y() > oldPos.y())
_blocY =
false;
299 if ( aPos.y() < bloc->getHeaderBottom() )
301 aPos.setY(bloc->getHeaderBottom());
305 bloc->collisionResolv(
this, oldPos);
312 DEBTRACE(
"SceneNodeItem::mouseDoubleClickEvent");
322 QPointF oldPos = pos();
331 bloc->collisionResolv(
this, oldPos);
363 DEBTRACE(
"SceneNodeItem::setExecState " << execState);
370 DEBTRACE(
"SceneNodeItem::getHeaderLabel");
377 && (soi = dynamic_cast<SceneObserverItem*>(
_parent))
378 && (sswi = dynamic_cast<SubjectSwitch*>(soi->
getSubject())))
384 if (idcase == Switch::ID_FOR_DEFAULT_NODE)
390 extLabel += caseid.str().c_str();
401 std::list<SubjectControlLink*> lscl=
dynamic_cast<SubjectNode*
>(
_subject)->getSubjectControlLinks();
402 for (std::list<SubjectControlLink*>::const_iterator it = lscl.begin(); it != lscl.end(); ++it)
416 if (
SceneItem *sci = dynamic_cast<SceneItem*>(child))
427 if (
SceneItem *sci = dynamic_cast<SceneItem*>(child))
429 sci->shrinkExpandLink(se);
442 vector<pair<OutPort *, InPort *> > outScope = listLeaving;
443 vector<pair<InPort *, OutPort *> >::iterator it1;
444 for (it1 = listIncoming.begin(); it1 != listIncoming.end(); ++it1)
446 pair<OutPort *, InPort *> outin = pair<OutPort *, InPort *>((*it1).second, (*it1).first);
447 outScope.push_back(outin);
449 vector<pair<OutPort*, InPort*> >::const_iterator it = outScope.begin();
450 for( ; it != outScope.end(); ++it)