mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 18:14:50 +02:00
take that, QWidget!
This commit is contained in:
@@ -204,7 +204,6 @@ TARGET_LINK_LIBRARIES( tomahawk
|
|||||||
${QXTWEB_LIBRARIES}
|
${QXTWEB_LIBRARIES}
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
${TAGLIB_LIBRARIES}
|
${TAGLIB_LIBRARIES}
|
||||||
${QT_QTDECLARATIVE_LIBRARY}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
IF( APPLE )
|
IF( APPLE )
|
||||||
|
@@ -145,6 +145,7 @@ set( libGuiSources
|
|||||||
widgets/infowidgets/ArtistInfoWidget.cpp
|
widgets/infowidgets/ArtistInfoWidget.cpp
|
||||||
widgets/infowidgets/AlbumInfoWidget.cpp
|
widgets/infowidgets/AlbumInfoWidget.cpp
|
||||||
widgets/infowidgets/TrackInfoWidget.cpp
|
widgets/infowidgets/TrackInfoWidget.cpp
|
||||||
|
widgets/infowidgets/AlbumArtImageProvider.cpp
|
||||||
widgets/Breadcrumb.cpp
|
widgets/Breadcrumb.cpp
|
||||||
widgets/BreadcrumbButton.cpp
|
widgets/BreadcrumbButton.cpp
|
||||||
)
|
)
|
||||||
@@ -450,6 +451,7 @@ TARGET_LINK_LIBRARIES( tomahawklib
|
|||||||
${QT_QTNETWORK_LIBRARY}
|
${QT_QTNETWORK_LIBRARY}
|
||||||
${QT_QTXML_LIBRARY}
|
${QT_QTXML_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
|
${QT_QTDECLARATIVE_LIBRARY}
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${LINK_LIBRARIES}
|
${LINK_LIBRARIES}
|
||||||
|
@@ -44,6 +44,11 @@ PlayableModel::PlayableModel( QObject* parent, bool loading )
|
|||||||
, m_style( Detailed )
|
, m_style( Detailed )
|
||||||
, m_loading( loading )
|
, m_loading( loading )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
QHash<int, QByteArray> roleNames;
|
||||||
|
roleNames.insert(Qt::DisplayRole, "label");
|
||||||
|
setRoleNames(roleNames);
|
||||||
|
|
||||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||||
|
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
#include "AlbumArtImageProvider.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
QPixmap AlbumArtImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
|
||||||
|
{
|
||||||
|
qDebug() << "*!*!*!*!*!*!*!*!*!* image requested";
|
||||||
|
int width = 100;
|
||||||
|
int height = 50;
|
||||||
|
|
||||||
|
if (size)
|
||||||
|
*size = QSize(width, height);
|
||||||
|
QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width,
|
||||||
|
requestedSize.height() > 0 ? requestedSize.height() : height);
|
||||||
|
pixmap.fill(QColor(id).rgba());
|
||||||
|
|
||||||
|
return pixmap;
|
||||||
|
}
|
12
src/libtomahawk/widgets/infowidgets/AlbumArtImageProvider.h
Normal file
12
src/libtomahawk/widgets/infowidgets/AlbumArtImageProvider.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#include <QDeclarativeImageProvider>
|
||||||
|
|
||||||
|
class AlbumArtImageProvider : public QDeclarativeImageProvider
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AlbumArtImageProvider()
|
||||||
|
: QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
|
||||||
|
};
|
61
src/libtomahawk/widgets/infowidgets/ArtistInfoScene.qml
Normal file
61
src/libtomahawk/widgets/infowidgets/ArtistInfoScene.qml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import QtQuick 1.1
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "darkgray"
|
||||||
|
anchors.fill: parent
|
||||||
|
// height: 200
|
||||||
|
// width: 200
|
||||||
|
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: appDelegate
|
||||||
|
Item {
|
||||||
|
width: 100; height: 100
|
||||||
|
scale: PathView.iconScale
|
||||||
|
|
||||||
|
// Use Image provider here
|
||||||
|
// Image {
|
||||||
|
// id: myIcon
|
||||||
|
// y: 20; anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
// source: icon
|
||||||
|
// smooth: true
|
||||||
|
// }
|
||||||
|
Rectangle {
|
||||||
|
width: 100
|
||||||
|
height: 100
|
||||||
|
color: "blue"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
|
||||||
|
text: label
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: view.currentIndex = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PathView {
|
||||||
|
id: view
|
||||||
|
anchors.fill: parent
|
||||||
|
preferredHighlightBegin: 0.5
|
||||||
|
preferredHighlightEnd: 0.5
|
||||||
|
focus: true
|
||||||
|
model: albumsModel
|
||||||
|
delegate: appDelegate
|
||||||
|
pathItemCount: 8
|
||||||
|
path: Path {
|
||||||
|
startX: 10
|
||||||
|
startY: 50
|
||||||
|
PathAttribute { name: "iconScale"; value: 0.5 }
|
||||||
|
PathQuad { x: view.width/2; y: 150; controlX: 50; controlY: 200 }
|
||||||
|
PathAttribute { name: "iconScale"; value: 1.0 }
|
||||||
|
PathQuad { x: view.width; y: 50; controlX: view.width; controlY: 200 }
|
||||||
|
PathAttribute { name: "iconScale"; value: 0.5 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -23,6 +23,9 @@
|
|||||||
|
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QDeclarativeContext>
|
||||||
|
#include <QDeclarativeEngine>
|
||||||
|
#include "AlbumArtImageProvider.h"
|
||||||
|
|
||||||
#include "audio/AudioEngine.h"
|
#include "audio/AudioEngine.h"
|
||||||
#include "playlist/PlayableModel.h"
|
#include "playlist/PlayableModel.h"
|
||||||
@@ -47,110 +50,121 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
, ui( new Ui::ArtistInfoWidget )
|
, ui( new Ui::ArtistInfoWidget )
|
||||||
, m_artist( artist )
|
, m_artist( artist )
|
||||||
{
|
{
|
||||||
QWidget* widget = new QWidget;
|
qDebug() << "*********************************************************************";
|
||||||
ui->setupUi( widget );
|
|
||||||
|
|
||||||
QPalette pal = palette();
|
setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
||||||
pal.setColor( QPalette::Window, QColor( "#454e59" ) );
|
|
||||||
|
|
||||||
widget->setPalette( pal );
|
|
||||||
widget->setAutoFillBackground( true );
|
|
||||||
|
|
||||||
m_plInterface = Tomahawk::playlistinterface_ptr( new MetaPlaylistInterface( this ) );
|
m_albumsModel = new PlayableModel( this );
|
||||||
|
rootContext()->setContextProperty("albumsModel", m_albumsModel);
|
||||||
|
engine()->addImageProvider(QLatin1String("albums"), new AlbumArtImageProvider);
|
||||||
|
|
||||||
/* TomahawkUtils::unmarginLayout( ui->layoutWidget->layout() );
|
setSource(QUrl::fromLocalFile("/home/micha/Develop/tomahawk/src/libtomahawk/widgets/infowidgets/ArtistInfoScene.qml"));
|
||||||
TomahawkUtils::unmarginLayout( ui->layoutWidget1->layout() );
|
|
||||||
TomahawkUtils::unmarginLayout( ui->layoutWidget2->layout() );
|
|
||||||
TomahawkUtils::unmarginLayout( ui->albumHeader->layout() );*/
|
|
||||||
|
|
||||||
m_albumsModel = new PlayableModel( ui->albums );
|
// QWidget* widget = new QWidget;
|
||||||
ui->albums->setPlayableModel( m_albumsModel );
|
// ui->setupUi( widget );
|
||||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any albums for this artist!" ) );
|
|
||||||
|
|
||||||
m_relatedModel = new PlayableModel( ui->relatedArtists );
|
// QPalette pal = palette();
|
||||||
ui->relatedArtists->setPlayableModel( m_relatedModel );
|
// pal.setColor( QPalette::Window, QColor( "#454e59" ) );
|
||||||
ui->relatedArtists->proxyModel()->sort( -1 );
|
|
||||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any related artists!" ) );
|
|
||||||
|
|
||||||
m_topHitsModel = new PlaylistModel( ui->topHits );
|
// widget->setPalette( pal );
|
||||||
m_topHitsModel->setStyle( PlayableModel::Short );
|
// widget->setAutoFillBackground( true );
|
||||||
ui->topHits->setPlayableModel( m_topHitsModel );
|
|
||||||
ui->topHits->setSortingEnabled( false );
|
|
||||||
ui->topHits->setEmptyTip( tr( "Sorry, we could not find any top hits for this artist!" ) );
|
|
||||||
|
|
||||||
ui->relatedArtists->setAutoFitItems( false );
|
// m_plInterface = Tomahawk::playlistinterface_ptr( new MetaPlaylistInterface( this ) );
|
||||||
ui->relatedArtists->setWrapping( false );
|
|
||||||
ui->relatedArtists->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
|
||||||
ui->relatedArtists->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
|
||||||
m_relatedModel->setItemSize( QSize( 170, 170 ) );
|
|
||||||
|
|
||||||
ui->albums->setAutoFitItems( false );
|
///* TomahawkUtils::unmarginLayout( ui->layoutWidget->layout() );
|
||||||
ui->albums->setWrapping( false );
|
// TomahawkUtils::unmarginLayout( ui->layoutWidget1->layout() );
|
||||||
ui->albums->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
// TomahawkUtils::unmarginLayout( ui->layoutWidget2->layout() );
|
||||||
ui->albums->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
// TomahawkUtils::unmarginLayout( ui->albumHeader->layout() );*/
|
||||||
m_albumsModel->setItemSize( QSize( 170, 170 ) );
|
|
||||||
ui->albums->proxyModel()->setHideDupeItems( true );
|
|
||||||
|
|
||||||
ui->topHits->setFrameShape( QFrame::StyledPanel );
|
// m_albumsModel = new PlayableModel( ui->albums );
|
||||||
ui->topHits->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
// ui->albums->setPlayableModel( m_albumsModel );
|
||||||
|
// ui->topHits->setEmptyTip( tr( "Sorry, we could not find any albums for this artist!" ) );
|
||||||
|
|
||||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
// m_relatedModel = new PlayableModel( ui->relatedArtists );
|
||||||
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( ui->cover->sizeHint() ) ) );
|
// ui->relatedArtists->setPlayableModel( m_relatedModel );
|
||||||
|
// ui->relatedArtists->proxyModel()->sort( -1 );
|
||||||
|
// ui->topHits->setEmptyTip( tr( "Sorry, we could not find any related artists!" ) );
|
||||||
|
|
||||||
ui->biography->setFrameShape( QFrame::NoFrame );
|
// m_topHitsModel = new PlaylistModel( ui->topHits );
|
||||||
ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
// m_topHitsModel->setStyle( PlayableModel::Short );
|
||||||
TomahawkUtils::styleScrollBar( ui->biography->verticalScrollBar() );
|
// ui->topHits->setPlayableModel( m_topHitsModel );
|
||||||
|
// ui->topHits->setSortingEnabled( false );
|
||||||
|
// ui->topHits->setEmptyTip( tr( "Sorry, we could not find any top hits for this artist!" ) );
|
||||||
|
|
||||||
QFont f = font();
|
// ui->relatedArtists->setAutoFitItems( false );
|
||||||
f.setBold( true );
|
// ui->relatedArtists->setWrapping( false );
|
||||||
f.setPixelSize( 18 );
|
// ui->relatedArtists->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||||
ui->artistLabel->setFont( f );
|
// ui->relatedArtists->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
|
// m_relatedModel->setItemSize( QSize( 170, 170 ) );
|
||||||
|
|
||||||
QPalette p = ui->biography->palette();
|
// ui->albums->setAutoFitItems( false );
|
||||||
p.setColor( QPalette::Foreground, Qt::white );
|
// ui->albums->setWrapping( false );
|
||||||
p.setColor( QPalette::Text, Qt::white );
|
// ui->albums->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||||
|
// ui->albums->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
|
// m_albumsModel->setItemSize( QSize( 170, 170 ) );
|
||||||
|
// ui->albums->proxyModel()->setHideDupeItems( true );
|
||||||
|
|
||||||
ui->artistLabel->setPalette( p );
|
// ui->topHits->setFrameShape( QFrame::StyledPanel );
|
||||||
ui->biography->setPalette( p );
|
// ui->topHits->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
ui->label->setPalette( p );
|
|
||||||
ui->label_2->setPalette( p );
|
|
||||||
ui->label_3->setPalette( p );
|
|
||||||
|
|
||||||
QScrollArea* area = new QScrollArea();
|
// m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( 48, 48 ) );
|
||||||
area->setWidgetResizable( true );
|
// ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( ui->cover->sizeHint() ) ) );
|
||||||
area->setWidget( widget );
|
|
||||||
|
|
||||||
area->setStyleSheet( "QScrollArea { background-color: #454e59; }" );
|
// ui->biography->setFrameShape( QFrame::NoFrame );
|
||||||
area->setFrameShape( QFrame::NoFrame );
|
// ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
area->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
// TomahawkUtils::styleScrollBar( ui->biography->verticalScrollBar() );
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
// QFont f = font();
|
||||||
layout->addWidget( area );
|
// f.setBold( true );
|
||||||
setLayout( layout );
|
// f.setPixelSize( 18 );
|
||||||
TomahawkUtils::unmarginLayout( layout );
|
// ui->artistLabel->setFont( f );
|
||||||
|
|
||||||
TomahawkUtils::styleScrollBar( ui->albums->horizontalScrollBar() );
|
// QPalette p = ui->biography->palette();
|
||||||
TomahawkUtils::styleScrollBar( ui->relatedArtists->horizontalScrollBar() );
|
// p.setColor( QPalette::Foreground, Qt::white );
|
||||||
|
// p.setColor( QPalette::Text, Qt::white );
|
||||||
|
|
||||||
ui->biography->setStyleSheet( "QTextBrowser#biography { background-color: transparent; }" );
|
// ui->artistLabel->setPalette( p );
|
||||||
|
// ui->biography->setPalette( p );
|
||||||
|
// ui->label->setPalette( p );
|
||||||
|
// ui->label_2->setPalette( p );
|
||||||
|
// ui->label_3->setPalette( p );
|
||||||
|
|
||||||
ui->albums->setStyleSheet( "QListView { background-color: transparent; }" );
|
// QScrollArea* area = new QScrollArea();
|
||||||
ui->albumFrame->setStyleSheet( "QFrame#albumFrame { background-color: transparent; }"
|
// area->setWidgetResizable( true );
|
||||||
"QFrame#albumFrame { "
|
// area->setWidget( widget );
|
||||||
"border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
|
||||||
"border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
|
||||||
|
|
||||||
ui->relatedArtists->setStyleSheet( "QListView { background-color: transparent; }" );
|
// area->setStyleSheet( "QScrollArea { background-color: #454e59; }" );
|
||||||
ui->artistFrame->setStyleSheet( "QFrame#artistFrame { background-color: transparent; }"
|
// area->setFrameShape( QFrame::NoFrame );
|
||||||
"QFrame#artistFrame { "
|
// area->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
"border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
|
||||||
"border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
|
||||||
|
|
||||||
// ui->topHits->setStyleSheet( "QTreeView#topHits { background-color: transparent; }" );
|
// QVBoxLayout* layout = new QVBoxLayout();
|
||||||
ui->trackFrame->setStyleSheet( "QFrame#trackFrame { background-color: transparent; }"
|
// layout->addWidget( area );
|
||||||
"QFrame#trackFrame { "
|
// setLayout( layout );
|
||||||
"border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
// TomahawkUtils::unmarginLayout( layout );
|
||||||
"border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
|
||||||
|
// TomahawkUtils::styleScrollBar( ui->albums->horizontalScrollBar() );
|
||||||
|
// TomahawkUtils::styleScrollBar( ui->relatedArtists->horizontalScrollBar() );
|
||||||
|
|
||||||
|
// ui->biography->setStyleSheet( "QTextBrowser#biography { background-color: transparent; }" );
|
||||||
|
|
||||||
|
// ui->albums->setStyleSheet( "QListView { background-color: transparent; }" );
|
||||||
|
// ui->albumFrame->setStyleSheet( "QFrame#albumFrame { background-color: transparent; }"
|
||||||
|
// "QFrame#albumFrame { "
|
||||||
|
// "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
||||||
|
// "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
||||||
|
|
||||||
|
// ui->relatedArtists->setStyleSheet( "QListView { background-color: transparent; }" );
|
||||||
|
// ui->artistFrame->setStyleSheet( "QFrame#artistFrame { background-color: transparent; }"
|
||||||
|
// "QFrame#artistFrame { "
|
||||||
|
// "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
||||||
|
// "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
||||||
|
|
||||||
|
//// ui->topHits->setStyleSheet( "QTreeView#topHits { background-color: transparent; }" );
|
||||||
|
// ui->trackFrame->setStyleSheet( "QFrame#trackFrame { background-color: transparent; }"
|
||||||
|
// "QFrame#trackFrame { "
|
||||||
|
// "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;"
|
||||||
|
// "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" );
|
||||||
|
|
||||||
load( artist );
|
load( artist );
|
||||||
}
|
}
|
||||||
@@ -158,7 +172,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
|||||||
|
|
||||||
ArtistInfoWidget::~ArtistInfoWidget()
|
ArtistInfoWidget::~ArtistInfoWidget()
|
||||||
{
|
{
|
||||||
delete ui;
|
// delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -226,9 +240,9 @@ ArtistInfoWidget::load( const artist_ptr& artist )
|
|||||||
connect( m_artist.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
connect( m_artist.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
||||||
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode ) ) );
|
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode ) ) );
|
||||||
|
|
||||||
ui->artistLabel->setText( artist->name() );
|
// ui->artistLabel->setText( artist->name() );
|
||||||
|
|
||||||
m_topHitsModel->startLoading();
|
// m_topHitsModel->startLoading();
|
||||||
|
|
||||||
if ( !m_artist->albums( Mixed ).isEmpty() )
|
if ( !m_artist->albums( Mixed ).isEmpty() )
|
||||||
onAlbumsFound( m_artist->albums( Mixed ), Mixed );
|
onAlbumsFound( m_artist->albums( Mixed ), Mixed );
|
||||||
@@ -260,38 +274,38 @@ ArtistInfoWidget::onTracksFound( const QList<Tomahawk::query_ptr>& queries, Mode
|
|||||||
{
|
{
|
||||||
Q_UNUSED( mode );
|
Q_UNUSED( mode );
|
||||||
|
|
||||||
m_topHitsModel->finishLoading();
|
// m_topHitsModel->finishLoading();
|
||||||
m_topHitsModel->appendQueries( queries );
|
// m_topHitsModel->appendQueries( queries );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistInfoWidget::onSimilarArtistsLoaded()
|
ArtistInfoWidget::onSimilarArtistsLoaded()
|
||||||
{
|
{
|
||||||
m_relatedModel->appendArtists( m_artist->similarArtists() );
|
// m_relatedModel->appendArtists( m_artist->similarArtists() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistInfoWidget::onBiographyLoaded()
|
ArtistInfoWidget::onBiographyLoaded()
|
||||||
{
|
{
|
||||||
m_longDescription = m_artist->biography();
|
// m_longDescription = m_artist->biography();
|
||||||
emit longDescriptionChanged( m_longDescription );
|
// emit longDescriptionChanged( m_longDescription );
|
||||||
|
|
||||||
ui->biography->setHtml( m_artist->biography() );
|
// ui->biography->setHtml( m_artist->biography() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistInfoWidget::onArtistImageUpdated()
|
ArtistInfoWidget::onArtistImageUpdated()
|
||||||
{
|
{
|
||||||
if ( m_artist->cover( QSize( 0, 0 ) ).isNull() )
|
// if ( m_artist->cover( QSize( 0, 0 ) ).isNull() )
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
m_pixmap = m_artist->cover( QSize( 0, 0 ) );
|
// m_pixmap = m_artist->cover( QSize( 0, 0 ) );
|
||||||
emit pixmapChanged( m_pixmap );
|
// emit pixmapChanged( m_pixmap );
|
||||||
|
|
||||||
ui->cover->setPixmap( m_artist->cover( ui->cover->sizeHint() ) );
|
// ui->cover->setPixmap( m_artist->cover( ui->cover->sizeHint() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -302,7 +316,7 @@ ArtistInfoWidget::changeEvent( QEvent* e )
|
|||||||
switch ( e->type() )
|
switch ( e->type() )
|
||||||
{
|
{
|
||||||
case QEvent::LanguageChange:
|
case QEvent::LanguageChange:
|
||||||
ui->retranslateUi( this );
|
// ui->retranslateUi( this );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -31,12 +31,12 @@
|
|||||||
#define ARTISTINFOWIDGET_H
|
#define ARTISTINFOWIDGET_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QDeclarativeView>
|
||||||
|
|
||||||
#include "Typedefs.h"
|
#include "Typedefs.h"
|
||||||
#include "PlaylistInterface.h"
|
#include "PlaylistInterface.h"
|
||||||
#include "ViewPage.h"
|
#include "ViewPage.h"
|
||||||
|
|
||||||
#include "QDeclarativeView"
|
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user