mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-19 15:37:01 +01:00
* Adjust to new ViewPage interface.
This commit is contained in:
parent
c99cfe54ed
commit
1309334f99
@ -96,7 +96,6 @@ ViewManager::ViewManager( QObject* parent )
|
||||
m_superCollectionView->proxyModel()->setStyle( PlayableProxyModel::Collection );
|
||||
m_superCollectionModel = new TreeModel( m_superCollectionView );
|
||||
m_superCollectionView->setTreeModel( m_superCollectionModel );
|
||||
m_superCollectionView->setShowModes( false );
|
||||
// m_superCollectionView->proxyModel()->setShowOfflineResults( false );
|
||||
|
||||
m_stack->setContentsMargins( 0, 0, 0, 0 );
|
||||
@ -657,11 +656,6 @@ ViewManager::updateView()
|
||||
|
||||
emit filterAvailable( currentPage()->showFilter() );
|
||||
|
||||
/* if ( !currentPage()->showStatsBar() && !currentPage()->showModes() && !currentPage()->showFilter() )
|
||||
m_topbar->setVisible( false );
|
||||
else
|
||||
m_topbar->setVisible( true );*/
|
||||
|
||||
m_infobar->setVisible( currentPage()->showInfoBar() );
|
||||
m_infobar->setCaption( currentPage()->title() );
|
||||
m_infobar->setUpdaters( currentPage()->updaters() );
|
||||
|
@ -31,7 +31,8 @@ class DLLEXPORT CustomPlaylistView : public PlaylistView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum PlaylistType {
|
||||
enum PlaylistType
|
||||
{
|
||||
SourceLovedTracks,
|
||||
TopLovedTracks
|
||||
};
|
||||
@ -40,7 +41,6 @@ public:
|
||||
virtual ~CustomPlaylistView();
|
||||
|
||||
virtual bool showFilter() const { return true; }
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
|
||||
virtual QString title() const;
|
||||
virtual QPixmap pixmap() const;
|
||||
|
@ -47,12 +47,7 @@ public:
|
||||
virtual QString description() const;
|
||||
virtual QPixmap pixmap() const;
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showFilter() const { return true; }
|
||||
|
||||
// virtual void setShowModes( bool b ) { m_showModes = b; }
|
||||
virtual bool showModes() const { return false; }
|
||||
|
||||
virtual bool setFilter( const QString& filter );
|
||||
virtual bool jumpToCurrentTrack();
|
||||
|
||||
|
@ -69,8 +69,6 @@ public:
|
||||
virtual QString title() const { return m_model->title(); }
|
||||
virtual QString description() const { return m_model->description(); }
|
||||
|
||||
virtual bool showModes() const { return true; }
|
||||
|
||||
virtual bool setFilter( const QString& filter );
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
|
||||
|
@ -69,9 +69,7 @@ public:
|
||||
virtual QString description() const;
|
||||
virtual QPixmap pixmap() const;
|
||||
|
||||
virtual bool showModes() const { return true; }
|
||||
virtual bool showFilter() const { return true; }
|
||||
|
||||
virtual bool setFilter( const QString& filter );
|
||||
virtual bool jumpToCurrentTrack();
|
||||
|
||||
|
@ -54,7 +54,6 @@ TreeView::TreeView( QWidget* parent )
|
||||
, m_loadingSpinner( new LoadingSpinner( this ) )
|
||||
, m_updateContextView( true )
|
||||
, m_contextMenu( new ContextMenu( this ) )
|
||||
, m_showModes( true )
|
||||
{
|
||||
setFrameShape( QFrame::NoFrame );
|
||||
setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
|
@ -70,12 +70,7 @@ public:
|
||||
virtual QString description() const { return m_model->description(); }
|
||||
virtual QPixmap pixmap() const { return m_model->icon(); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showFilter() const { return true; }
|
||||
|
||||
virtual void setShowModes( bool b ) { m_showModes = b; }
|
||||
virtual bool showModes() const { return m_showModes; }
|
||||
|
||||
virtual bool setFilter( const QString& filter );
|
||||
virtual bool jumpToCurrentTrack();
|
||||
|
||||
@ -128,7 +123,6 @@ private:
|
||||
Tomahawk::ContextMenu* m_contextMenu;
|
||||
|
||||
QString m_emptyTip;
|
||||
bool m_showModes;
|
||||
QTimer m_timer;
|
||||
mutable QString m_guid;
|
||||
};
|
||||
|
@ -50,8 +50,6 @@ public:
|
||||
virtual QString title() const { return tr( "Create a new playlist" ); }
|
||||
virtual QString description() const { return QString(); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
|
||||
protected:
|
||||
|
@ -71,11 +71,10 @@ public:
|
||||
virtual QString title() const { return tr( "New Releases" ); }
|
||||
virtual QString description() const { return QString(); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
|
@ -49,13 +49,12 @@ public:
|
||||
|
||||
virtual QWidget* widget() { return this; }
|
||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
|
||||
virtual QString title() const { return QString( tr( "Search: %1" ) ).arg( m_search ); }
|
||||
virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
|
||||
virtual QPixmap pixmap() const { return QPixmap( RESPATH "images/search-icon.png" ); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
|
||||
|
@ -62,9 +62,6 @@ public:
|
||||
virtual QString description() const { return m_description; }
|
||||
virtual QString longDescription() const { return m_longDescription; }
|
||||
virtual QPixmap pixmap() const { if ( m_pixmap.isNull() ) return Tomahawk::ViewPage::pixmap(); else return m_pixmap; }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
|
||||
signals:
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
PlaylistWidget( QWidget* parent = 0 );
|
||||
|
||||
OverlayWidget* overlay() const { return m_overlay; }
|
||||
|
||||
|
||||
virtual void setModel( QAbstractItemModel* model );
|
||||
|
||||
signals:
|
||||
@ -98,11 +98,10 @@ public:
|
||||
virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
|
||||
virtual QString description() const { return QString(); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
|
@ -69,11 +69,10 @@ public:
|
||||
virtual QString title() const { return tr( "Charts" ); }
|
||||
virtual QString description() const { return QString(); }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
|
@ -68,10 +68,9 @@ public:
|
||||
virtual QPixmap pixmap() const { if ( m_pixmap.isNull() ) return Tomahawk::ViewPage::pixmap(); else return m_pixmap; }
|
||||
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
public slots:
|
||||
/** \brief Loads information for a given album.
|
||||
|
@ -77,7 +77,6 @@ public:
|
||||
virtual QPixmap pixmap() const { if ( m_pixmap.isNull() ) return Tomahawk::ViewPage::pixmap(); else return m_pixmap; }
|
||||
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
|
@ -52,8 +52,6 @@ public:
|
||||
virtual QString description() const { return m_description; }
|
||||
virtual QPixmap pixmap() const { return m_pixmap; }
|
||||
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
|
||||
protected:
|
||||
|
@ -64,12 +64,11 @@ public:
|
||||
virtual QString longDescription() const { return QString(); }
|
||||
virtual QPixmap pixmap() const { if ( m_pixmap.isNull() ) return Tomahawk::ViewPage::pixmap(); else return m_pixmap; }
|
||||
|
||||
virtual bool isBeingPlayed() const;
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
virtual bool showStatsBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
public slots:
|
||||
void load( const Tomahawk::query_ptr& query );
|
||||
|
Loading…
x
Reference in New Issue
Block a user