Commit 03fef5e5 authored by Jakob Leben's avatar Jakob Leben

Qt: add public index-from-id function to PLModel

parent 69ec164a
......@@ -385,6 +385,11 @@ QModelIndex PLModel::index( int row, int column, const QModelIndex &parent )
return QModelIndex();
}
QModelIndex PLModel::index( int i_id, int c )
{
return index( findById( rootItem, i_id ), c );
}
/* Return the index of a given item */
QModelIndex PLModel::index( PLItem *item, int column ) const
{
......
......@@ -82,6 +82,7 @@ public:
/* Lookups */
QStringList selectedURIs();
QModelIndex index( PLItem *, int c ) const;
QModelIndex index( int i_id, int c );
QModelIndex currentIndex( ) { return index( currentItem, 0 ); };
bool isCurrent( const QModelIndex &index ) const;
int itemId( const QModelIndex &index ) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment