Qmmp
|
#include <trackinfo.h>
Public Types | |
enum | Part { NoParts = 0x0, MetaData = 0x1, Properties = 0x2, ReplayGainInfo = 0x4, AllParts = MetaData | Properties | ReplayGainInfo } |
Public Member Functions | |
TrackInfo () | |
TrackInfo (const QString &path) | |
TrackInfo (const TrackInfo &other) | |
~TrackInfo () | |
TrackInfo & | operator= (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 () |
The TrackInfo class stores metadata and other information about track.
enum Part |
TrackInfo | ( | const QString & | path | ) |
Constructs a new empty TrackInfo that with file path (local path or URL).
~TrackInfo | ( | ) |
Destructor.
void clear | ( | Parts | parts | ) |
Removes specified parts parts of the stored track information.
void clear | ( | ) |
Removes all track information including path.
qint64 duration | ( | ) | const |
Returnds file duration in milliseconds.
bool isEmpty | ( | ) | const |
Returns true if stream/file has no infomation and empry path, otherwise returns false.
const QMap<Qmmp::MetaData, QString>& metaData | ( | ) | const |
Returns the track metadata map.
bool operator!= | ( | const TrackInfo & | info | ) | const |
Returns false if this FileInfo object refers to info; otherwise returns true.
bool operator== | ( | const TrackInfo & | info | ) | const |
Returns true if this FileInfo object refers to info; otherwise returns false.
Parts parts | ( | ) | const |
Returns parts of the stored track information.
const QString path | ( | ) | const |
Returns file path or stream URL.
const QMap<Qmmp::TrackProperty, QString>& properties | ( | ) | const |
Returns the track property map.
const QMap<Qmmp::ReplayGainKey, double>& replayGainInfo | ( | ) | const |
Returns the ReplayGain information.
void setDuration | ( | qint64 | duration | ) |
Sets file duration to duration in milliseconds.
void setPath | ( | const QString & | path | ) |
Sets file path or stream URL to path.
void setValue | ( | Qmmp::MetaData | key, |
const QVariant & | value | ||
) |
Sets metadata key to value.
void setValue | ( | Qmmp::TrackProperty | key, |
const QVariant & | value | ||
) |
Sets track property key to value.
void setValue | ( | Qmmp::ReplayGainKey | key, |
double | value | ||
) |
Sets ReplayGain value key to value.
void setValue | ( | Qmmp::ReplayGainKey | key, |
const QString & | value | ||
) |
Sets ReplayGain value key to value (string is converted to double).
void setValues | ( | const QMap< Qmmp::MetaData, QString > & | metaData | ) |
Sets metadata to metaData.
void setValues | ( | const QMap< Qmmp::TrackProperty, QString > & | properties | ) |
Sets track properties to properties.
void setValues | ( | const QMap< Qmmp::ReplayGainKey, double > & | replayGainInfo | ) |
Sets ReplayGain information to replayGainInfo.
void updateValues | ( | const QMap< Qmmp::MetaData, QString > & | metaData | ) |
Updates existing metadata using values from metaData.
void updateValues | ( | const QMap< Qmmp::TrackProperty, QString > & | properties | ) |
Updates existing track properties using values from properties.
void updateValues | ( | const QMap< Qmmp::ReplayGainKey, double > & | replayGainInfo | ) |
Updates existing ReplayGain information using values from replayGainInfo.
const QString value | ( | Qmmp::MetaData | key | ) | const |
Returns the metdata string associated with the given key.
const QString value | ( | Qmmp::TrackProperty | key | ) | const |
Returns the track property string associated with the given key.
double value | ( | Qmmp::ReplayGainKey | key | ) | const |
Returns the ReplayGain value associated with the given key.