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

Method restore

QtNodeEditor/src/Node.cpp:69–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69void
70Node::
71restore(QJsonObject const& json)
72{
73 _uid = QUuid(json["id"].toString());
74 _nodeDataModel->restore(json["model"].toObject());
75
76 double width = _nodeGraphicsObject->boundingRect().width();
77
78 QJsonObject positionJson = json["position"].toObject();
79 QPointF point(positionJson["x"].toDouble() - width*0.5,
80 positionJson["y"].toDouble());
81 _nodeGraphicsObject->setPos(point);
82
83}
84
85
86QUuid

Callers

nothing calls this directly

Calls 1

restoreMethod · 0.45

Tested by

no test coverage detected