mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
* Give Dashboard a header.
This commit is contained in:
@@ -33,9 +33,11 @@
|
||||
#include "playlist/RecentlyPlayedModel.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "widgets/OverlayWidget.h"
|
||||
#include "widgets/BasicHeader.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
#include "utils/TomahawkStyle.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QPainter>
|
||||
@@ -51,10 +53,15 @@ 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" ) );
|
||||
|
||||
RecentPlaylistsModel* model = new RecentPlaylistsModel( HISTORY_PLAYLIST_ITEMS, this );
|
||||
|
||||
QPalette trackViewPal = ui->tracksView->palette();
|
||||
@@ -102,6 +109,7 @@ 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 );
|
||||
|
@@ -37,6 +37,7 @@
|
||||
class AlbumModel;
|
||||
class RecentlyPlayedModel;
|
||||
class OverlayWidget;
|
||||
class BasicHeader;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -116,6 +117,7 @@ private slots:
|
||||
private:
|
||||
Ui::Dashboard *ui;
|
||||
|
||||
BasicHeader* m_header;
|
||||
RecentlyPlayedModel* m_tracksModel;
|
||||
AlbumModel* m_recentAlbumsModel;
|
||||
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||
|
Reference in New Issue
Block a user