MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / move

Method move

QtNodeEditor/src/ConnectionGraphicsObject.cpp:99–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99void
100ConnectionGraphicsObject::
101move()
102{
103 for(PortType portType: { PortType::In, PortType::Out } )
104 {
105 if (auto node = _connection.getNode(portType))
106 {
107 auto const &nodeGraphics = node->nodeGraphicsObject();
108
109 auto const &nodeGeom = node->nodeGeometry();
110
111 QPointF scenePos =
112 nodeGeom.portScenePosition(_connection.getPortIndex(portType),
113 portType,
114 nodeGraphics.sceneTransform());
115
116 QTransform sceneTransform = this->sceneTransform();
117
118 QPointF connectionPos = sceneTransform.inverted().map(scenePos);
119
120 _connection.connectionGeometry().setEndPoint(portType,
121 connectionPos);
122
123 _connection.connectionGraphicsObject().setGeometryChanged();
124 _connection.connectionGraphicsObject().update();
125 }
126 }
127
128}
129
130void ConnectionGraphicsObject::lock(bool locked)
131{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected