[vlmc-devel] PreviewWidget: Remove differentiation between stopped & endReached

Hugo Beauzée-Luyssen git at videolan.org
Sun Feb 16 01:34:58 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Feb 16 02:03:08 2014 +0200| [c5e1fbbe28785b7b7ba387bcd93142e9a61cf32d] | committer: Hugo Beauzée-Luyssen

PreviewWidget: Remove differentiation between stopped & endReached

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c5e1fbbe28785b7b7ba387bcd93142e9a61cf32d
---

 src/Gui/preview/PreviewWidget.cpp   |   13 +------------
 src/Gui/preview/PreviewWidget.h     |    2 --
 src/Gui/preview/ui/PreviewWidget.ui |   11 +----------
 src/Renderer/ClipRenderer.cpp       |    1 -
 src/Renderer/GenericRenderer.h      |    8 --------
 src/Renderer/WorkflowRenderer.cpp   |    4 ++--
 6 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/src/Gui/preview/PreviewWidget.cpp b/src/Gui/preview/PreviewWidget.cpp
index c36ddd4..9dbf7b5 100644
--- a/src/Gui/preview/PreviewWidget.cpp
+++ b/src/Gui/preview/PreviewWidget.cpp
@@ -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() ) );
@@ -162,17 +161,6 @@ PreviewWidget::updateVolume( int 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()
 {
     if ( m_previewStopped == false )
@@ -199,6 +187,7 @@ PreviewWidget::stop()
     {
         m_previewStopped = true;
         m_renderer->stop();
+        m_ui->pushButtonPlay->setIcon( QIcon( ":/images/play" ) );
     }
 }
 
diff --git a/src/Gui/preview/PreviewWidget.h b/src/Gui/preview/PreviewWidget.h
index c2095a5..786414d 100644
--- a/src/Gui/preview/PreviewWidget.h
+++ b/src/Gui/preview/PreviewWidget.h
@@ -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();
diff --git a/src/Gui/preview/ui/PreviewWidget.ui b/src/Gui/preview/ui/PreviewWidget.ui
index 058c234..874f159 100644
--- a/src/Gui/preview/ui/PreviewWidget.ui
+++ b/src/Gui/preview/ui/PreviewWidget.ui
@@ -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>
diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index c249f63..054015b 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -283,5 +283,4 @@ ClipRenderer::__endReached()
     m_isRendering = false;
     if ( m_mediaChanged == true )
         m_clipLoaded = false;
-    emit endReached();
 }
diff --git a/src/Renderer/GenericRenderer.h b/src/Renderer/GenericRenderer.h
index ea32b52..ec85f01 100644
--- a/src/Renderer/GenericRenderer.h
+++ b/src/Renderer/GenericRenderer.h
@@ -226,14 +226,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.
      *
      *  The cause may vary depending on the underlying renderer, though this will
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 1dbb8bf..8834b4b 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -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



More information about the Vlmc-devel mailing list