mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 00:42:04 +02:00
Open playlist on click
This commit is contained in:
parent
6080e75f51
commit
76dc215036
src/libtomahawk-widgets
@ -32,9 +32,11 @@
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "widgets/OverlayWidget.h"
|
||||
#include "widgets/PlaylistsModel.h"
|
||||
#include "widgets/RecentlyPlayedPlaylistsModel.h"
|
||||
#include "MetaPlaylistInterface.h"
|
||||
#include "Pipeline.h"
|
||||
#include "PlaylistDelegate.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QStandardItemModel>
|
||||
@ -177,9 +179,7 @@ NetworkActivityWidget::NetworkActivityWidget( QWidget* parent )
|
||||
TomahawkStyle::styleScrollBar( d->ui->playlistView->verticalScrollBar() );
|
||||
TomahawkStyle::stylePageFrame( d->ui->playlistsFrame );
|
||||
|
||||
// updatePlaylists();
|
||||
// connect( ui->playlistWidget, SIGNAL( activated( QModelIndex ) ), SLOT( onPlaylistActivated( QModelIndex ) ) );
|
||||
// connect( model, SIGNAL( emptinessChanged( bool ) ), this, SLOT( updatePlaylists() ) );
|
||||
connect( d->ui->playlistView, SIGNAL( activated( QModelIndex ) ), SLOT( onPlaylistActivated( QModelIndex ) ) );
|
||||
}
|
||||
|
||||
// Trending artists
|
||||
@ -248,10 +248,6 @@ NetworkActivityWidget::NetworkActivityWidget( QWidget* parent )
|
||||
// connect( d->workerThread, SIGNAL( finished() ), d->workerThread, SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||
// connect( d->workerThread, SIGNAL( destroyed() ), d->worker, SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||
QMetaObject::invokeMethod( d->worker, "run", Qt::QueuedConnection );
|
||||
|
||||
// FIXME: Activate hot playlists again
|
||||
// d->ui->playlistsFrame->hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -422,6 +418,14 @@ NetworkActivityWidget::leftCrumbIndexChanged( const QModelIndex& index )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NetworkActivityWidget::onPlaylistActivated( const QModelIndex& item )
|
||||
{
|
||||
Tomahawk::playlist_ptr pl = item.data( RecentlyPlayedPlaylistsModel::PlaylistRole ).value< Tomahawk::playlist_ptr >();
|
||||
ViewManager::instance()->show( pl );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NetworkActivityWidget::fetchYearCharts()
|
||||
{
|
||||
|
@ -79,6 +79,7 @@ private slots:
|
||||
void trendingTracks( const QList< Tomahawk::track_ptr >& tracks );
|
||||
|
||||
void leftCrumbIndexChanged( const QModelIndex& );
|
||||
void onPlaylistActivated( const QModelIndex& );
|
||||
|
||||
private:
|
||||
void fetchWeekCharts();
|
||||
|
Loading…
x
Reference in New Issue
Block a user