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

void MediaItemModel::removeMediaItemAt ( int  row,
bool  emitMediaListChanged = false 
)

Remove MediaItem at the specified row of the model

Parameters:
row row of model
emitMediaListChanged emits mediaListChanged() signal if true, otherwise don't emit mediaListChanged().

Definition at line 479 of file mediaitemmodel.cpp.

References mediaListChanged().

Referenced by Playlist::playNext(), removeMediaItem(), Playlist::removeMediaItemAt(), and Playlist::stop().

{
    if (row < rowCount()) {
        disconnect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(synchRemoveRows(const QModelIndex &, int, int)));
        removeRows(row, 1);
        m_urlList.removeAt(row);
        m_mediaList.removeAt(row);
        connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(synchRemoveRows(const QModelIndex &, int, int)));
        
    }
    if (emitMediaListChanged) {
        emit mediaListChanged();
    }
}


Generated by  Doxygen 1.6.0   Back to index