Commit f01a7cba authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Refactoring is complete at build time.

Synchro should work, from a theorical point of view.
parent 570cbf5d
......@@ -50,6 +50,7 @@ MainWorkflow::MainWorkflow( int trackCount ) :
TrackWorkflow::TrackType trackType = (i == 0 ? TrackWorkflow::Video : TrackWorkflow::Audio );
m_tracks[i] = new TrackHandler( trackCount, trackType );
connect( m_tracks[i], SIGNAL( tracksPaused() ), this, SLOT( tracksPaused() ) );
connect( m_tracks[i], SIGNAL( allTracksRenderCompleted() ), this, SLOT( tracksRenderCompleted() ) );
}
m_outputBuffers = new OutputBuffers;
}
......@@ -184,12 +185,17 @@ void MainWorkflow::moveClip( const QUuid& clipUuid, unsigned int oldTr
unsigned int newTrack, qint64 startingFrame,
TrackWorkflow::TrackType trackType, bool undoRedoCommand /*= false*/ )
{
m_tracks[trackType]->moveClip( clipUuid, oldTrack, newTrack, startingFrame, undoRedoCommand );
m_tracks[trackType]->moveClip( clipUuid, oldTrack, newTrack, startingFrame );
computeLength();
if ( undoRedoCommand == true )
{
emit clipMoved( clipUuid, newTrack, startingFrame, trackType );
}
}
Clip* MainWorkflow::removeClip( const QUuid& uuid, unsigned int trackId, TrackWorkflow::TrackType trackType )
{
emit clipRemoved( uuid, trackId, trackType );
return m_tracks[trackType]->removeClip( uuid, trackId );
}
......
......@@ -161,8 +161,8 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
void mainWorkflowPaused();
void mainWorkflowUnpaused();
void clipAdded( Clip*, unsigned int, qint64, TrackWorkflow::TrackType );
void clipRemoved( QUuid, unsigned int );
void clipMoved( QUuid, unsigned int, qint64 );
void clipRemoved( QUuid, unsigned int, TrackWorkflow::TrackType );
void clipMoved( QUuid, unsigned int, qint64, TrackWorkflow::TrackType );
void cleared();
};
......
......@@ -168,7 +168,7 @@ void TrackHandler::stop()
}
void TrackHandler::moveClip(const QUuid& clipUuid, unsigned int oldTrack,
unsigned int newTrack, qint64 startingFrame, bool undoRedoCommand /*= false*/ )
unsigned int newTrack, qint64 startingFrame )
{
Q_ASSERT( newTrack < m_trackCount && oldTrack < m_trackCount );
......@@ -192,12 +192,6 @@ void TrackHandler::moveClip(const QUuid& clipUuid, unsigned int oldTrack,
activateTrack( newTrack );
}
computeLength();
if ( undoRedoCommand == true )
{
//TODO
//FIXME
//emit clipMoved( clipUuid, newTrack, startingFrame );
}
}
Clip* TrackHandler::removeClip( const QUuid& uuid, unsigned int trackId )
......@@ -207,8 +201,6 @@ Clip* TrackHandler::removeClip( const QUuid& uuid, unsigned int trackId )
Clip* clip = m_tracks[trackId]->removeClip( uuid );
computeLength();
activateTrack( trackId );
//FIXME
//emit clipRemoved( uuid, trackId );
return clip;
}
......
......@@ -49,8 +49,7 @@ class TrackHandler : public QObject
qint64 getClipPosition( const QUuid& uuid, unsigned int trackId ) const;
void stop();
void moveClip( const QUuid& clipUuid, unsigned int oldTrack,
unsigned int newTrack, qint64 startingFrame,
bool undoRedoCommand = false );
unsigned int newTrack, qint64 startingFrame );
Clip* removeClip( const QUuid& uuid, unsigned int trackId );
void muteTrack( unsigned int trackId );
void unmuteTrack( unsigned int trackId );
......
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