bool CategoryAddItem::dropMimeData( const QMimeData* data, Qt::DropAction ) { // Create a new playlist seeded with these items DropJob *dj = new DropJob(); connect( dj, SIGNAL( tracks( QList< Tomahawk::query_ptr > ) ), this, SLOT( parsedDroppedTracks( QList< Tomahawk::query_ptr > ) ) ); dj->tracksFromMimeData( data ); return true; }
void AudioControls::dropEvent( QDropEvent* e ) { tDebug() << "AudioControls got drop:" << e->mimeData()->formats(); if ( DropJob::acceptsMimeData( e->mimeData() ) ) { DropJob *dj = new DropJob(); dj->setDropAction( DropJob::Append ); connect( dj, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( droppedTracks( QList<Tomahawk::query_ptr> ) ) ); dj->tracksFromMimeData( e->mimeData() ); e->accept(); } }
bool LovedTracksItem::dropMimeData( const QMimeData* data, Qt::DropAction action ) { Q_UNUSED( action ); QList< Tomahawk::query_ptr > queries; if ( !DropJob::acceptsMimeData( data, DropJob::Track ) ) return false; DropJob *dj = new DropJob(); dj->setDropTypes( DropJob::Track ); dj->setDropAction( DropJob::Append ); connect( dj, SIGNAL( tracks( QList< Tomahawk::query_ptr > ) ), this, SLOT( loveDroppedTracks( QList< Tomahawk::query_ptr > ) ) ); dj->tracksFromMimeData( data, false, false ); return true; }