Qmmp
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
PlayListTrack Class Reference

#include <playlisttrack.h>

Inheritance diagram for PlayListTrack:
TrackInfo PlayListItem

Public Member Functions

 PlayListTrack ()
 
 PlayListTrack (const PlayListTrack &other)
 
 PlayListTrack (const TrackInfo *info)
 
virtual ~PlayListTrack ()
 
PlayListTrackoperator= (const PlayListTrack &other)
 
QString formattedTitle (int column) override
 
QStringList formattedTitles () override
 
QString formattedLength () override
 
void updateMetaData (const TrackInfo *info)
 
void updateMetaData ()
 
const QString & groupName ()
 
bool isGroup () const override
 
int trackIndex () const override
 
int queuedIndex () const
 
bool isQueued () const
 
void beginUsage ()
 
void endUsage ()
 
void deleteLater ()
 
bool isSheduledForDeletion () const
 
bool isUsed () const
 
- Public Member Functions inherited from TrackInfo
 TrackInfo ()
 
 TrackInfo (const QString &path)
 
 TrackInfo (const TrackInfo &other)
 
 ~TrackInfo ()
 
TrackInfooperator= (const TrackInfo &info)
 
bool operator== (const TrackInfo &info) const
 
bool operator!= (const TrackInfo &info) const
 
qint64 duration () const
 
bool isEmpty () const
 
const QString & path () const
 
const QString value (Qmmp::MetaData key) const
 
const QString value (Qmmp::TrackProperty key) const
 
double value (Qmmp::ReplayGainKey key) const
 
const QMap< Qmmp::MetaData, QString > & metaData () const
 
const QMap< Qmmp::TrackProperty, QString > & properties () const
 
const QMap< Qmmp::ReplayGainKey, double > & replayGainInfo () const
 
Parts parts () const
 
void setDuration (qint64 duration)
 
void setValue (Qmmp::MetaData key, const QVariant &value)
 
void setValue (Qmmp::TrackProperty key, const QVariant &value)
 
void setValue (Qmmp::ReplayGainKey key, double value)
 
void setValue (Qmmp::ReplayGainKey key, const QString &value)
 
void setValues (const QMap< Qmmp::MetaData, QString > &metaData)
 
void setValues (const QMap< Qmmp::TrackProperty, QString > &properties)
 
void setValues (const QMap< Qmmp::ReplayGainKey, double > &replayGainInfo)
 
void updateValues (const QMap< Qmmp::MetaData, QString > &metaData)
 
void updateValues (const QMap< Qmmp::TrackProperty, QString > &properties)
 
void updateValues (const QMap< Qmmp::ReplayGainKey, double > &replayGainInfo)
 
void setPath (const QString &path)
 
void clear (Parts parts)
 
void clear ()
 
- Public Member Functions inherited from PlayListItem
 PlayListItem ()
 
virtual ~PlayListItem ()
 
void setSelected (bool select)
 
bool isSelected () const
 

Friends

class PlayListContainer
 
class NormalContainer
 
class GroupedContainer
 

Additional Inherited Members

- Public Types inherited from TrackInfo
enum  Part { MetaData = 0x1 , Properties = 0x2 , ReplayGainInfo = 0x4 , AllParts = MetaData | Properties | ReplayGainInfo }
 

Detailed Description

The PlayListTrack class provides a track for use with the PlayListModel class.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Constructor & Destructor Documentation

◆ PlayListTrack() [1/3]

Constructs an empty plalist item.

◆ PlayListTrack() [2/3]

PlayListTrack ( const PlayListTrack & other)
explicit

Constructs a new PlayListTrack that is a copy of the given track other

◆ PlayListTrack() [3/3]

PlayListTrack ( const TrackInfo * info)

Constructs plalist item with given metadata.

Parameters
infoMedia file information.

◆ ~PlayListTrack()

virtual ~PlayListTrack ( )
virtual

Object destructor.

Member Function Documentation

◆ beginUsage()

void beginUsage ( )

Prepares for usage. Increases reference counter.

◆ deleteLater()

void deleteLater ( )

Shedules track object for deletion.

◆ endUsage()

void endUsage ( )

End of usage. Decreases reference counter.

◆ formattedLength()

QString formattedLength ( )
overridevirtual

Returns formatted length of the item.

Implements PlayListItem.

◆ formattedTitle()

QString formattedTitle ( int column)
overridevirtual

Returns formatted title of the item.

Parameters
columnNumber of column.

Implements PlayListItem.

◆ formattedTitles()

QStringList formattedTitles ( )
overridevirtual

Returns the list of the formatted titles for all columns.

Implements PlayListItem.

◆ groupName()

const QString & groupName ( )

Returns name of the parent group.

◆ isGroup()

bool isGroup ( ) const
overridevirtual

Returns false.

Implements PlayListItem.

◆ isQueued()

bool isQueued ( ) const

Returns true if track is queued. Otherwise returns false.

◆ isSheduledForDeletion()

bool isSheduledForDeletion ( ) const

Returns true if the track object is sheduled for deletion.

◆ isUsed()

bool isUsed ( ) const

Indicates that instance is currently busy in some kind of operation (tags editing etc.) and can't be deleted at the moment. Call deleteLater() instead of delete operator call.

◆ operator=()

PlayListTrack & operator= ( const PlayListTrack & other)

Assigns other to this track and returns a reference to this track.

◆ queuedIndex()

int queuedIndex ( ) const

Returns index of the queued track. Unqueued track returns -1.

◆ trackIndex()

int trackIndex ( ) const
overridevirtual

Returns the index of the track. Default implementation returns -1.

Reimplemented from PlayListItem.

◆ updateMetaData() [1/2]

void updateMetaData ( )

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

◆ updateMetaData() [2/2]

void updateMetaData ( const TrackInfo * info)

Updates current metadata.

Parameters
infoTrack information.

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