mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
Fix a couple warnings and getPlaylistInterface->playlistInterface
This commit is contained in:
parent
2eabaa0195
commit
4d7945291e
@ -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
|
||||
)
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ Album::onTracksAdded( const QList<Tomahawk::query_ptr>& 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() )
|
||||
{
|
||||
|
@ -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<Tomahawk::query_ptr>& tracks );
|
||||
|
@ -84,14 +84,14 @@ Artist::onTracksAdded( const QList<Tomahawk::query_ptr>& 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() )
|
||||
{
|
||||
|
@ -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<Tomahawk::query_ptr>& tracks );
|
||||
|
@ -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<Tomahawk::query_ptr> ) ),
|
||||
SLOT( onTracksAdded( QList<Tomahawk::query_ptr> ) ) );
|
||||
@ -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<Tomahawk::query_ptr> ) ),
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -595,7 +595,7 @@ Playlist::checkRevisionQueue()
|
||||
|
||||
|
||||
Tomahawk::playlistinterface_ptr
|
||||
Playlist::getPlaylistInterface()
|
||||
Playlist::playlistInterface()
|
||||
{
|
||||
if ( m_playlistInterface.isNull() )
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -141,7 +141,7 @@ AlbumProxyModel::removeIndexes( const QList<QModelIndex>& indexes )
|
||||
|
||||
|
||||
Tomahawk::playlistinterface_ptr
|
||||
AlbumProxyModel::getPlaylistInterface()
|
||||
AlbumProxyModel::playlistInterface()
|
||||
{
|
||||
if ( m_playlistInterface.isNull() )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
@ -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(); }
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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(); }
|
||||
|
@ -33,7 +33,7 @@ CollectionProxyModel::CollectionProxyModel( QObject* parent )
|
||||
}
|
||||
|
||||
Tomahawk::playlistinterface_ptr
|
||||
CollectionProxyModel::getPlaylistInterface()
|
||||
CollectionProxyModel::playlistInterface()
|
||||
{
|
||||
if ( m_playlistInterface.isNull() )
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
explicit CollectionProxyModel( QObject* parent = 0 );
|
||||
virtual ~CollectionProxyModel() {}
|
||||
|
||||
virtual Tomahawk::playlistinterface_ptr getPlaylistInterface();
|
||||
virtual Tomahawk::playlistinterface_ptr playlistInterface();
|
||||
|
||||
};
|
||||
|
||||
|
@ -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(); }
|
||||
|
@ -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;
|
||||
|
@ -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() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ PlaylistProxyModel::PlaylistProxyModel( QObject* parent )
|
||||
}
|
||||
|
||||
Tomahawk::playlistinterface_ptr
|
||||
PlaylistProxyModel::getPlaylistInterface()
|
||||
PlaylistProxyModel::playlistInterface()
|
||||
{
|
||||
if ( m_playlistInterface.isNull() )
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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() )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
@ -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() )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
@ -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
|
||||
|
@ -363,7 +363,7 @@ TreeProxyModel::textForItem( TreeModelItem* item ) const
|
||||
|
||||
|
||||
Tomahawk::playlistinterface_ptr
|
||||
TreeProxyModel::getPlaylistInterface()
|
||||
TreeProxyModel::playlistInterface()
|
||||
{
|
||||
if ( m_playlistInterface.isNull() )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 ) ) );
|
||||
}
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user