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

QMimeData * MediaItemModel::mimeData ( const QModelIndexList &  indexes  )  const

Returns the QMimeData associated with a list of model indexes

Definition at line 653 of file mediaitemmodel.cpp.

{
    QMimeData *mimeData = new QMimeData();
    QList<QUrl> urls;
    QString indexList;
    foreach (QModelIndex index, indexes) {
        if (index.isValid() && index.column() != 1) {
            QUrl url = QUrl(data(index, MediaItem::UrlRole).toString());
            urls << url;
            indexList += QString("BangarangRow:%1,").arg(index.row());
        }
    }
    
    mimeData->setUrls(urls);
    mimeData->setText(indexList);
    return mimeData;
}


Generated by  Doxygen 1.6.0   Back to index