added some more timeline functions

This commit is contained in:
itsmattkc
2019-08-13 21:50:39 +10:00
parent 737442e513
commit 4f4737a395
21 changed files with 291 additions and 87 deletions
+15 -3
View File
@@ -49,14 +49,26 @@ public:
* @brief Adds a node to this graph and all nodes connected to its inputs
*
* Adds the Node to the graph and runs through its inputs adding all of its dependencies (and all of their
* dependencies and so forth).
* dependencies and so forth). The graph takes ownershi of all Nodes added through this process.
*/
void AddNodeWithDependencies(Node* node);
/**
* @brief Removes a Node from the graph BUT doesn't destroy it. Ownership is returned to the caller.
* @brief Removes a Node from the graph BUT doesn't destroy it. Ownership is passed to `new_parent`.
*/
void TakeNode(Node* node);
void TakeNode(Node* node, QObject* new_parent = nullptr);
/**
* @brief Removes a Node from the graph and its dependencies (ONLY if the dependencies are exclusive to this Node).
*
* Returns a list of all Nodes that were removed in this process (except the Node used as a parameter)
*
* Only dependencies that are exclusively dependencies of this Node are removed. If a dependency Node is also
* used as the dependency of another Node, it is not removed and not returned in the list.
*
* Ownership of all Nodes is passed to `new_parent`.
*/
QList<Node*> TakeNodeWithItsDependencies(Node* node, QObject* new_parent = nullptr);
/**
* @brief Retrieve a complete list of the nodes belonging to this graph