reimplemented node positioning and deleting

This commit is contained in:
itsmattkc
2021-11-17 12:09:41 -08:00
parent b850a550bd
commit a6af473f53
13 changed files with 255 additions and 137 deletions
+6 -6
View File
@@ -45,16 +45,11 @@ class NodeViewItem : public QObject, public QGraphicsRectItem
{
Q_OBJECT
public:
NodeViewItem(QGraphicsItem* parent = nullptr);
NodeViewItem(Node* n, Node *context, QGraphicsItem* parent = nullptr);
QPointF GetNodePosition() const;
void SetNodePosition(const QPointF& pos);
/**
* @brief Set the Node to correspond to this widget
*/
void SetNode(Node* n, Node *context);
/**
* @brief Get currently attached node
*/
@@ -63,6 +58,11 @@ public:
return node_;
}
Node *GetContext() const
{
return context_;
}
/**
* @brief Get expanded state
*/