PLItem *parent() { return parentItem; }
input_item_t *inputItem() { return p_input; }
+ int id() { return i_id; }
protected:
QList<PLItem*> children;
#undef CACHE
#undef ICACHE
-PLItem *PLModel::getItem( QModelIndex index )
-{
- assert( index.isValid() );
- return static_cast<PLItem*>( index.internalPointer() );
-}
-
int PLModel::columnToMeta( int _column ) const
{
int meta = 1;
void removeItem( int );
void rebuild(); void rebuild( playlist_item_t *, bool b_first = false );
- static inline PLItem *getItem( QModelIndex index );
+ inline PLItem *getItem( QModelIndex index ) const
+ {
+ if( index.isValid() )
+ return static_cast<PLItem*>( index.internalPointer() );
+ else return rootItem;
+ }
private: