mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
* ContextMenu can now pass a PlaylistInterface onto the MetadataEditor.
This commit is contained in:
@@ -262,7 +262,7 @@ ContextMenu::onTriggered( int action )
|
||||
|
||||
case ActionEditMetadata:
|
||||
if ( !m_queries.first()->results().isEmpty() ) {
|
||||
MetadataEditor* d = new MetadataEditor( m_queries.first()->results().first(), this );
|
||||
MetadataEditor* d = new MetadataEditor( m_queries.first()->results().first(), m_interface, this );
|
||||
d->show();
|
||||
}
|
||||
break;
|
||||
@@ -347,3 +347,10 @@ ContextMenu::onSocialActionsLoaded()
|
||||
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ContextMenu::setPlaylistInterface( const Tomahawk::playlistinterface_ptr& interface )
|
||||
{
|
||||
m_interface = interface;
|
||||
}
|
||||
|
@@ -52,6 +52,8 @@ public:
|
||||
int supportedActions() const { return m_supportedActions; }
|
||||
void setSupportedActions( int actions ) { m_supportedActions = actions; }
|
||||
|
||||
void setPlaylistInterface( const Tomahawk::playlistinterface_ptr& interface );
|
||||
|
||||
void setQuery( const Tomahawk::query_ptr& query );
|
||||
void setQueries( const QList<Tomahawk::query_ptr>& queries );
|
||||
|
||||
@@ -82,9 +84,11 @@ private:
|
||||
|
||||
QAction* m_loveAction;
|
||||
|
||||
QList<Tomahawk::query_ptr> m_queries;
|
||||
QList<Tomahawk::artist_ptr> m_artists;
|
||||
QList<Tomahawk::album_ptr> m_albums;
|
||||
QList< Tomahawk::query_ptr > m_queries;
|
||||
QList< Tomahawk::artist_ptr > m_artists;
|
||||
QList< Tomahawk::album_ptr > m_albums;
|
||||
|
||||
Tomahawk::playlistinterface_ptr m_interface;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
Reference in New Issue
Block a user