mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 01:24:11 +02:00
Readd a header widget to station view.
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
#include "playlist/dynamic/DynamicView.h"
|
#include "playlist/dynamic/DynamicView.h"
|
||||||
#include "DynamicSetupWidget.h"
|
#include "DynamicSetupWidget.h"
|
||||||
|
#include "widgets/BasicHeader.h"
|
||||||
#include "utils/AnimatedSpinner.h"
|
#include "utils/AnimatedSpinner.h"
|
||||||
#include "utils/TomahawkUtilsGui.h"
|
#include "utils/TomahawkUtilsGui.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
@@ -64,6 +65,9 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
|||||||
, m_view( 0 )
|
, m_view( 0 )
|
||||||
, m_model()
|
, m_model()
|
||||||
{
|
{
|
||||||
|
m_header = new BasicHeader;
|
||||||
|
m_layout->addWidget( m_header );
|
||||||
|
|
||||||
m_controls = new CollapsibleControls( this );
|
m_controls = new CollapsibleControls( this );
|
||||||
m_layout->addWidget( m_controls );
|
m_layout->addWidget( m_controls );
|
||||||
setContentsMargins( 0, 0, 0, 1 ); // to align the bottom with the bottom of the sourcelist
|
setContentsMargins( 0, 0, 0, 1 ); // to align the bottom with the bottom of the sourcelist
|
||||||
@@ -163,7 +167,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
|
|||||||
m_model->loadPlaylist( m_playlist );
|
m_model->loadPlaylist( m_playlist );
|
||||||
m_controlsChanged = false;
|
m_controlsChanged = false;
|
||||||
m_setup->setPlaylist( m_playlist );
|
m_setup->setPlaylist( m_playlist );
|
||||||
|
m_header->setCaption( m_playlist->title() );
|
||||||
|
|
||||||
if ( !m_playlist->author()->isLocal() ) // hide controls, as we show the description in the summary
|
if ( !m_playlist->author()->isLocal() ) // hide controls, as we show the description in the summary
|
||||||
m_layout->removeWidget( m_controls );
|
m_layout->removeWidget( m_controls );
|
||||||
@@ -551,5 +555,8 @@ DynamicWidget::onChanged()
|
|||||||
{
|
{
|
||||||
if ( !m_playlist.isNull() &&
|
if ( !m_playlist.isNull() &&
|
||||||
ViewManager::instance()->currentPage() == this )
|
ViewManager::instance()->currentPage() == this )
|
||||||
emit nameChanged( m_playlist->title() );
|
{
|
||||||
|
m_header->setCaption( m_playlist->title() );
|
||||||
|
emit nameChanged( m_playlist->title() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "playlist/dynamic/DynamicPlaylistRevision.h"
|
#include "playlist/dynamic/DynamicPlaylistRevision.h"
|
||||||
|
|
||||||
class AnimatedSpinner;
|
class AnimatedSpinner;
|
||||||
|
class BasicHeader;
|
||||||
class QShowEvent;
|
class QShowEvent;
|
||||||
class QHideEvent;
|
class QHideEvent;
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
@@ -121,6 +122,7 @@ private:
|
|||||||
bool m_controlsChanged;
|
bool m_controlsChanged;
|
||||||
QWidget* m_steering;
|
QWidget* m_steering;
|
||||||
|
|
||||||
|
BasicHeader* m_header;
|
||||||
CollapsibleControls* m_controls;
|
CollapsibleControls* m_controls;
|
||||||
|
|
||||||
DynamicView* m_view;
|
DynamicView* m_view;
|
||||||
|
Reference in New Issue
Block a user