mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Implemented Flexible(Tree)View's isBeingPlayed().
This commit is contained in:
parent
357d9b13d5
commit
6ea6628ff0
@ -22,6 +22,7 @@
|
||||
#include <QStackedWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "widgets/FilterHeader.h"
|
||||
#include "playlist/TreeModel.h"
|
||||
#include "playlist/ColumnView.h"
|
||||
@ -53,6 +54,8 @@ FlexibleTreeView::FlexibleTreeView( QWidget* parent, QWidget* extraHeader )
|
||||
|
||||
m_treeView->proxyModel()->setStyle( PlayableProxyModel::Collection );
|
||||
|
||||
m_treeView->proxyModel()->setPlaylistInterface( m_columnView->proxyModel()->playlistInterface() );
|
||||
|
||||
// m_trackView->setPlaylistInterface( m_playlistInterface );
|
||||
// m_columnView->setPlaylistInterface( m_trackView->proxyModel()->playlistInterface() );
|
||||
// m_gridView->setPlaylistInterface( m_trackView->proxyModel()->playlistInterface() );
|
||||
@ -332,3 +335,19 @@ FlexibleTreeView::setTemporaryPage( bool b )
|
||||
{
|
||||
m_temporary = b;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
FlexibleTreeView::isBeingPlayed() const
|
||||
{
|
||||
if ( !playlistInterface() )
|
||||
return false;
|
||||
|
||||
if ( playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
||||
return true;
|
||||
|
||||
if ( playlistInterface()->hasChildInterface( AudioEngine::instance()->currentTrackPlaylist() ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool jumpToCurrentTrack();
|
||||
virtual bool isTemporaryPage() const;
|
||||
virtual bool isBeingPlayed() const;
|
||||
void setTemporaryPage( bool b );
|
||||
|
||||
ColumnView* columnView() const { return m_columnView; }
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <QStackedWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "widgets/FilterHeader.h"
|
||||
#include "playlist/ModeHeader.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
@ -338,3 +339,19 @@ FlexibleView::setTemporaryPage( bool b )
|
||||
{
|
||||
m_temporary = b;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
FlexibleView::isBeingPlayed() const
|
||||
{
|
||||
if ( !playlistInterface() )
|
||||
return false;
|
||||
|
||||
if ( playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
||||
return true;
|
||||
|
||||
if ( playlistInterface()->hasChildInterface( AudioEngine::instance()->currentTrackPlaylist() ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool jumpToCurrentTrack();
|
||||
virtual bool isTemporaryPage() const;
|
||||
virtual bool isBeingPlayed() const;
|
||||
void setTemporaryPage( bool b );
|
||||
|
||||
TrackView* trackView() const { return m_trackView; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user