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 )
connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) );
connect( m_renderer, SIGNAL( 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) ),
m_renderer, SLOT( previewWidgetCursorChanged(qint64) ) );
connect( m_renderer, SIGNAL( error() ), this, SLOT( error() ) );
......@@ -161,17 +160,6 @@ PreviewWidget::updateVolume( int 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
PreviewWidget::on_pushButtonNextFrame_clicked()
{
......@@ -199,6 +187,7 @@ PreviewWidget::stop()
{
m_previewStopped = true;
m_renderer->stop();
m_ui->pushButtonPlay->setIcon( QIcon( ":/images/play" ) );
}
}
......
......@@ -49,7 +49,6 @@ private:
GenericRenderer* m_renderer;
bool m_endReached;
bool m_previewStopped;
QPalette m_videoPalette;
protected:
virtual void changeEvent( QEvent *e );
......@@ -68,7 +67,6 @@ private slots:
void videoStopped();
void volumeChanged();
void updateVolume( int );
void endReached();
void markerStartClicked();
void markerStopClicked();
void createNewClipFromMarkers();
......
......@@ -29,16 +29,7 @@
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
......
......@@ -283,5 +283,4 @@ ClipRenderer::__endReached()
m_isRendering = false;
if ( m_mediaChanged == true )
m_clipLoaded = false;
emit endReached();
}
......@@ -225,14 +225,6 @@ signals:
*/
void frameChanged( qint64 newFrame,
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.
*
......
......@@ -74,7 +74,7 @@ WorkflowRenderer::initializeRenderer()
connect( m_mediaPlayer, SIGNAL( paused() ), this, SIGNAL( paused() ), Qt::DirectConnection );
connect( m_mediaPlayer, SIGNAL( errorEncountered() ), this, SLOT( errorEncountered() ) );
//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()
......@@ -452,8 +452,8 @@ WorkflowRenderer::loadProject( const QDomElement &project )
void
WorkflowRenderer::__endReached()
{
//FIXME: Is this necessary?!
stop();
emit endReached();
}
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