Commit 1fb79d25 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Ruler cursor can now be moved even when render isn't started.

parent b1e0e4c4
......@@ -88,7 +88,7 @@ Timeline::Timeline( WorkflowRenderer* renderer, QWidget *parent ) :
m_renderer, SLOT( timelineCursorChanged(qint64) ) );
connect( m_renderer, SIGNAL( frameChanged(qint64,MainWorkflow::FrameChangedReason) ), m_tracksRuler, SLOT( update() ) );
connect( m_tracksRuler, SIGNAL( frameChanged(qint64,MainWorkflow::FrameChangedReason) ),
m_renderer, SLOT( timelineCursorChanged(qint64) ) );
m_renderer, SLOT( rulerCursorChanged(qint64)) );
m_tracksView->createLayout();
}
......
......@@ -69,6 +69,9 @@ WorkflowRenderer::WorkflowRenderer() :
//Workflow part
connect( m_mainWorkflow, SIGNAL( mainWorkflowPaused() ), this, SLOT( mainWorkflowPaused() ) );
connect( m_mainWorkflow, SIGNAL( mainWorkflowUnpaused() ), this, SLOT( mainWorkflowUnpaused() ) );
connect( m_mainWorkflow, SIGNAL( mainWorkflowEndReached() ), this, SLOT( __endReached() ) );
connect( m_mainWorkflow, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ),
this, SLOT( __frameChanged( qint64, MainWorkflow::FrameChangedReason ) ) );
}
......@@ -152,9 +155,6 @@ void WorkflowRenderer::startPreview()
connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( __videoPlaying() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( __videoPaused() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( stopped() ), this, SLOT( __videoStopped() ) );
connect( m_mainWorkflow, SIGNAL( mainWorkflowEndReached() ), this, SLOT( __endReached() ) );
connect( m_mainWorkflow, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ),
this, SLOT( __frameChanged( qint64, MainWorkflow::FrameChangedReason ) ) );
m_mainWorkflow->setFullSpeedRender( false );
m_mainWorkflow->startRender();
......@@ -311,6 +311,11 @@ void WorkflowRenderer::previewWidgetCursorChanged( qint64 newFrame )
m_mainWorkflow->setCurrentFrame( newFrame, MainWorkflow::PreviewCursor );
}
void WorkflowRenderer::rulerCursorChanged( qint64 newFrame )
{
m_mainWorkflow->setCurrentFrame( newFrame, MainWorkflow::RulerCursor );
}
/////////////////////////////////////////////////////////////////////
/////SLOTS :
/////////////////////////////////////////////////////////////////////
......
......@@ -98,6 +98,7 @@ class WorkflowRenderer : public GenericRenderer
virtual void setMedia( Media* ) {}
void mediaUnloaded( const QUuid& ) {}
void timelineCursorChanged( qint64 newFrame );
void rulerCursorChanged( qint64 newFrame );
void previewWidgetCursorChanged( qint64 newFrame );
void __frameChanged( qint64 frame, MainWorkflow::FrameChangedReason );
......
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