PlayListItem Class Reference

The PlayListItem class provides an item for use with the PlayListModel class. More...

#include <playlistitem.h>

List of all members.

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 ()


Detailed Description

The PlayListItem class provides an item for use with the PlayListModel class.

Author:
Ilya Kotov <forkotov02@hotmail.ru>

Member Enumeration Documentation

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.

Enumerator:
FREE  instance is free and may be deleted
EDITING  instance is currently busy
SCHEDULED_FOR_DELETION  instance is sheduled for deletion


Constructor & Destructor Documentation

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.

Parameters:
info Media file information.

~PlayListItem (  ) 

Object destructor.


Member Function Documentation

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

Parameters:
select State of selection (true select, false unselect)

void setText ( const QString &  title  ) 

Direct access to the item short title.

Parameters:
title New short title.

const QString text (  ) 

Returns item short title.

void updateMetaData ( const QMap< Qmmp::MetaData, QString > &  metaData  ) 

Updates current metadata.

Parameters:
metaData Map with metadata values.

void updateTags (  ) 

Gets new metadata from file (works for local files only).

const QString url (  )  const

Same as url()


The documentation for this class was generated from the following file:

Generated on Thu Nov 10 20:39:11 2011 for Qmmp by  doxygen 1.5.9