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

void MediaItemModel::replaceMediaItemAt ( int  row,
const MediaItem mediaItem,
bool  emitMediaListChanged = false 
)

Replace MediaItem at the specified row in the model with the one provided.

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

Definition at line 494 of file mediaitemmodel.cpp.

References mediaListChanged(), and MediaItem::url.

Referenced by loadMediaList(), and updateMediaItem().

{
    m_mediaList.replace(row, mediaItem);
    m_urlList.replace(row, mediaItem.url);
    QList<QStandardItem *> rowData = rowDataFromMediaItem(mediaItem);
    for (int i = 0; i < rowData.count(); i++) {
        setItem(row, i, rowData.at(i));
    }
    if (emitMediaListChanged) {
        emit mediaListChanged();
    }
}


Generated by  Doxygen 1.6.0   Back to index