sequence is now a node graph

This commit is contained in:
itsmattkc
2019-05-11 11:38:18 +10:00
parent 3fe0d1cda5
commit f796c2b379
9 changed files with 179 additions and 94 deletions
+12 -6
View File
@@ -1,20 +1,26 @@
#include "nodegraph.h"
#include <QChildEvent>
#include <QDebug>
NodeGraph::NodeGraph() :
output_node_(nullptr)
NodeGraph::NodeGraph()
{
}
void NodeGraph::AddNode(NodePtr node)
void NodeGraph::childEvent(QChildEvent *event)
{
nodes_.append(node);
emit NodeGraphChanged();
if (event->type() == QEvent::ChildAdded || event->type() == QEvent::ChildRemoved) {
emit NodeGraphChanged();
}
}
void NodeGraph::SetOutputNode(Node *node)
{
output_node_ = node;
}
Node *NodeGraph::OutputNode()
{
return output_node_.get();
return output_node_;
}