1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

* Added itemFromIndex to PlayableModel.

This commit is contained in:
Christian Muehlhaeuser
2013-05-19 00:31:40 +02:00
committed by Michael Zanetti
parent 266de41624
commit 2156466762
2 changed files with 8 additions and 0 deletions

View File

@@ -816,6 +816,13 @@ PlayableModel::finishLoading()
}
PlayableItem*
PlayableModel::itemFromIndex( int itemIndex ) const
{
return itemFromIndex( index( itemIndex, 0, QModelIndex() ) );
}
PlayableItem*
PlayableModel::itemFromIndex( const QModelIndex& index ) const
{

View File

@@ -120,6 +120,7 @@ public:
virtual void ensureResolved();
Q_INVOKABLE PlayableItem* itemFromIndex( int itemIndex ) const;
virtual PlayableItem* itemFromIndex( const QModelIndex& index ) const;
virtual PlayableItem* itemFromQuery( const Tomahawk::query_ptr& query ) const;
virtual PlayableItem* itemFromResult( const Tomahawk::result_ptr& result ) const;