From 9cb31e4ec6a25555014b688a2cb9c36ce07a6472 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 15 Jun 2013 10:33:43 +0200 Subject: [PATCH] * Dashboard should use the vanilla InfoBar. --- src/libtomahawk/widgets/Dashboard.cpp | 15 ++++++++------- src/libtomahawk/widgets/Dashboard.h | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/libtomahawk/widgets/Dashboard.cpp b/src/libtomahawk/widgets/Dashboard.cpp index e8ed6708e..f6ab17bcf 100644 --- a/src/libtomahawk/widgets/Dashboard.cpp +++ b/src/libtomahawk/widgets/Dashboard.cpp @@ -52,15 +52,10 @@ using namespace Tomahawk; Dashboard::Dashboard( QWidget* parent ) : QWidget( parent ) , ui( new Ui::Dashboard ) - , m_header( new BasicHeader( this ) ) { QWidget* widget = new QWidget; ui->setupUi( widget ); - m_header->setPixmap( ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg", QSize( 0, 0 ) ) ); - m_header->setCaption( tr( "Dashboard" ) ); - m_header->setDescription( tr( "An overview of your recent activity" ) ); - ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) ); ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) ); @@ -163,7 +158,6 @@ Dashboard::Dashboard( QWidget* parent ) area->setAttribute( Qt::WA_MacShowFocusRect, 0 ); QVBoxLayout* layout = new QVBoxLayout(); - layout->addWidget( m_header ); layout->addWidget( area ); setLayout( layout ); TomahawkUtils::unmarginLayout( layout ); @@ -292,6 +286,13 @@ Dashboard::changeEvent( QEvent* e ) } +QPixmap +Dashboard::pixmap() const +{ + return ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg", QSize( 0, 0 ) ); +} + + QSize PlaylistDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const { @@ -456,4 +457,4 @@ PlaylistWidget::verifySize() if ( model()->rowCount() > 0 ) setFixedHeight( model()->rowCount() * itemDelegate()->sizeHint( QStyleOptionViewItem(), model()->index( 0, 0 ) ).height() + frameWidth() * 2 ); -} \ No newline at end of file +} diff --git a/src/libtomahawk/widgets/Dashboard.h b/src/libtomahawk/widgets/Dashboard.h index f8372b2af..74f4e14b6 100644 --- a/src/libtomahawk/widgets/Dashboard.h +++ b/src/libtomahawk/widgets/Dashboard.h @@ -92,10 +92,11 @@ public: virtual QWidget* widget() { return this; } virtual Tomahawk::playlistinterface_ptr playlistInterface() const; - virtual QString title() const { return tr( "Welcome to Tomahawk" ); } - virtual QString description() const { return QString(); } + virtual QString title() const { return tr( "Dashboard" ); } + virtual QString description() const { return tr( "An overview of your recent activity" ); } + virtual QPixmap pixmap() const; - virtual bool showInfoBar() const { return false; } + virtual bool showInfoBar() const { return true; } virtual bool isBeingPlayed() const; virtual bool jumpToCurrentTrack(); @@ -120,7 +121,6 @@ private slots: private: Ui::Dashboard *ui; - BasicHeader* m_header; RecentlyPlayedModel* m_tracksModel; AlbumModel* m_recentAlbumsModel; Tomahawk::playlistinterface_ptr m_playlistInterface;