MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / borderPoint_

Method borderPoint_

src/openms_gui/source/VISUAL/TOPPASEdge.cpp:264–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262
263
264 QPointF TOPPASEdge::borderPoint_(bool atTargetVertex) const
265 {
266 if (!to_ || !from_)
267 {
268 return QPointF(); // both ends need to be fixed; otherwise we have no input/output slots assigned anyways
269 }
270 const TOPPASVertex* to = (atTargetVertex ? to_ : from_);
271 const TOPPASVertex* from = (!atTargetVertex ? to_ : from_);
272
273 const QPointF fromP = mapFromScene(from->scenePos());
274 QRectF target_boundings = mapFromItem(to, to->shape()).boundingRect();
275
276 return GUIHelpers::intersectionPoint(target_boundings, fromP);
277 }
278
279 void TOPPASEdge::setHoverPos(const QPointF& pos)
280 {

Callers

nothing calls this directly

Calls 2

boundingRectMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected