QMimeData* MLModel::mimeData( const QModelIndexList &indexes ) const { QList< QUrl > urls; QList< int > rows; foreach( QModelIndex idx, indexes ) { if( rows.contains( idx.row() ) ) continue; rows.append( idx.row() ); AbstractPLItem* item = static_cast<AbstractPLItem*>( idx.internalPointer() ); urls.append( item->getURI() ); } QMimeData *data = new QMimeData; data->setUrls( urls ); return data; }
QString VLCModel::getURI( const QModelIndex &index ) const { AbstractPLItem *item = getItem( index ); if ( !item ) return QString(); return item->getURI(); }