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

#include <trackinfo.h>

Inheritance diagram for TrackInfo:
PlayListTrack

Public Types

enum  Part { MetaData = 0x1 , Properties = 0x2 , ReplayGainInfo = 0x4 , AllParts = MetaData | Properties | ReplayGainInfo }
 

Public Member Functions

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

Detailed Description

The TrackInfo class stores metadata and other information about track.

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

Member Enumeration Documentation

◆ Part

enum Part

This enum describes stored parts of track information.

Enumerator
MetaData 

Metadata (artist, album, etc).

Properties 

File/Stream properties.

ReplayGainInfo 

ReplayGain information.

AllParts 

All parts.

Constructor & Destructor Documentation

◆ TrackInfo() [1/3]

TrackInfo ( )

Constructs a new empty TrackInfo object.

◆ TrackInfo() [2/3]

TrackInfo ( const QString & path)

Constructs a new empty TrackInfo that with file path (local path or URL).

◆ TrackInfo() [3/3]

TrackInfo ( const TrackInfo & other)

Constructs a new TrackInfo that is a copy of the given other

◆ ~TrackInfo()

~TrackInfo ( )

Destructor.

Member Function Documentation

◆ clear() [1/2]

void clear ( )

Removes all track information including path.

◆ clear() [2/2]

void clear ( Parts parts)

Removes specified parts parts of the stored track information.

◆ duration()

qint64 duration ( ) const

Returnds file duration in milliseconds.

◆ isEmpty()

bool isEmpty ( ) const

Returns true if stream/file has no infomation and empty path, otherwise returns false.

◆ metaData()

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

Returns the track metadata map.

◆ operator!=()

bool operator!= ( const TrackInfo & info) const

Returns false if this FileInfo object refers to info; otherwise returns true.

◆ operator=()

TrackInfo & operator= ( const TrackInfo & info)

Makes a copy of the given info

◆ operator==()

bool operator== ( const TrackInfo & info) const

Returns true if this FileInfo object refers to info; otherwise returns false.

◆ parts()

Parts parts ( ) const

Returns parts of the stored track information.

◆ path()

const QString & path ( ) const

Returns file path or stream URL.

◆ properties()

const QMap< Qmmp::TrackProperty, QString > & properties ( ) const

Returns the track property map.

◆ replayGainInfo()

const QMap< Qmmp::ReplayGainKey, double > & replayGainInfo ( ) const

Returns the ReplayGain information.

◆ setDuration()

void setDuration ( qint64 duration)

Sets file duration to duration in milliseconds.

◆ setPath()

void setPath ( const QString & path)

Sets file path or stream URL to path.

◆ setValue() [1/4]

void setValue ( Qmmp::MetaData key,
const QVariant & value )

Sets metadata key to value.

◆ setValue() [2/4]

void setValue ( Qmmp::ReplayGainKey key,
const QString & value )

Sets ReplayGain value key to value (string is converted to double).

◆ setValue() [3/4]

void setValue ( Qmmp::ReplayGainKey key,
double value )

Sets ReplayGain value key to value.

◆ setValue() [4/4]

void setValue ( Qmmp::TrackProperty key,
const QVariant & value )

Sets track property key to value.

◆ setValues() [1/3]

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

Sets metadata to metaData.

◆ setValues() [2/3]

void setValues ( const QMap< Qmmp::ReplayGainKey, double > & replayGainInfo)

Sets ReplayGain information to replayGainInfo.

◆ setValues() [3/3]

void setValues ( const QMap< Qmmp::TrackProperty, QString > & properties)

Sets track properties to properties.

◆ updateValues() [1/3]

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

Updates existing metadata using values from metaData.

◆ updateValues() [2/3]

void updateValues ( const QMap< Qmmp::ReplayGainKey, double > & replayGainInfo)

Updates existing ReplayGain information using values from replayGainInfo.

◆ updateValues() [3/3]

void updateValues ( const QMap< Qmmp::TrackProperty, QString > & properties)

Updates existing track properties using values from properties.

◆ value() [1/3]

const QString value ( Qmmp::MetaData key) const

Returns the metdata string associated with the given key.

◆ value() [2/3]

double value ( Qmmp::ReplayGainKey key) const

Returns the ReplayGain value associated with the given key.

◆ value() [3/3]

const QString value ( Qmmp::TrackProperty key) const

Returns the track property string associated with the given key.


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