initial commit

This commit is contained in:
itsmattkc
2021-05-16 09:58:57 +10:00
parent a675e0ccbb
commit 8e9859b2b3
21 changed files with 439 additions and 248 deletions
+16 -7
View File
@@ -51,10 +51,9 @@ public:
return graph_;
}
/**
* @brief Sets the graph to view
*/
void SetGraph(NodeGraph* graph);
void SetGraph(NodeGraph *graph, const QVector<void *> &nodes);
void ClearGraph();
/**
* @brief Delete selected nodes from graph (user-friendly/undoable)
@@ -147,17 +146,19 @@ private:
NodeViewScene scene_;
QVector<Node*> selected_nodes_;
MultiUndoCommand* paste_command_;
QVector<Block*> selected_blocks_;
QVector<Node*> selected_nodes_;
enum FilterMode {
kFilterShowAll,
kFilterShowSelectedBlocks
kFilterShowSelective
};
FilterMode filter_mode_;
QVector<void*> filter_nodes_;
double scale_;
bool create_edge_already_exists_;
@@ -200,6 +201,14 @@ private slots:
*/
void OpenSelectedNodeInViewer();
void AddNode(Node *node);
void RemoveNode(Node *node);
void AddEdge(const NodeOutput& output, const NodeInput& input);
void RemoveEdge(const NodeOutput& output, const NodeInput& input);
void AddNodePosition(Node *node, void *relative, const QPointF &pos);
void RemoveNodePosition(Node *node, void *relative);
};
}