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
+2 -9
View File
@@ -42,6 +42,8 @@ public:
void SelectAll();
void DeselectAll();
void DeleteSelected();
/**
* @brief Retrieve the graphical widget corresponding to a specific Node
*
@@ -54,22 +56,15 @@ public:
* in this view/scene), this function returns nullptr.
*/
NodeViewItem* NodeToUIObject(Node* n);
NodeViewEdge *EdgeToUIObject(Node *output, const NodeInput &input);
QVector<Node *> GetSelectedNodes() const;
QVector<NodeViewItem*> GetSelectedItems() const;
QVector<NodeViewEdge*> GetSelectedEdges() const;
const QHash<Node*, NodeViewItem*>& item_map() const
{
return item_map_;
}
const QVector<NodeViewEdge*>& edges() const
{
return edges_;
}
Qt::Orientation GetFlowOrientation() const;
NodeViewCommon::FlowDirection GetFlowDirection() const;
@@ -96,8 +91,6 @@ private:
QHash<Node*, NodeViewItem*> item_map_;
QVector<NodeViewEdge*> edges_;
NodeGraph* graph_;
NodeViewCommon::FlowDirection direction_;