mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Get rid of passing tomahawkLoaded signal through TomahawkWindow and ViewManager.
This commit is contained in:
@@ -87,7 +87,6 @@ ViewManager::ViewManager( QObject* parent )
|
|||||||
, m_inboxWidget( 0 )
|
, m_inboxWidget( 0 )
|
||||||
, m_networkActivityWidget( 0 )
|
, m_networkActivityWidget( 0 )
|
||||||
, m_currentPage( 0 )
|
, m_currentPage( 0 )
|
||||||
, m_loaded( false )
|
|
||||||
{
|
{
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
@@ -123,8 +122,6 @@ ViewManager::ViewManager( QObject* parent )
|
|||||||
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
|
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
|
||||||
connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
|
connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
|
||||||
|
|
||||||
connect( this, SIGNAL( tomahawkLoaded() ), m_dashboard, SLOT( loadData() ) );
|
|
||||||
|
|
||||||
/* connect( m_infobar, SIGNAL( flatMode() ), SLOT( setTableMode() ) );
|
/* connect( m_infobar, SIGNAL( flatMode() ), SLOT( setTableMode() ) );
|
||||||
connect( m_infobar, SIGNAL( artistMode() ), SLOT( setTreeMode() ) );
|
connect( m_infobar, SIGNAL( artistMode() ), SLOT( setTreeMode() ) );
|
||||||
connect( m_infobar, SIGNAL( albumMode() ), SLOT( setAlbumMode() ) );*/
|
connect( m_infobar, SIGNAL( albumMode() ), SLOT( setAlbumMode() ) );*/
|
||||||
@@ -766,14 +763,6 @@ ViewManager::onWidgetDestroyed( QWidget* widget )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
ViewManager::setTomahawkLoaded()
|
|
||||||
{
|
|
||||||
m_loaded = true;
|
|
||||||
emit tomahawkLoaded();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ViewPage*
|
ViewPage*
|
||||||
ViewManager::pageForDynPlaylist(const dynplaylist_ptr& pl) const
|
ViewManager::pageForDynPlaylist(const dynplaylist_ptr& pl) const
|
||||||
{
|
{
|
||||||
|
@@ -119,8 +119,6 @@ public:
|
|||||||
|
|
||||||
FlexibleView* createPageForList( const QString& title, const QList< Tomahawk::query_ptr >& queries );
|
FlexibleView* createPageForList( const QString& title, const QList< Tomahawk::query_ptr >& queries );
|
||||||
|
|
||||||
bool isTomahawkLoaded() const { return m_loaded; }
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void filterAvailable( bool b );
|
void filterAvailable( bool b );
|
||||||
|
|
||||||
@@ -135,8 +133,6 @@ signals:
|
|||||||
void showQueueRequested();
|
void showQueueRequested();
|
||||||
void hideQueueRequested();
|
void hideQueueRequested();
|
||||||
|
|
||||||
void tomahawkLoaded();
|
|
||||||
|
|
||||||
void historyBackAvailable( bool avail );
|
void historyBackAvailable( bool avail );
|
||||||
void historyForwardAvailable( bool avail );
|
void historyForwardAvailable( bool avail );
|
||||||
|
|
||||||
@@ -177,8 +173,6 @@ public slots:
|
|||||||
|
|
||||||
void playlistInterfaceChanged( Tomahawk::playlistinterface_ptr );
|
void playlistInterfaceChanged( Tomahawk::playlistinterface_ptr );
|
||||||
|
|
||||||
void setTomahawkLoaded();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setFilter( const QString& filter );
|
void setFilter( const QString& filter );
|
||||||
void applyFilter();
|
void applyFilter();
|
||||||
@@ -231,8 +225,6 @@ private:
|
|||||||
QTimer m_filterTimer;
|
QTimer m_filterTimer;
|
||||||
QString m_filter;
|
QString m_filter;
|
||||||
|
|
||||||
bool m_loaded;
|
|
||||||
|
|
||||||
static ViewManager* s_instance;
|
static ViewManager* s_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -121,7 +121,6 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
|||||||
|
|
||||||
connect( vm, SIGNAL( showQueueRequested() ), SLOT( showQueue() ) );
|
connect( vm, SIGNAL( showQueueRequested() ), SLOT( showQueue() ) );
|
||||||
connect( vm, SIGNAL( hideQueueRequested() ), SLOT( hideQueue() ) );
|
connect( vm, SIGNAL( hideQueueRequested() ), SLOT( hideQueue() ) );
|
||||||
connect( APP, SIGNAL( tomahawkLoaded() ), vm, SLOT( setTomahawkLoaded() ) ); // Pass loaded signal into libtomahawk so components in there can connect to ViewManager
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
connect( AudioEngine::instance(), SIGNAL( stateChanged( AudioState, AudioState) ), SLOT( audioStateChanged( AudioState, AudioState) ) );
|
connect( AudioEngine::instance(), SIGNAL( stateChanged( AudioState, AudioState) ), SLOT( audioStateChanged( AudioState, AudioState) ) );
|
||||||
|
Reference in New Issue
Block a user