Commit 2d61d15a authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

MediaListView: Hold MediaCellView instead of QWidgets

parent e4c282ab
......@@ -44,7 +44,7 @@ MediaListView::MediaListView( StackViewController* nav, MediaContainer* mc ) :
MediaListView::~MediaListView()
{
foreach ( QWidget* cell, m_cells )
foreach ( MediaCellView* cell, m_cells )
delete cell;
m_cells.clear();
}
......@@ -73,7 +73,7 @@ void MediaListView::cellSelection( const QUuid& uuid )
{
if ( !m_currentUuid.isNull() && m_cells.contains( m_currentUuid ) )
{
QWidget* cell = m_cells.value( m_currentUuid );
MediaCellView* cell = m_cells.value( m_currentUuid );
cell->setPalette( m_cells.value( uuid )->palette() );
}
QPalette p = m_cells.value( uuid )->palette();
......@@ -93,7 +93,7 @@ void MediaListView::removeClip( const Clip* clip )
void
MediaListView::__clipRemoved( const QUuid &uuid )
{
QWidget* cell = m_cells.take( uuid );
MediaCellView* cell = m_cells.take( uuid );
removeCell( cell );
m_currentUuid = QUuid();
}
......@@ -101,7 +101,7 @@ MediaListView::__clipRemoved( const QUuid &uuid )
void
MediaListView::clear()
{
foreach ( QWidget* cell, m_cells.values() )
foreach ( MediaCellView* cell, m_cells.values() )
removeCell( cell );
m_cells.clear();
}
......
......@@ -46,11 +46,11 @@ public:
virtual ~MediaListView();
private:
StackViewController* m_nav;
QUuid m_currentUuid;
QHash<QUuid, QWidget*> m_cells;
QUuid m_lastUuidClipListAsked;
MediaContainer* m_mediaContainer;
StackViewController* m_nav;
QUuid m_currentUuid;
QHash<QUuid, MediaCellView*> m_cells;
QUuid m_lastUuidClipListAsked;
MediaContainer* m_mediaContainer;
public slots:
void cellSelection( const QUuid& uuid );
......
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