mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
* Fixed queue not allowing to remove items from it.
This commit is contained in:
@@ -517,6 +517,7 @@ AudioControls::onTrackClicked()
|
|||||||
ViewManager::instance()->showCurrentTrack();
|
ViewManager::instance()->showCurrentTrack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioControls::dragEnterEvent( QDragEnterEvent* e )
|
AudioControls::dragEnterEvent( QDragEnterEvent* e )
|
||||||
{
|
{
|
||||||
@@ -524,13 +525,15 @@ AudioControls::dragEnterEvent( QDragEnterEvent* e )
|
|||||||
e->acceptProposedAction();
|
e->acceptProposedAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioControls::dragMoveEvent( QDragMoveEvent* e )
|
AudioControls::dragMoveEvent( QDragMoveEvent* /* e */ )
|
||||||
{
|
{
|
||||||
// if ( GlobalActionManager::instance()->acceptsMimeData( e->mimeData() ) )
|
// if ( GlobalActionManager::instance()->acceptsMimeData( e->mimeData() ) )
|
||||||
// e->acceptProposedAction();
|
// e->acceptProposedAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioControls::dropEvent( QDropEvent* e )
|
AudioControls::dropEvent( QDropEvent* e )
|
||||||
{
|
{
|
||||||
@@ -544,6 +547,7 @@ AudioControls::dropEvent( QDropEvent* e )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioControls::droppedTracks( QList< query_ptr > tracks )
|
AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||||
{
|
{
|
||||||
|
@@ -74,6 +74,7 @@ public:
|
|||||||
virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
|
virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
|
||||||
|
|
||||||
bool isTemporary() const;
|
bool isTemporary() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
@@ -62,6 +62,7 @@ public:
|
|||||||
virtual QModelIndex parent( const QModelIndex& child ) const;
|
virtual QModelIndex parent( const QModelIndex& child ) const;
|
||||||
|
|
||||||
virtual bool isReadOnly() const { return m_readOnly; }
|
virtual bool isReadOnly() const { return m_readOnly; }
|
||||||
|
virtual void setReadOnly( bool b ) { m_readOnly = b; }
|
||||||
|
|
||||||
virtual QString title() const { return m_title; }
|
virtual QString title() const { return m_title; }
|
||||||
virtual void setTitle( const QString& title ) { m_title = title; }
|
virtual void setTitle( const QString& title ) { m_title = title; }
|
||||||
@@ -114,9 +115,6 @@ public slots:
|
|||||||
virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
|
virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
|
||||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void setReadOnly( bool b ) { m_readOnly = b; }
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onPlaybackFinished( const Tomahawk::result_ptr& result );
|
void onPlaybackFinished( const Tomahawk::result_ptr& result );
|
||||||
void onPlaybackStopped();
|
void onPlaybackStopped();
|
||||||
|
@@ -89,6 +89,7 @@ ViewManager::ViewManager( QObject* parent )
|
|||||||
m_queueView = new QueueView( m_splitter );
|
m_queueView = new QueueView( m_splitter );
|
||||||
m_queueModel = new PlaylistModel( m_queueView );
|
m_queueModel = new PlaylistModel( m_queueView );
|
||||||
m_queueView->queue()->setPlaylistModel( m_queueModel );
|
m_queueView->queue()->setPlaylistModel( m_queueModel );
|
||||||
|
m_queueView->queue()->playlistModel()->setReadOnly( false );
|
||||||
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel() );
|
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel() );
|
||||||
|
|
||||||
m_splitter->addWidget( m_queueView );
|
m_splitter->addWidget( m_queueView );
|
||||||
|
Reference in New Issue
Block a user