Example #1
0
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;
}
Example #2
0
QString VLCModel::getURI( const QModelIndex &index ) const
{
    AbstractPLItem *item = getItem( index );
    if ( !item ) return QString();
    return item->getURI();
}