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