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

ClipMetadataDisplayer: Add an information icon about the workspace state.

parent 7212ddf2
......@@ -35,6 +35,8 @@
<file alias="youtube">resources/images/youtube.png</file>
<file alias="network">resources/images/network.png</file>
<file alias="down">resources/images/down.png</file>
<file alias="ok">resources/images/ok.png</file>
<file alias="ko">resources/images/ko.png</file>
</qresource>
<qresource prefix="/text">
<file>AUTHORS</file>
......
......@@ -56,6 +56,8 @@ ClipMetadataDisplayer::metadataUpdated( const Media *media )
m_ui->nbAudioTracksValueLabel->setText( QString::number( media->nbAudioTracks() ) );
//Path:
m_ui->pathValueLabel->setText( media->fileInfo()->absoluteFilePath() );
//Workspace:
workspaceStateChanged( media->isInWorkspace() );
}
void
......@@ -100,6 +102,17 @@ ClipMetadataDisplayer::setWatchedClip( const Clip *clip )
connect( m_watchedMedia, SIGNAL( metaDataComputed(const Media*) ),
this, SLOT( metadataUpdated( const Media*) ) );
}
connect( m_watchedMedia, SIGNAL( workspaceStateChanged( bool ) ),
this, SLOT( workspaceStateChanged( bool ) ) );
}
void
ClipMetadataDisplayer::workspaceStateChanged( bool state )
{
if ( state == true )
m_ui->inProjectWorkspaceValueLabel->setPixmap( QPixmap( ":/images/ok" ).scaled( 16, 16 ) );
else
m_ui->inProjectWorkspaceValueLabel->setPixmap( QPixmap( ":/images/ko" ).scaled( 16, 16 ) );
}
void
......
......@@ -54,6 +54,7 @@ class ClipMetadataDisplayer : public QWidget
private slots:
void metadataUpdated( const Media *media );
void workspaceStateChanged( bool state );
void clipDestroyed( Clip* clip );
};
......
......@@ -229,7 +229,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -242,6 +242,20 @@
</property>
</spacer>
</item>
<item row="7" column="0">
<widget class="QLabel" name="inProjectWorkspaceLabel">
<property name="text">
<string>In project workspace</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="inProjectWorkspaceValueLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -293,4 +293,5 @@ Media::setFilePath( const QString &filePath )
m_inWorkspace = false;
m_workspacePath = "";
}
emit workspaceStateChanged( m_inWorkspace );
}
......@@ -183,6 +183,7 @@ protected:
signals:
void metaDataComputed( const Media* );
void audioSpectrumComputed( const QUuid& );
void workspaceStateChanged( bool );
};
#endif // MEDIA_H__
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