reimplemented node positioning and deleting
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user