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

PreviewWidget: Remove differentiation between stopped & endReached

parent 6be90ad2
...@@ -87,7 +87,6 @@ PreviewWidget::setRenderer( GenericRenderer *renderer ) ...@@ -87,7 +87,6 @@ PreviewWidget::setRenderer( GenericRenderer *renderer )
connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) ); connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) );
connect( m_renderer, SIGNAL( frameChanged(qint64, Vlmc::FrameChangedReason) ), connect( m_renderer, SIGNAL( frameChanged(qint64, Vlmc::FrameChangedReason) ),
this, SLOT( frameChanged(qint64, Vlmc::FrameChangedReason ) ) ); this, SLOT( frameChanged(qint64, Vlmc::FrameChangedReason ) ) );
connect( m_renderer, SIGNAL( endReached() ), this, SLOT( endReached() ) );
connect( m_ui->rulerWidget, SIGNAL( frameChanged(qint64, Vlmc::FrameChangedReason) ), connect( m_ui->rulerWidget, SIGNAL( frameChanged(qint64, Vlmc::FrameChangedReason) ),
m_renderer, SLOT( previewWidgetCursorChanged(qint64) ) ); m_renderer, SLOT( previewWidgetCursorChanged(qint64) ) );
connect( m_renderer, SIGNAL( error() ), this, SLOT( error() ) ); connect( m_renderer, SIGNAL( error() ), this, SLOT( error() ) );
...@@ -161,17 +160,6 @@ PreviewWidget::updateVolume( int volume ) ...@@ -161,17 +160,6 @@ PreviewWidget::updateVolume( int volume )
m_renderer->setVolume( volume ); m_renderer->setVolume( volume );
} }
void
PreviewWidget::endReached()
{
m_previewStopped = true;
m_ui->pushButtonPlay->setIcon( QIcon( ":/images/play" ) );
// Set the black background
m_ui->renderWidget->setPalette( m_videoPalette );
}
void void
PreviewWidget::on_pushButtonNextFrame_clicked() PreviewWidget::on_pushButtonNextFrame_clicked()
{ {
...@@ -199,6 +187,7 @@ PreviewWidget::stop() ...@@ -199,6 +187,7 @@ PreviewWidget::stop()
{ {
m_previewStopped = true; m_previewStopped = true;
m_renderer->stop(); m_renderer->stop();
m_ui->pushButtonPlay->setIcon( QIcon( ":/images/play" ) );
} }
} }
......
...@@ -49,7 +49,6 @@ private: ...@@ -49,7 +49,6 @@ private:
GenericRenderer* m_renderer; GenericRenderer* m_renderer;
bool m_endReached; bool m_endReached;
bool m_previewStopped; bool m_previewStopped;
QPalette m_videoPalette;
protected: protected:
virtual void changeEvent( QEvent *e ); virtual void changeEvent( QEvent *e );
...@@ -68,7 +67,6 @@ private slots: ...@@ -68,7 +67,6 @@ private slots:
void videoStopped(); void videoStopped();
void volumeChanged(); void volumeChanged();
void updateVolume( int ); void updateVolume( int );
void endReached();
void markerStartClicked(); void markerStartClicked();
void markerStopClicked(); void markerStopClicked();
void createNewClipFromMarkers(); void createNewClipFromMarkers();
......
...@@ -29,16 +29,7 @@ ...@@ -29,16 +29,7 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
......
...@@ -283,5 +283,4 @@ ClipRenderer::__endReached() ...@@ -283,5 +283,4 @@ ClipRenderer::__endReached()
m_isRendering = false; m_isRendering = false;
if ( m_mediaChanged == true ) if ( m_mediaChanged == true )
m_clipLoaded = false; m_clipLoaded = false;
emit endReached();
} }
...@@ -225,14 +225,6 @@ signals: ...@@ -225,14 +225,6 @@ signals:
*/ */
void frameChanged( qint64 newFrame, void frameChanged( qint64 newFrame,
Vlmc::FrameChangedReason reason ); Vlmc::FrameChangedReason reason );
/**
* \brief Emmited when render end is reached.
*
* This should be emmited just before stopped
* \sa stopped();
*/
void endReached();
/** /**
* \brief Emited when something went wrong with the render. * \brief Emited when something went wrong with the render.
* *
......
...@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer() ...@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer()
connect( m_mediaPlayer, SIGNAL( paused() ), this, SIGNAL( paused() ), Qt::DirectConnection ); connect( m_mediaPlayer, SIGNAL( paused() ), this, SIGNAL( paused() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( errorEncountered() ), this, SLOT( errorEncountered() ) ); connect( m_mediaPlayer, SIGNAL( errorEncountered() ), this, SLOT( errorEncountered() ) );
//FIXME:: check if this doesn't require Qt::QueuedConnection //FIXME:: check if this doesn't require Qt::QueuedConnection
connect( m_mediaPlayer, SIGNAL( stopped() ), this, SIGNAL( endReached() ) ); connect( m_mediaPlayer, SIGNAL( stopped() ), this, SIGNAL( stopped() ) );
} }
WorkflowRenderer::~WorkflowRenderer() WorkflowRenderer::~WorkflowRenderer()
...@@ -452,8 +452,8 @@ WorkflowRenderer::loadProject( const QDomElement &project ) ...@@ -452,8 +452,8 @@ WorkflowRenderer::loadProject( const QDomElement &project )
void void
WorkflowRenderer::__endReached() WorkflowRenderer::__endReached()
{ {
//FIXME: Is this necessary?!
stop(); stop();
emit endReached();
} }
void void
......
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