diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index ee8d41f4b..ed409a09b 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -152,7 +152,6 @@ set( libGuiHeaders contextmenu.h dropjob.h - viewpage.h viewmanager.h globalactionmanager.h LatchManager.h @@ -239,7 +238,6 @@ set( libGuiHeaders utils/rdioparser.h utils/shortenedlinkparser.h utils/dropjobnotifier.h - utils/tomahawkutilsgui.h widgets/checkdirtree.h widgets/querylabel.h @@ -436,6 +434,8 @@ set( libHeaders playlist.h playlistplaylistinterface.h + viewpage.h + EchonestCatalogSynchronizer.h sip/SipPlugin.h @@ -530,6 +530,7 @@ set( libHeaders thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h + utils/tomahawkutilsgui.h utils/xspfloader.h utils/qnr_iodevicestream.h ) diff --git a/src/libtomahawk/LatchManager.cpp b/src/libtomahawk/LatchManager.cpp index 572577564..abee22856 100644 --- a/src/libtomahawk/LatchManager.cpp +++ b/src/libtomahawk/LatchManager.cpp @@ -57,7 +57,7 @@ LatchManager::latchRequest( const source_ptr& source ) m_state = Latching; m_waitingForLatch = source; - AudioEngine::instance()->playItem( source->getPlaylistInterface(), source->getPlaylistInterface()->nextItem() ); + AudioEngine::instance()->playItem( source->playlistInterface(), source->playlistInterface()->nextItem() ); } void @@ -70,7 +70,7 @@ LatchManager::playlistChanged( Tomahawk::playlistinterface_ptr ) return; // Neither latched on nor waiting to be latched on, no-op m_latchedOnTo = m_waitingForLatch; - m_latchedInterface = m_waitingForLatch->getPlaylistInterface(); + m_latchedInterface = m_waitingForLatch->playlistInterface(); m_waitingForLatch.clear(); m_state = Latched; @@ -151,7 +151,7 @@ LatchManager::latchModeChangeRequest( const Tomahawk::source_ptr& source, bool r if ( !isLatched( source ) ) return; - source->getPlaylistInterface()->setLatchMode( realtime ? Tomahawk::PlaylistInterface::RealTime : Tomahawk::PlaylistInterface::StayOnSong ); + source->playlistInterface()->setLatchMode( realtime ? Tomahawk::PlaylistInterface::RealTime : Tomahawk::PlaylistInterface::StayOnSong ); if ( realtime ) catchUpRequest(); } diff --git a/src/libtomahawk/album.cpp b/src/libtomahawk/album.cpp index 7515b01bb..0d1805abb 100644 --- a/src/libtomahawk/album.cpp +++ b/src/libtomahawk/album.cpp @@ -77,7 +77,7 @@ Album::onTracksAdded( const QList& tracks ) { qDebug() << Q_FUNC_INFO; - Tomahawk::AlbumPlaylistInterface* api = dynamic_cast< Tomahawk::AlbumPlaylistInterface* >( getPlaylistInterface().data() ); + Tomahawk::AlbumPlaylistInterface* api = dynamic_cast< Tomahawk::AlbumPlaylistInterface* >( playlistInterface().data() ); if ( api ) api->addQueries( tracks ); @@ -93,7 +93,7 @@ Album::artist() const Tomahawk::playlistinterface_ptr -Album::getPlaylistInterface() +Album::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/album.h b/src/libtomahawk/album.h index 3ad460afd..d3725994f 100644 --- a/src/libtomahawk/album.h +++ b/src/libtomahawk/album.h @@ -44,7 +44,7 @@ public: QString name() const { return m_name; } artist_ptr artist() const; - Tomahawk::playlistinterface_ptr getPlaylistInterface(); + Tomahawk::playlistinterface_ptr playlistInterface(); signals: void tracksAdded( const QList& tracks ); diff --git a/src/libtomahawk/artist.cpp b/src/libtomahawk/artist.cpp index eafd6b7e7..5cc7b59e1 100644 --- a/src/libtomahawk/artist.cpp +++ b/src/libtomahawk/artist.cpp @@ -84,14 +84,14 @@ Artist::onTracksAdded( const QList& tracks ) { qDebug() << Q_FUNC_INFO; - Tomahawk::ArtistPlaylistInterface* api = dynamic_cast< Tomahawk::ArtistPlaylistInterface* >( getPlaylistInterface().data() ); + Tomahawk::ArtistPlaylistInterface* api = dynamic_cast< Tomahawk::ArtistPlaylistInterface* >( playlistInterface().data() ); if ( api ) api->addQueries( tracks ); emit tracksAdded( tracks ); } Tomahawk::playlistinterface_ptr -Artist::getPlaylistInterface() +Artist::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/artist.h b/src/libtomahawk/artist.h index be7db3704..c3b0d6fa6 100644 --- a/src/libtomahawk/artist.h +++ b/src/libtomahawk/artist.h @@ -44,7 +44,7 @@ public: QString name() const { return m_name; } QString sortname() const { return m_sortname; } - Tomahawk::playlistinterface_ptr getPlaylistInterface(); + Tomahawk::playlistinterface_ptr playlistInterface(); signals: void tracksAdded( const QList& tracks ); diff --git a/src/libtomahawk/dropjob.cpp b/src/libtomahawk/dropjob.cpp index 3afabb540..6c0ed2f9f 100644 --- a/src/libtomahawk/dropjob.cpp +++ b/src/libtomahawk/dropjob.cpp @@ -764,7 +764,7 @@ QList< query_ptr > DropJob::getArtist( const QString &artist ) { artist_ptr artistPtr = Artist::get( artist ); - if ( artistPtr->getPlaylistInterface()->tracks().isEmpty() ) + if ( artistPtr->playlistInterface()->tracks().isEmpty() ) { connect( artistPtr.data(), SIGNAL( tracksAdded( QList ) ), SLOT( onTracksAdded( QList ) ) ); @@ -772,7 +772,7 @@ DropJob::getArtist( const QString &artist ) return QList< query_ptr >(); } else - return artistPtr->getPlaylistInterface()->tracks(); + return artistPtr->playlistInterface()->tracks(); } @@ -785,7 +785,7 @@ DropJob::getAlbum(const QString &artist, const QString &album) if ( albumPtr.isNull() ) return QList< query_ptr >(); - if ( albumPtr->getPlaylistInterface()->tracks().isEmpty() ) + if ( albumPtr->playlistInterface()->tracks().isEmpty() ) { m_dropJob = new DropJobNotifier( QPixmap( RESPATH "images/album-icon.png" ), Album ); connect( albumPtr.data(), SIGNAL( tracksAdded( QList ) ), @@ -796,7 +796,7 @@ DropJob::getAlbum(const QString &artist, const QString &album) return QList< query_ptr >(); } else - return albumPtr->getPlaylistInterface()->tracks(); + return albumPtr->playlistInterface()->tracks(); } diff --git a/src/libtomahawk/playlist.cpp b/src/libtomahawk/playlist.cpp index fcf0f3cc3..f093c24f1 100644 --- a/src/libtomahawk/playlist.cpp +++ b/src/libtomahawk/playlist.cpp @@ -595,7 +595,7 @@ Playlist::checkRevisionQueue() Tomahawk::playlistinterface_ptr -Playlist::getPlaylistInterface() +Playlist::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist.h b/src/libtomahawk/playlist.h index 5a6e04568..5cc6c70cf 100644 --- a/src/libtomahawk/playlist.h +++ b/src/libtomahawk/playlist.h @@ -185,7 +185,7 @@ public: void setUpdater( PlaylistUpdaterInterface* interface ) { m_updater = interface; } PlaylistUpdaterInterface* updater() const { return m_updater; } - Tomahawk::playlistinterface_ptr getPlaylistInterface(); + Tomahawk::playlistinterface_ptr playlistInterface(); signals: /// emitted when the playlist revision changes (whenever the playlist changes) diff --git a/src/libtomahawk/playlist/albumproxymodel.cpp b/src/libtomahawk/playlist/albumproxymodel.cpp index 125a81672..be292bba9 100644 --- a/src/libtomahawk/playlist/albumproxymodel.cpp +++ b/src/libtomahawk/playlist/albumproxymodel.cpp @@ -141,7 +141,7 @@ AlbumProxyModel::removeIndexes( const QList& indexes ) Tomahawk::playlistinterface_ptr -AlbumProxyModel::getPlaylistInterface() +AlbumProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/albumproxymodel.h b/src/libtomahawk/playlist/albumproxymodel.h index 9e8cc566d..22036ea2a 100644 --- a/src/libtomahawk/playlist/albumproxymodel.h +++ b/src/libtomahawk/playlist/albumproxymodel.h @@ -45,7 +45,7 @@ public: virtual void emitFilterChanged( const QString &pattern ) { emit filterChanged( pattern ); } - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); signals: void filterChanged( const QString& filter ); diff --git a/src/libtomahawk/playlist/albumview.h b/src/libtomahawk/playlist/albumview.h index 993a2fea7..c4de362be 100644 --- a/src/libtomahawk/playlist/albumview.h +++ b/src/libtomahawk/playlist/albumview.h @@ -53,7 +53,7 @@ public: void setModel( QAbstractItemModel* model ); virtual QWidget* widget() { return this; } - virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->getPlaylistInterface(); } + virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); } virtual QString title() const { return m_model->title(); } virtual QString description() const { return m_model->description(); } diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp index 929905f39..a6973b73b 100644 --- a/src/libtomahawk/playlist/artistview.cpp +++ b/src/libtomahawk/playlist/artistview.cpp @@ -188,7 +188,7 @@ ArtistView::onItemActivated( const QModelIndex& index ) else if ( !item->result().isNull() && item->result()->isOnline() ) { m_model->setCurrentItem( item->index ); - AudioEngine::instance()->playItem( m_proxyModel->getPlaylistInterface(), item->result() ); + AudioEngine::instance()->playItem( m_proxyModel->playlistInterface(), item->result() ); } } } @@ -248,9 +248,9 @@ ArtistView::onFilterChanged( const QString& ) if ( selectedIndexes().count() ) scrollTo( selectedIndexes().at( 0 ), QAbstractItemView::PositionAtCenter ); - if ( !proxyModel()->getPlaylistInterface()->filter().isEmpty() && !proxyModel()->getPlaylistInterface()->trackCount() && model()->trackCount() ) + if ( !proxyModel()->playlistInterface()->filter().isEmpty() && !proxyModel()->playlistInterface()->trackCount() && model()->trackCount() ) { - m_overlay->setText( tr( "Sorry, your filter '%1' did not match any results." ).arg( proxyModel()->getPlaylistInterface()->filter() ) ); + m_overlay->setText( tr( "Sorry, your filter '%1' did not match any results." ).arg( proxyModel()->playlistInterface()->filter() ) ); m_overlay->show(); } else @@ -332,7 +332,7 @@ ArtistView::onScrollTimeout() while ( right.isValid() && right.parent().isValid() ) right = right.parent(); - int max = m_proxyModel->getPlaylistInterface()->trackCount(); + int max = m_proxyModel->playlistInterface()->trackCount(); if ( right.isValid() ) max = right.row() + 1; diff --git a/src/libtomahawk/playlist/artistview.h b/src/libtomahawk/playlist/artistview.h index e67ef37c3..061bca781 100644 --- a/src/libtomahawk/playlist/artistview.h +++ b/src/libtomahawk/playlist/artistview.h @@ -62,7 +62,7 @@ public: void setTreeModel( TreeModel* model ); virtual QWidget* widget() { return this; } - virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->getPlaylistInterface(); } + virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); } virtual QString title() const { return m_model->title(); } virtual QString description() const { return m_model->description(); } diff --git a/src/libtomahawk/playlist/collectionproxymodel.cpp b/src/libtomahawk/playlist/collectionproxymodel.cpp index 1f5df9c7d..6fe08f52e 100644 --- a/src/libtomahawk/playlist/collectionproxymodel.cpp +++ b/src/libtomahawk/playlist/collectionproxymodel.cpp @@ -33,7 +33,7 @@ CollectionProxyModel::CollectionProxyModel( QObject* parent ) } Tomahawk::playlistinterface_ptr -CollectionProxyModel::getPlaylistInterface() +CollectionProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/collectionproxymodel.h b/src/libtomahawk/playlist/collectionproxymodel.h index 898f05095..872aaf6fa 100644 --- a/src/libtomahawk/playlist/collectionproxymodel.h +++ b/src/libtomahawk/playlist/collectionproxymodel.h @@ -32,7 +32,7 @@ public: explicit CollectionProxyModel( QObject* parent = 0 ); virtual ~CollectionProxyModel() {} - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); }; diff --git a/src/libtomahawk/playlist/collectionview.h b/src/libtomahawk/playlist/collectionview.h index ff7471e97..916364099 100644 --- a/src/libtomahawk/playlist/collectionview.h +++ b/src/libtomahawk/playlist/collectionview.h @@ -39,7 +39,7 @@ public: virtual void setModel( QAbstractItemModel* model ); virtual QWidget* widget() { return this; } - virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->getPlaylistInterface(); } + virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); } virtual QString title() const { return model()->title(); } virtual QString description() const { return model()->description(); } diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.cpp b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.cpp index 2cf47020f..b4a07acba 100644 --- a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.cpp +++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.cpp @@ -203,7 +203,7 @@ DynamicWidget::onRevisionLoaded( const Tomahawk::DynamicPlaylistRevision& rev ) Tomahawk::playlistinterface_ptr DynamicWidget::playlistInterface() const { - return m_view->proxyModel()->getPlaylistInterface(); + return m_view->proxyModel()->playlistInterface(); } @@ -243,7 +243,7 @@ DynamicWidget::layoutFloatingWidgets() void DynamicWidget::playlistChanged( Tomahawk::playlistinterface_ptr pl ) { - if( pl == m_view->proxyModel()->getPlaylistInterface() ) { // same playlist + if( pl == m_view->proxyModel()->playlistInterface() ) { // same playlist m_activePlaylist = true; } else { m_activePlaylist = false; diff --git a/src/libtomahawk/playlist/playlistmodel.cpp b/src/libtomahawk/playlist/playlistmodel.cpp index 99cf1a3a4..4cd5a2b59 100644 --- a/src/libtomahawk/playlist/playlistmodel.cpp +++ b/src/libtomahawk/playlist/playlistmodel.cpp @@ -152,7 +152,7 @@ PlaylistModel::append( const Tomahawk::album_ptr& album ) m_isTemporary = true; } - append( album->getPlaylistInterface()->tracks() ); + append( album->playlistInterface()->tracks() ); } @@ -172,7 +172,7 @@ PlaylistModel::append( const Tomahawk::artist_ptr& artist ) m_isTemporary = true; } - append( artist->getPlaylistInterface()->tracks() ); + append( artist->playlistInterface()->tracks() ); } diff --git a/src/libtomahawk/playlist/playlistproxymodel.cpp b/src/libtomahawk/playlist/playlistproxymodel.cpp index ded13bd95..c7fb24a1e 100644 --- a/src/libtomahawk/playlist/playlistproxymodel.cpp +++ b/src/libtomahawk/playlist/playlistproxymodel.cpp @@ -28,7 +28,7 @@ PlaylistProxyModel::PlaylistProxyModel( QObject* parent ) } Tomahawk::playlistinterface_ptr -PlaylistProxyModel::getPlaylistInterface() +PlaylistProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/playlistproxymodel.h b/src/libtomahawk/playlist/playlistproxymodel.h index b7e1610db..2d0855054 100644 --- a/src/libtomahawk/playlist/playlistproxymodel.h +++ b/src/libtomahawk/playlist/playlistproxymodel.h @@ -31,7 +31,7 @@ public: explicit PlaylistProxyModel( QObject* parent = 0 ); virtual ~PlaylistProxyModel() {} - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); }; #endif // PLAYLISTPROXYMODEL_H diff --git a/src/libtomahawk/playlist/playlistview.h b/src/libtomahawk/playlist/playlistview.h index f89836fc3..45169fdf8 100644 --- a/src/libtomahawk/playlist/playlistview.h +++ b/src/libtomahawk/playlist/playlistview.h @@ -38,7 +38,7 @@ public: virtual void setModel( QAbstractItemModel* model ); virtual QWidget* widget() { return this; } - virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->getPlaylistInterface(); } + virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); } virtual bool showFilter() const { return true; } diff --git a/src/libtomahawk/playlist/queueproxymodel.cpp b/src/libtomahawk/playlist/queueproxymodel.cpp index 718285fbe..fcfcb8cd1 100644 --- a/src/libtomahawk/playlist/queueproxymodel.cpp +++ b/src/libtomahawk/playlist/queueproxymodel.cpp @@ -32,7 +32,7 @@ QueueProxyModel::QueueProxyModel( TrackView* parent ) qDebug() << Q_FUNC_INFO; connect( parent, SIGNAL( itemActivated( QModelIndex ) ), this, SLOT( onIndexActivated( QModelIndex ) ) ); - connect( getPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ), this, SLOT( onTrackCountChanged( unsigned int ) ) ); + connect( playlistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ), this, SLOT( onTrackCountChanged( unsigned int ) ) ); } @@ -58,7 +58,7 @@ QueueProxyModel::onTrackCountChanged( unsigned int count ) Tomahawk::playlistinterface_ptr -QueueProxyModel::getPlaylistInterface() +QueueProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/queueproxymodel.h b/src/libtomahawk/playlist/queueproxymodel.h index 5197d443a..9e735a3f9 100644 --- a/src/libtomahawk/playlist/queueproxymodel.h +++ b/src/libtomahawk/playlist/queueproxymodel.h @@ -34,7 +34,7 @@ public: explicit QueueProxyModel( TrackView* parent = 0 ); virtual ~QueueProxyModel(); - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); private slots: void onIndexActivated( const QModelIndex& index ); diff --git a/src/libtomahawk/playlist/trackproxymodel.cpp b/src/libtomahawk/playlist/trackproxymodel.cpp index d78073df3..9206d6e76 100644 --- a/src/libtomahawk/playlist/trackproxymodel.cpp +++ b/src/libtomahawk/playlist/trackproxymodel.cpp @@ -55,7 +55,7 @@ TrackProxyModel::setSourceTrackModel( TrackModel* sourceModel ) m_model = sourceModel; if ( m_model && m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 ) - connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), getPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); + connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), playlistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); QSortFilterProxyModel::setSourceModel( m_model ); } @@ -275,7 +275,7 @@ TrackProxyModel::lessThan( const QModelIndex& left, const QModelIndex& right ) c Tomahawk::playlistinterface_ptr -TrackProxyModel::getPlaylistInterface() +TrackProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/trackproxymodel.h b/src/libtomahawk/playlist/trackproxymodel.h index 18f3a127a..9d581d279 100644 --- a/src/libtomahawk/playlist/trackproxymodel.h +++ b/src/libtomahawk/playlist/trackproxymodel.h @@ -52,7 +52,7 @@ public: virtual TrackModelItem* itemFromIndex( const QModelIndex& index ) const { return sourceModel()->itemFromIndex( index ); } - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); signals: void filterChanged( const QString& filter ); diff --git a/src/libtomahawk/playlist/trackview.cpp b/src/libtomahawk/playlist/trackview.cpp index 0bbdcd5fe..674c3337e 100644 --- a/src/libtomahawk/playlist/trackview.cpp +++ b/src/libtomahawk/playlist/trackview.cpp @@ -182,7 +182,7 @@ TrackView::onItemActivated( const QModelIndex& index ) { tDebug() << "Result activated:" << item->query()->toString() << item->query()->results().first()->url(); m_proxyModel->setCurrentIndex( index ); - AudioEngine::instance()->playItem( m_proxyModel->getPlaylistInterface(), item->query()->results().first() ); + AudioEngine::instance()->playItem( m_proxyModel->playlistInterface(), item->query()->results().first() ); } emit itemActivated( index ); @@ -369,9 +369,9 @@ TrackView::onFilterChanged( const QString& ) if ( selectedIndexes().count() ) scrollTo( selectedIndexes().at( 0 ), QAbstractItemView::PositionAtCenter ); - if ( !proxyModel()->getPlaylistInterface()->filter().isEmpty() && !proxyModel()->getPlaylistInterface()->trackCount() && model()->trackCount() ) + if ( !proxyModel()->playlistInterface()->filter().isEmpty() && !proxyModel()->playlistInterface()->trackCount() && model()->trackCount() ) { - m_overlay->setText( tr( "Sorry, your filter '%1' did not match any results." ).arg( proxyModel()->getPlaylistInterface()->filter() ) ); + m_overlay->setText( tr( "Sorry, your filter '%1' did not match any results." ).arg( proxyModel()->playlistInterface()->filter() ) ); m_overlay->show(); } else diff --git a/src/libtomahawk/playlist/treeproxymodel.cpp b/src/libtomahawk/playlist/treeproxymodel.cpp index 10ef415fb..bf8b3e6c8 100644 --- a/src/libtomahawk/playlist/treeproxymodel.cpp +++ b/src/libtomahawk/playlist/treeproxymodel.cpp @@ -363,7 +363,7 @@ TreeProxyModel::textForItem( TreeModelItem* item ) const Tomahawk::playlistinterface_ptr -TreeProxyModel::getPlaylistInterface() +TreeProxyModel::playlistInterface() { if ( m_playlistInterface.isNull() ) { diff --git a/src/libtomahawk/playlist/treeproxymodel.h b/src/libtomahawk/playlist/treeproxymodel.h index 6ce52785a..2aa7b0d27 100644 --- a/src/libtomahawk/playlist/treeproxymodel.h +++ b/src/libtomahawk/playlist/treeproxymodel.h @@ -57,7 +57,7 @@ public: virtual TreeModelItem* itemFromIndex( const QModelIndex& index ) const { return sourceModel()->itemFromIndex( index ); } - virtual Tomahawk::playlistinterface_ptr getPlaylistInterface(); + virtual Tomahawk::playlistinterface_ptr playlistInterface(); signals: void filterChanged( const QString& filter ); diff --git a/src/libtomahawk/source.cpp b/src/libtomahawk/source.cpp index 575953d07..b73eae7c1 100644 --- a/src/libtomahawk/source.cpp +++ b/src/libtomahawk/source.cpp @@ -302,7 +302,7 @@ Source::trackCount() const Tomahawk::playlistinterface_ptr -Source::getPlaylistInterface() +Source::playlistInterface() { if ( m_playlistInterface.isNull() ) { @@ -323,7 +323,7 @@ Source::onPlaybackStarted( const Tomahawk::query_ptr& query, unsigned int durati m_currentTrackTimer.start( duration * 1000 + 900000 ); // duration comes in seconds if ( m_playlistInterface.isNull() ) - getPlaylistInterface(); + playlistInterface(); emit playbackStarted( query ); } diff --git a/src/libtomahawk/source.h b/src/libtomahawk/source.h index e502da0b2..f3361a720 100644 --- a/src/libtomahawk/source.h +++ b/src/libtomahawk/source.h @@ -85,7 +85,7 @@ public: QString textStatus() const { return m_textStatus; } DBSyncConnection::State state() const { return m_state; } - Tomahawk::playlistinterface_ptr getPlaylistInterface(); + Tomahawk::playlistinterface_ptr playlistInterface(); signals: void syncedWithDatabase(); diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget_p.h b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget_p.h index 261af14f0..91b673a6a 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget_p.h +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget_p.h @@ -35,27 +35,27 @@ public: : PlaylistInterface() , m_w( w ) { - connect( m_w->ui->albums->proxyModel()->getPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), + connect( m_w->ui->albums->proxyModel()->playlistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), SLOT( anyRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ) ); - connect( m_w->ui->relatedArtists->proxyModel()->getPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), + connect( m_w->ui->relatedArtists->proxyModel()->playlistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), SLOT( anyRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ) ); - connect( m_w->ui->topHits->proxyModel()->getPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), + connect( m_w->ui->topHits->proxyModel()->playlistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), SLOT( anyRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ) ); - connect( m_w->ui->albums->proxyModel()->getPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), + connect( m_w->ui->albums->proxyModel()->playlistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), SLOT( anyShuffleChanged( bool ) ) ); - connect( m_w->ui->relatedArtists->proxyModel()->getPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), + connect( m_w->ui->relatedArtists->proxyModel()->playlistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), SLOT( anyShuffleChanged( bool ) ) ); - connect( m_w->ui->topHits->proxyModel()->getPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), + connect( m_w->ui->topHits->proxyModel()->playlistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), SLOT( anyShuffleChanged( bool ) ) ); } virtual ~MetaPlaylistInterface() {} // Any one is fine, we keep them all synched - virtual RepeatMode repeatMode() const { return m_w->ui->albums->proxyModel()->getPlaylistInterface()->repeatMode(); } + virtual RepeatMode repeatMode() const { return m_w->ui->albums->proxyModel()->playlistInterface()->repeatMode(); } - virtual bool shuffled() const { return m_w->ui->albums->proxyModel()->getPlaylistInterface()->shuffled(); } + virtual bool shuffled() const { return m_w->ui->albums->proxyModel()->playlistInterface()->shuffled(); } // Do nothing virtual Tomahawk::result_ptr currentItem() const { return Tomahawk::result_ptr(); } @@ -74,16 +74,16 @@ public: public slots: virtual void setRepeatMode( RepeatMode mode ) { - m_w->ui->albums->proxyModel()->getPlaylistInterface()->setRepeatMode( mode ); - m_w->ui->relatedArtists->proxyModel()->getPlaylistInterface()->setRepeatMode( mode ); - m_w->ui->topHits->proxyModel()->getPlaylistInterface()->setRepeatMode( mode ); + m_w->ui->albums->proxyModel()->playlistInterface()->setRepeatMode( mode ); + m_w->ui->relatedArtists->proxyModel()->playlistInterface()->setRepeatMode( mode ); + m_w->ui->topHits->proxyModel()->playlistInterface()->setRepeatMode( mode ); } virtual void setShuffled( bool enabled ) { - m_w->ui->albums->proxyModel()->getPlaylistInterface()->setShuffled( enabled ); - m_w->ui->relatedArtists->proxyModel()->getPlaylistInterface()->setShuffled( enabled ); - m_w->ui->topHits->proxyModel()->getPlaylistInterface()->setShuffled( enabled ); + m_w->ui->albums->proxyModel()->playlistInterface()->setShuffled( enabled ); + m_w->ui->relatedArtists->proxyModel()->playlistInterface()->setShuffled( enabled ); + m_w->ui->topHits->proxyModel()->playlistInterface()->setShuffled( enabled ); } signals: diff --git a/src/libtomahawk/widgets/whatshotwidget_p.h b/src/libtomahawk/widgets/whatshotwidget_p.h index b9602ae94..0baf2f7cc 100644 --- a/src/libtomahawk/widgets/whatshotwidget_p.h +++ b/src/libtomahawk/widgets/whatshotwidget_p.h @@ -39,22 +39,22 @@ public: : PlaylistInterface() , m_w( w ) { - connect( m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), + connect( m_w->ui->tracksViewLeft->proxyModel()->playlistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), SLOT( anyRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ) ); - connect( m_w->ui->artistsViewLeft->proxyModel()->getPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), + connect( m_w->ui->artistsViewLeft->proxyModel()->playlistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ), SLOT( anyRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode ) ) ); - connect( m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), + connect( m_w->ui->tracksViewLeft->proxyModel()->playlistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), SLOT( anyShuffleChanged( bool ) ) ); - connect( m_w->ui->artistsViewLeft->proxyModel()->getPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), + connect( m_w->ui->artistsViewLeft->proxyModel()->playlistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), SLOT( anyShuffleChanged( bool ) ) ); } virtual ~ChartsPlaylistInterface() {} // Any one is fine, we keep them all synched - virtual RepeatMode repeatMode() const { return m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface()->repeatMode(); } + virtual RepeatMode repeatMode() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->repeatMode(); } - virtual bool shuffled() const { return m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface()->shuffled(); } + virtual bool shuffled() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->shuffled(); } // Do nothing virtual Tomahawk::result_ptr currentItem() const { return Tomahawk::result_ptr(); } @@ -73,14 +73,14 @@ public: public slots: virtual void setRepeatMode( RepeatMode mode ) { - m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface()->setRepeatMode( mode ); - m_w->ui->artistsViewLeft->proxyModel()->getPlaylistInterface()->setRepeatMode( mode ); + m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->setRepeatMode( mode ); + m_w->ui->artistsViewLeft->proxyModel()->playlistInterface()->setRepeatMode( mode ); } virtual void setShuffled( bool enabled ) { - m_w->ui->tracksViewLeft->proxyModel()->getPlaylistInterface()->setShuffled( enabled ); - m_w->ui->artistsViewLeft->proxyModel()->getPlaylistInterface()->setShuffled( enabled ); + m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->setShuffled( enabled ); + m_w->ui->artistsViewLeft->proxyModel()->playlistInterface()->setShuffled( enabled ); } signals: diff --git a/src/sourcetree/items/sourceitem.cpp b/src/sourcetree/items/sourceitem.cpp index df13123ea..202c2691b 100644 --- a/src/sourcetree/items/sourceitem.cpp +++ b/src/sourcetree/items/sourceitem.cpp @@ -197,7 +197,7 @@ Tomahawk::PlaylistInterface::LatchMode SourceItem::localLatchMode() const { if ( !m_source.isNull() && !m_source->isLocal() ) - return m_source->getPlaylistInterface()->latchMode(); + return m_source->playlistInterface()->latchMode(); return Tomahawk::PlaylistInterface::StayOnSong; } diff --git a/src/sourcetree/sourcedelegate.cpp b/src/sourcetree/sourcedelegate.cpp index 6e51461c2..2a41d4808 100644 --- a/src/sourcetree/sourcedelegate.cpp +++ b/src/sourcetree/sourcedelegate.cpp @@ -212,7 +212,7 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& if ( !colItem->source()->isLocal() ) { realtimeListeningAlongPixmap = - colItem->source()->getPlaylistInterface()->latchMode() == Tomahawk::PlaylistInterface::RealTime ? + colItem->source()->playlistInterface()->latchMode() == Tomahawk::PlaylistInterface::RealTime ? m_realtimeLocked : m_realtimeUnlocked; } } diff --git a/src/sourcetree/sourcetreeview.cpp b/src/sourcetree/sourcetreeview.cpp index 925cabd1e..7e74c08f9 100644 --- a/src/sourcetree/sourcetreeview.cpp +++ b/src/sourcetree/sourcetreeview.cpp @@ -169,7 +169,7 @@ SourceTreeView::setupMenus() connect( latchOffAction, SIGNAL( triggered() ), SLOT( latchOff() ) ); m_latchMenu.addSeparator(); QAction *latchRealtimeAction = ActionCollection::instance()->getAction( "realtimeFollowingAlong" ); - latchRealtimeAction->setChecked( source->getPlaylistInterface()->latchMode() == Tomahawk::PlaylistInterface::RealTime ); + latchRealtimeAction->setChecked( source->playlistInterface()->latchMode() == Tomahawk::PlaylistInterface::RealTime ); m_latchMenu.addAction( latchRealtimeAction ); connect( latchRealtimeAction, SIGNAL( toggled( bool ) ), SLOT( latchModeToggled( bool ) ) ); } diff --git a/src/tomahawkwindow.cpp b/src/tomahawkwindow.cpp index 06862e1a1..115b6bff7 100644 --- a/src/tomahawkwindow.cpp +++ b/src/tomahawkwindow.cpp @@ -224,7 +224,7 @@ TomahawkWindow::setupSideBar() m_queueModel->setStyle( PlaylistModel::Short ); m_queueView->queue()->setPlaylistModel( m_queueModel ); m_queueView->queue()->playlistModel()->setReadOnly( false ); - AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel()->getPlaylistInterface() ); + AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel()->playlistInterface() ); m_sidebar->addWidget( m_searchWidget ); m_sidebar->addWidget( m_sourcetree );