20 setZValue(errorMarkZValue);
21 this->errorMarkPath = QPainterPath();
30 this->nodes.insert(node);
33 this->cables.insert(cable);
43 QPainterPath errorMarkPath = getErrorMarkPath();
44 QRectF r = errorMarkPath.boundingRect();
49 return r.toAlignedRect();
66 QPainterPath path = getErrorMarkPath();
69 painter->fillPath(path, colors.
errorMark());
77 QGraphicsScene *itemScene = scene();
80 this->prepareGeometryChange();
81 itemScene->removeItem(
this);
91 this->prepareGeometryChange();
99 QPainterPath nodeSimplifiedOutline;
105 if (!typecastPortRect.isNull())
107 QPainterPath typecastPath;
108 typecastPath.addRoundedRect( typecastPortRect.adjusted(-0.5*markWidth, -0.5*markWidth, 0.5*markWidth, 0.5*markWidth),
109 cornerRadius, cornerRadius );
110 typecastPath.translate( typecastPort->scenePos() );
111 path = path.united( typecastPath );
118 if (!nodeOuterFrameRect.isNull())
120 nodeSimplifiedOutline.addRoundedRect( nodeOuterFrameRect.adjusted(-markWidth, -markWidth, markWidth, markWidth),
121 cornerRadius, cornerRadius );
124 path = path.united( nodeSimplifiedOutline );
131 QPainterPathStroker stroker;
132 stroker.setWidth(markWidth);
133 QPainterPath cableCurve = stroker.createStroke( cable->
getCablePath() );
134 path = path.united( cableCurve );
137 this->errorMarkPath = path;
143 QPainterPath VuoErrorMark::getErrorMarkPath()
const
145 return this->errorMarkPath;