mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
fix some station workflow issues
This commit is contained in:
@@ -92,6 +92,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
|||||||
|
|
||||||
connect( PlaylistManager::instance(), SIGNAL( playClicked() ), this, SLOT( playPressed() ) );
|
connect( PlaylistManager::instance(), SIGNAL( playClicked() ), this, SLOT( playPressed() ) );
|
||||||
connect( PlaylistManager::instance(), SIGNAL( pauseClicked() ), this, SLOT( pausePressed() ) );
|
connect( PlaylistManager::instance(), SIGNAL( pauseClicked() ), this, SLOT( pausePressed() ) );
|
||||||
|
connect( AudioEngine::instance(), SIGNAL( playlistChanged( PlaylistInterface* ) ), this, SLOT( playlistStopped( PlaylistInterface* ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicWidget::~DynamicWidget()
|
DynamicWidget::~DynamicWidget()
|
||||||
@@ -207,18 +208,22 @@ DynamicWidget::layoutFloatingWidgets()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicWidget::hideEvent( QHideEvent* ev )
|
DynamicWidget::playlistStopped( PlaylistInterface* pl )
|
||||||
{
|
{
|
||||||
|
if( pl == static_cast< PlaylistInterface* >( m_view->proxyModel() ) ) // same playlist, so don't stop
|
||||||
|
return;
|
||||||
|
|
||||||
|
// user started playing something somewhere else, so give it a rest
|
||||||
if( m_runningOnDemand ) {
|
if( m_runningOnDemand ) {
|
||||||
stopStation( false );
|
stopStation( false );
|
||||||
|
m_model->clear();
|
||||||
}
|
}
|
||||||
QWidget::hideEvent( ev );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicWidget::showEvent(QShowEvent* )
|
DynamicWidget::showEvent(QShowEvent* )
|
||||||
{
|
{
|
||||||
if( !m_playlist.isNull() ) {
|
if( !m_playlist.isNull() && !m_runningOnDemand ) {
|
||||||
m_setup->fadeIn();
|
m_setup->fadeIn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,6 @@ public:
|
|||||||
|
|
||||||
virtual QSize sizeHint() const;
|
virtual QSize sizeHint() const;
|
||||||
virtual void resizeEvent( QResizeEvent* );
|
virtual void resizeEvent( QResizeEvent* );
|
||||||
virtual void hideEvent(QHideEvent* );
|
|
||||||
virtual void showEvent(QShowEvent* );
|
virtual void showEvent(QShowEvent* );
|
||||||
|
|
||||||
static void paintRoundedFilledRect( QPainter& p, QPalette& pal, QRect& r, qreal opacity = .95 );
|
static void paintRoundedFilledRect( QPainter& p, QPalette& pal, QRect& r, qreal opacity = .95 );
|
||||||
@@ -90,6 +89,8 @@ public slots:
|
|||||||
void pausePressed();
|
void pausePressed();
|
||||||
void stationFailed( const QString& );
|
void stationFailed( const QString& );
|
||||||
|
|
||||||
|
void playlistStopped( PlaylistInterface* );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void generate( int = -1 );
|
void generate( int = -1 );
|
||||||
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
|
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
|
||||||
|
Reference in New Issue
Block a user