Commit f12f24b9 authored by Clement CHAVANCE's avatar Clement CHAVANCE
Browse files

disable clip related features on a mediacellView containing a clip

parent 4a319366
......@@ -86,6 +86,7 @@ void
ImportMediaListController::addClip( Clip* clip )
{
ImportMediaCellView* cell = new ImportMediaCellView( clip->getUuid() );
cell->containsClip();
connect( cell, SIGNAL( cellSelected( const QUuid& ) ),
this, SIGNAL( clipSelected( const QUuid& ) ) );
connect( cell, SIGNAL( cellDeleted( const QUuid& ) ),
......
......@@ -60,6 +60,7 @@ void ClipListViewController::resetNbDeletion()
void ClipListViewController::addClip( Clip* clip )
{
MediaCellView* cell = new MediaCellView( clip->getUuid() );
cell->containsClip();
connect( cell, SIGNAL( cellSelected( QUuid ) ), this, SLOT( cellSelection( const QUuid& ) ) );
connect( cell, SIGNAL( cellDeleted( const QUuid& ) ), this, SLOT( clipDeletion( const QUuid& ) ) );
......
......@@ -186,3 +186,14 @@ void MediaCellView::decrementClipCount( const int nb )
clips = 0;
m_ui->clipCount->setText( QString::number( clips ) );
}
void
MediaCellView::containsClip()
{
m_ui->clipCount->hide();
m_ui->clipCountLabel->hide();
m_ui->arrow->hide();
disconnect( m_ui->arrow,
SIGNAL( clicked( QWidget*, QMouseEvent* ) ), this,
SLOT( arrowButtonClicked( QWidget*, QMouseEvent* ) ) );
}
......@@ -56,6 +56,7 @@ public:
const QUuid& uuid() const;
const ClickableLabel* nextButton() const;
const ClickableLabel* deleteButton() const;
void containsClip();
protected:
void changeEvent( QEvent *e );
......
......@@ -133,7 +133,7 @@
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="clipCountLabel">
<property name="font">
<font>
<pointsize>7</pointsize>
......@@ -163,7 +163,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="lengthLabel">
<property name="font">
<font>
<pointsize>7</pointsize>
......
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