1
0
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:
Christian Muehlhaeuser
2012-11-16 08:29:10 +01:00
parent 98aa172975
commit 23afd7a8a4
2 changed files with 15 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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