timeline/various: implemented block copy/paste

Implemented the ability to copy/paste blocks/clips in the timeline. This did
require some large scale changes and reworking of the copy/paste system
introduced a few commits ago, but should be largely functional now.
This commit is contained in:
itsmattkc
2020-03-31 02:19:05 +11:00
parent 67d8ad571d
commit 2bda306866
35 changed files with 466 additions and 233 deletions
+6 -4
View File
@@ -50,7 +50,7 @@ Node::~Node()
}
}
void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_ptrs, QList<NodeInput::SerializedConnection>& input_connections, QList<NodeParam::FootageConnection>& footage_connections, const QAtomicInt* cancelled)
void Node::Load(QXmlStreamReader *reader, XMLNodeData& xml_node_data, const QAtomicInt* cancelled)
{
while (XMLReadNextStartElement(reader)) {
if (cancelled && *cancelled) {
@@ -80,7 +80,7 @@ void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_
continue;
}
param->Load(reader, output_ptrs, input_connections, footage_connections, cancelled);
param->Load(reader, xml_node_data, cancelled);
} else {
reader->skipCurrentElement();
}
@@ -89,9 +89,11 @@ void Node::Load(QXmlStreamReader *reader, QHash<quintptr, NodeOutput *> &output_
void Node::Save(QXmlStreamWriter *writer, const QString &custom_name) const
{
writer->writeStartElement(custom_name.isEmpty() ? "node" : custom_name);
writer->writeStartElement(custom_name.isEmpty() ? QStringLiteral("node") : custom_name);
writer->writeAttribute("id", id());
writer->writeAttribute(QStringLiteral("id"), id());
writer->writeAttribute(QStringLiteral("ptr"), QString::number(reinterpret_cast<quintptr>(this)));
foreach (NodeParam* param, parameters()) {
param->Save(writer);