mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Dashboard should use the vanilla InfoBar.
This commit is contained in:
@@ -52,15 +52,10 @@ using namespace Tomahawk;
|
|||||||
Dashboard::Dashboard( QWidget* parent )
|
Dashboard::Dashboard( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, ui( new Ui::Dashboard )
|
, ui( new Ui::Dashboard )
|
||||||
, m_header( new BasicHeader( this ) )
|
|
||||||
{
|
{
|
||||||
QWidget* widget = new QWidget;
|
QWidget* widget = new QWidget;
|
||||||
ui->setupUi( widget );
|
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->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
||||||
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
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 );
|
area->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
layout->addWidget( m_header );
|
|
||||||
layout->addWidget( area );
|
layout->addWidget( area );
|
||||||
setLayout( layout );
|
setLayout( layout );
|
||||||
TomahawkUtils::unmarginLayout( 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
|
QSize
|
||||||
PlaylistDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
PlaylistDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||||
{
|
{
|
||||||
|
@@ -92,10 +92,11 @@ public:
|
|||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
|
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
|
||||||
|
|
||||||
virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
|
virtual QString title() const { return tr( "Dashboard" ); }
|
||||||
virtual QString description() const { return QString(); }
|
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 isBeingPlayed() const;
|
||||||
|
|
||||||
virtual bool jumpToCurrentTrack();
|
virtual bool jumpToCurrentTrack();
|
||||||
@@ -120,7 +121,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::Dashboard *ui;
|
Ui::Dashboard *ui;
|
||||||
|
|
||||||
BasicHeader* m_header;
|
|
||||||
RecentlyPlayedModel* m_tracksModel;
|
RecentlyPlayedModel* m_tracksModel;
|
||||||
AlbumModel* m_recentAlbumsModel;
|
AlbumModel* m_recentAlbumsModel;
|
||||||
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||||
|
Reference in New Issue
Block a user