Commit 3a3af320 authored by François Cartegnie's avatar François Cartegnie 🤞

Qt: PLItem: add playlist flags

parent 4d373439
......@@ -60,6 +60,7 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent )
parentItem = parent; /* Can be NULL, but only for the rootItem */
i_playlist_id = _playlist_item->i_id; /* Playlist item specific id */
p_input = _playlist_item->p_input;
i_flags = _playlist_item->i_flags;
vlc_gc_incref( p_input );
}
......@@ -156,3 +157,8 @@ QString PLItem::getTitle() const
free(fb_name);
return title;
}
bool PLItem::readOnly() const
{
return i_flags & PLAYLIST_RO_FLAG;
}
......@@ -64,6 +64,7 @@ protected:
void clearChildren();
virtual QUrl getURI() const = 0;
virtual QString getTitle() const = 0;
virtual bool readOnly() const = 0;
QList<AbstractPLItem *> children;
AbstractPLItem *parentItem;
......@@ -85,6 +86,7 @@ private:
AbstractPLItem *child( int id ) const { return children.value( id ); };
virtual QUrl getURI() const;
virtual QString getTitle() const;
virtual bool readOnly() const;
/* Local */
PLItem( playlist_item_t *, PLItem *parent );
......@@ -94,6 +96,7 @@ private:
PLItem( playlist_item_t * );
void init( playlist_item_t *, PLItem * );
int i_playlist_id;
int i_flags;
input_item_t *p_input;
};
......
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