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

Removed anything related to snapshot preview in the render widget.

This was ugly and unfunctionnal, we will eventually come with something
better.
parent 5559ae51
......@@ -60,8 +60,6 @@ PreviewWidget::PreviewWidget( GenericRenderer* genericRenderer, QWidget *parent
m_ui->lcdNumber, SLOT( setTime(int,int,int,int) ) );
m_renderer->setRenderWidget( m_ui->renderWidget );
m_renderer->setPreviewLabel( m_ui->previewLabel );
m_ui->previewLabel->hide();
connect( m_renderer, SIGNAL( stopped() ), this, SLOT( videoStopped() ) );
connect( m_renderer, SIGNAL( paused() ), this, SLOT( videoPaused() ) );
......
......@@ -32,7 +32,7 @@
<property name="spacing">
<number>0</number>
</property>
<item row="3" column="0">
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButtonPreviousFrame">
......@@ -307,30 +307,17 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QWidget" name="renderWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="previewLabel">
<widget class="QWidget" name="renderWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="PreviewRuler" name="rulerWidget" native="true">
<property name="minimumSize">
<size>
......
......@@ -57,21 +57,13 @@ ClipRenderer::setMedia( Media *media )
{
m_selectedMedia = media;
if ( media == NULL || media->getLengthMS() == 0 )
{
m_previewLabel->clear();
return ;
}
m_begin = 0;
m_end = media->getNbFrames();
if ( m_isRendering == true )
m_mediaChanged = true;
else
{
setSnapshotVisibility( true );
m_previewLabel->setPixmap( media->getSnapshot().scaled( m_previewLabel->size(),
Qt::KeepAspectRatio ) );
m_clipLoaded = false;
}
}
void
......@@ -80,7 +72,6 @@ ClipRenderer::setClip( Clip *clip )
if ( clip == NULL || clip->getLength() == 0 )
{
m_selectedMedia = NULL;
m_previewLabel->clear();
return ;
}
m_selectedMedia = clip->getParent();
......@@ -89,13 +80,7 @@ ClipRenderer::setClip( Clip *clip )
if ( m_isRendering == true )
m_mediaChanged = true;
else
{
setSnapshotVisibility( true );
m_previewLabel->setPixmap(
clip->getParent()->getSnapshot().scaled( m_previewLabel->size(),
Qt::KeepAspectRatio ) );
m_clipLoaded = false;
}
}
void
......@@ -103,7 +88,6 @@ ClipRenderer::startPreview()
{
if ( m_selectedMedia == NULL )
return ;
setSnapshotVisibility( false );
//If an old media is found, we delete it, and disconnect
if ( m_vlcMedia != NULL )
......@@ -212,13 +196,6 @@ ClipRenderer::mediaUnloaded( const QUuid& uuid )
}
}
void
ClipRenderer::setSnapshotVisibility( bool val )
{
m_previewLabel->setVisible( val );
m_renderWidget->setVisible( !val );
}
qint64
ClipRenderer::getCurrentFrame() const
{
......
......@@ -57,7 +57,6 @@ public:
private:
void startPreview();
void setSnapshotVisibility( bool val );
private:
bool m_clipLoaded;
......
......@@ -64,18 +64,6 @@ public:
m_mediaPlayer->setDrawable( renderWidget->winId() );
m_renderWidget = renderWidget;
}
/**
* \brief Sets the label on which a preview will be rendered.
*
* A preview is basically a snapshot of the video, to know what's about to beeing
* rendered.
* \param previewLabel The QLabel to use for print the preview.
* \sa setRenderWidget( QWidget* )
*/
void setPreviewLabel( QLabel* previewLabel )
{
m_previewLabel = previewLabel;
}
/**
* \brief Play or pause the media.
*
......@@ -196,12 +184,6 @@ protected:
* \sa setRenderWidget( QWidget* );
*/
QWidget* m_renderWidget;
/**
* \brief The QLabel used for displaying preview
* \sa setPreviewLabel();
*/
QLabel* m_previewLabel;
public slots:
/**
......
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