+ /* Lookups */
+ QStringList selectedURIs();
+ QModelIndex index( PLItem *, const int c ) const;
+ QModelIndex index( const int i_id, const int c );
+ QModelIndex currentIndex() const;
+ bool isParent( const QModelIndex &index, const QModelIndex ¤t) const;
+ bool isCurrent( const QModelIndex &index ) const;
+ int itemId( const QModelIndex &index ) const;
+ static int columnFromMeta( int meta_column );
+ static int columnToMeta( int column );
+
+ /* Actions */
+ bool popup( const QModelIndex & index, const QPoint &point, const QModelIndexList &list );
+ void doDelete( QModelIndexList selected );
+ void search( const QString& search_text, const QModelIndex & root, bool b_recursive );
+ void sort( const int column, Qt::SortOrder order );
+ void sort( const int i_root_id, const int column, Qt::SortOrder order );
+ void rebuild();
+ void rebuild( playlist_item_t * );
+
+ inline PLItem *getItem( QModelIndex index ) const
+ {
+ if( index.isValid() )
+ return static_cast<PLItem*>( index.internalPointer() );
+ else return rootItem;
+ }
+
+signals:
+ void currentChanged( const QModelIndex& );
+ void rootChanged();
+
+public slots:
+ void activateItem( const QModelIndex &index );
+ void activateItem( playlist_item_t *p_item );