mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* TrackInfoWidget uses new AlbumView/AlbumModel API.
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
#include "SourceList.h"
|
#include "SourceList.h"
|
||||||
#include "playlist/AlbumModel.h"
|
#include "playlist/PlayableModel.h"
|
||||||
#include "audio/AudioEngine.h"
|
#include "audio/AudioEngine.h"
|
||||||
|
|
||||||
#include "utils/TomahawkUtilsGui.h"
|
#include "utils/TomahawkUtilsGui.h"
|
||||||
@@ -83,8 +83,8 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
|
|||||||
ui->lyricsView->setPalette( p );
|
ui->lyricsView->setPalette( p );
|
||||||
// ui->similarTracksLabel->setPalette( p );
|
// ui->similarTracksLabel->setPalette( p );
|
||||||
|
|
||||||
m_relatedTracksModel = new AlbumModel( ui->similarTracksView );
|
m_relatedTracksModel = new PlayableModel( ui->similarTracksView );
|
||||||
ui->similarTracksView->setAlbumModel( m_relatedTracksModel );
|
ui->similarTracksView->setPlayableModel( m_relatedTracksModel );
|
||||||
ui->similarTracksView->proxyModel()->sort( -1 );
|
ui->similarTracksView->proxyModel()->sort( -1 );
|
||||||
|
|
||||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
||||||
@@ -209,7 +209,7 @@ TrackInfoWidget::onSimilarArtistsLoaded()
|
|||||||
void
|
void
|
||||||
TrackInfoWidget::onSimilarTracksLoaded()
|
TrackInfoWidget::onSimilarTracksLoaded()
|
||||||
{
|
{
|
||||||
m_relatedTracksModel->addQueries( m_query->similarTracks() );
|
m_relatedTracksModel->append( m_query->similarTracks() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "Typedefs.h"
|
||||||
|
|
||||||
class AlbumModel;
|
class PlayableModel;
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ private:
|
|||||||
Tomahawk::query_ptr m_query;
|
Tomahawk::query_ptr m_query;
|
||||||
Tomahawk::artist_ptr m_artist;
|
Tomahawk::artist_ptr m_artist;
|
||||||
|
|
||||||
AlbumModel* m_relatedTracksModel;
|
PlayableModel* m_relatedTracksModel;
|
||||||
QString m_title;
|
QString m_title;
|
||||||
QPixmap m_pixmap;
|
QPixmap m_pixmap;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user