Commit 97346006 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ClipWorkflow: Let the clip workflow save themselves.

parent f8db26d6
......@@ -315,3 +315,12 @@ ClipWorkflow::shouldRender() const
m_state != ClipWorkflow::Stopped &&
m_state != ClipWorkflow::Stopping );
}
void
ClipWorkflow::save( QXmlStreamWriter &project ) const
{
project.writeAttribute( "uuid", m_clipHelper->clip()->fullId() );
project.writeAttribute( "begin", QString::number( m_clipHelper->begin() ) );
project.writeAttribute( "end", QString::number( m_clipHelper->end() ) );
project.writeAttribute( "helper", m_clipHelper->uuid().toString() );
}
......@@ -28,6 +28,7 @@
#include <QObject>
#include <QUuid>
#include <QXmlStreamWriter>
class QMutex;
class QReadWriteLock;
......@@ -196,6 +197,8 @@ class ClipWorkflow : public QObject
*/
void stopRenderer();
void save( QXmlStreamWriter& project ) const;
private:
void setState( State state );
void adjustBegin();
......
......@@ -419,11 +419,8 @@ void TrackWorkflow::save( QXmlStreamWriter& project ) const
for ( ; it != end ; ++it )
{
project.writeStartElement( "clip" );
project.writeAttribute( "uuid", it.value()->clip()->fullId() );
project.writeAttribute( "startFrame", QString::number( it.key() ) );
project.writeAttribute( "begin", QString::number( it.value()->getClipHelper()->begin() ) );
project.writeAttribute( "end", QString::number( it.value()->getClipHelper()->end() ) );
project.writeAttribute( "helper", it.value()->getClipHelper()->uuid().toString() );
it.value()->save( project );
project.writeEndElement();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment