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

ClipMetadataDisplayer: Update the displayed fields according to the file type.

Right now, the FPS and resolution fields are hidden when an audio file
is displayed.
parent a551b3da
......@@ -43,6 +43,7 @@ ClipMetadataDisplayer::metadataUpdated( const Media *media )
QTime duration;
duration = duration.addSecs( m_watchedClip->lengthSecond() );
updateInterface();
//Duration
m_ui->durationValueLabel->setText( duration.toString( "hh:mm:ss" ) );
//Filename || title
......@@ -73,3 +74,12 @@ ClipMetadataDisplayer::setWatchedClip( const Clip *clip )
this, SLOT( metadataUpdated( const Media*) ) );
}
}
void
ClipMetadataDisplayer::updateInterface()
{
m_ui->fpsLabel->setVisible( m_watchedMedia->hasVideoTrack() );
m_ui->fpsValueLabel->setVisible( m_watchedMedia->hasVideoTrack() );
m_ui->resolutionLabel->setVisible( m_watchedMedia->hasVideoTrack() );
m_ui->resolutionValueLabel->setVisible( m_watchedMedia->hasVideoTrack() );
}
......@@ -40,6 +40,12 @@ class ClipMetadataDisplayer : public QWidget
void setWatchedClip( const Clip *clip );
private:
/**
* \brief Will update the interface depending on the currently displayed
* file type.
*/
void updateInterface();
private:
Ui::ClipMetadataDisplayer *m_ui;
const Clip *m_watchedClip;
......
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