#include <playlistitem.h>
Public Types | |
enum | FLAGS { FREE = 0, EDITING, SCHEDULED_FOR_DELETION } |
Public Member Functions | |
PlayListItem () | |
PlayListItem (const PlayListItem &item) | |
PlayListItem (FileInfo *info) | |
~PlayListItem () | |
void | setSelected (bool select) |
bool | isSelected () const |
void | setCurrent (bool yes) |
bool | isCurrent () const |
FLAGS | flag () const |
void | setFlag (FLAGS) |
const QString | text () |
void | setText (const QString &title) |
qint64 | length () const |
void | setLength (qint64 length) |
const QString | url () const |
void | updateMetaData (const QMap< Qmmp::MetaData, QString > &metaData) |
void | updateTags () |
enum FLAGS |
Current state of playlist item. FREE - instance is free and may be deleted EDITING - instance is currently busy in some kind of operation(tags editing etc.) and can't be deleted at the moment. Set flag SCHEDULED_FOR_DELETION for it instead of delete operator call.
PlayListItem | ( | ) |
Constructs an empty plalist item.
PlayListItem | ( | const PlayListItem & | item | ) |
Constructs a new PlayListItem that is a copy of the given item
PlayListItem | ( | FileInfo * | info | ) |
Constructs plalist item with given metadata.
info | Media file information. |
~PlayListItem | ( | ) |
Object destructor.
FLAGS flag | ( | ) | const |
Returns current state of the playlist item.
bool isCurrent | ( | ) | const |
Returns true if the item is the current item; otherwise returns returns false.
bool isSelected | ( | ) | const |
Return true if item is selected, otherwise returns false.
qint64 length | ( | ) | const |
Returns song length in seconds.
void setCurrent | ( | bool | yes | ) |
It is used by PlayListModel class.
void setFlag | ( | FLAGS | ) |
Sets state of the playlist item.
void setLength | ( | qint64 | length | ) |
Sets length in seconds.
void setSelected | ( | bool | select | ) |
Sets item selection flag to select
select | State of selection (true select, false unselect) |
void setText | ( | const QString & | title | ) |
Direct access to the item short title.
title | New short title. |
const QString text | ( | ) |
Returns item short title.
void updateMetaData | ( | const QMap< Qmmp::MetaData, QString > & | metaData | ) |
Updates current metadata.
metaData | Map with metadata values. |
void updateTags | ( | ) |
Gets new metadata from file (works for local files only).
const QString url | ( | ) | const |
Same as url()