Commit 432a2a91 authored by Clement CHAVANCE's avatar Clement CHAVANCE Committed by Clement CHAVANCE
Browse files

Clip information are now correctly displayed in the import Window

parent b1bf5e97
......@@ -5,6 +5,7 @@
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Thomas Boquet <thomas.boquet@gmail.com>
* Clement CHAVANCE <chavance.c@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -79,7 +80,11 @@ void ImportMediaListController::addClip( Clip* clip )
connect( cell, SIGNAL( cellSelected( const QUuid& ) ), this, SLOT( clipSelection( const QUuid& ) ) );
connect( cell, SIGNAL( cellDeleted( const QUuid& ) ), this, SLOT( clipDeletion( const QUuid& ) ) );
cell->setTitle( clip->getParent()->getFileName() + " " + m_mediaCellList->size() + 1 );
QString size;
size.setNum( m_mediaCellList->size() + 1 );
cell->setTitle( clip->getParent()->getFileName() + "_" + size );
cell->setThumbnail( clip->getParent()->getSnapshot() );
addCell( cell );
......
......@@ -5,6 +5,7 @@
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Thomas Boquet <thomas.boquet@gmail.com>
* Clement CHAVANCE <chavance.c@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......
......@@ -5,6 +5,7 @@
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Thomas Boquet <thomas.boquet@gmail.com>
* Clement Chavance <chavance.c@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -153,6 +154,7 @@ void ImportController::clipSelection( const QUuid& uuid )
if ( ( clip = media->clip( uuid ) ) != 0 )
break;
}
setUIMetaData( clip );
if ( uuid != m_currentUuid )
m_preview->stop();
emit clipSelected( clip );
......@@ -196,6 +198,26 @@ void ImportController::setUIMetaData( Media* media )
}
}
void ImportController::setUIMetaData( Clip* clip )
{
//compute clip length
QTime time;
qint64 length = clip->getLengthSecond();
qDebug() << "Clip Length" << length;
time = time.addSecs( length );
qDebug() << time;
qDebug() << "time :" << time.toString( "hh:mm:ss" );
m_ui->durationValueLabel->setText( time.toString( "hh:mm:ss" ) );
//Filename || title
m_ui->nameValueLabel->setText( clip->getParent()->getFileInfo()->fileName() );
m_ui->nameValueLabel->setWordWrap( true );
setWindowTitle( clip->getParent()->getFileInfo()->fileName() + " " + tr( "properties" ) );
//Resolution
m_ui->resolutionValueLabel->setText( QString::number( clip->getParent()->getWidth() )
+ " x " + QString::number( clip->getParent()->getHeight() ) );
//FPS
m_ui->fpsValueLabel->setText( QString::number( clip->getParent()->getFps() ) );
}
void ImportController::forwardButtonClicked()
{
......@@ -245,7 +267,7 @@ void ImportController::mediaDeletion( const QUuid& uuid )
if ( uuid == m_currentUuid )
{
setUIMetaData( NULL );
setUIMetaData( static_cast<Media*>( 0 ) );
m_currentUuid = QUuid();
m_preview->stop();
}
......
......@@ -5,6 +5,7 @@
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* Thomas Boquet <thomas.boquet@gmail.com>
* Clement Chavance <chavance.c@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -49,6 +50,7 @@ class ImportController : public QDialog
ImportController(QWidget *parent = 0);
~ImportController();
void setUIMetaData( Media* media );
void setUIMetaData( Clip* clip );
protected:
void changeEvent( QEvent *e );
......
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