Logo Search packages:      
Sourcecode: bangarang version File versions  Download package

void MediaItemModel::clearMediaListData ( bool  emitMediaListChanged = false  ) 

Clears all information contained in the model. This includes MediaListProperties which a call to removeRows() will not clear.

Parameters:
emitMediaListChanged set true to emit the mediaListChanged() signal after clearing data. Default is false.

Definition at line 465 of file mediaitemmodel.cpp.

References mediaListChanged().

Referenced by Playlist::clearPlaylist(), Playlist::playItemAt(), reload(), Playlist::setMode(), Playlist::start(), and Playlist::stop().

{
    disconnect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(synchRemoveRows(const QModelIndex &, int, int)));
    removeRows(0, rowCount());
    m_mediaList.clear();
    m_urlList.clear();
    connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(synchRemoveRows(const QModelIndex &, int, int)));
    m_loadSources = false;
    m_mediaListForLoadSources.clear();
    if (emitMediaListChanged) {
        emit mediaListChanged();
    }
}


Generated by  Doxygen 1.6.0   Back to index