TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The TrackInfo class stores metadata and other information about track. More...
#include <trackinfo.h>
Public Types | |
enum | Part { MetaData = 0x1, Properties = 0x2, ReplayGainInfo = 0x4, AllParts = MetaData | Properties | ReplayGainInfo } |
Static Public Member Functions | |
static QString | pathFromUrl (const QString &url, int *track=nullptr) |
Private Attributes | |
QMap< Qmmp::MetaData, QString > | m_metaData |
QMap< Qmmp::TrackProperty, QString > | m_properties |
QMap< Qmmp::ReplayGainKey, double > | m_replayGainInfo |
Parts | m_parts = Parts() |
QString | m_path |
qint64 | m_duration = 0 |
The TrackInfo class stores metadata and other information about track.
Definition at line 32 of file trackinfo.h.
enum TrackInfo::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. |
Definition at line 51 of file trackinfo.h.
|
default |
Constructs a new empty TrackInfo object.
|
explicit |
Constructs a new empty TrackInfo that with file path (local path or URL).
Constructs a new TrackInfo that is a copy of the given other
void TrackInfo::clear | ( | Parts | parts | ) |
Removes specified parts parts of the stored track information.
void TrackInfo::clear | ( | ) |
Removes all track information including path.
qint64 TrackInfo::duration | ( | ) | const |
Returnds file duration in milliseconds.
bool TrackInfo::isEmpty | ( | ) | const |
Returns true if stream/file has no infomation and empty path, otherwise returns false.
const QMap<Qmmp::MetaData, QString>& TrackInfo::metaData | ( | ) | const |
Returns the track metadata map.
Returns false if this FileInfo object refers to info; otherwise returns true.
Returns true if this FileInfo object refers to info; otherwise returns false.
Parts TrackInfo::parts | ( | ) | const |
Returns parts of the stored track information.
const QString& TrackInfo::path | ( | ) | const |
Returns file path or stream URL.
Referenced by MusicMPRISPlayerCore::metadata().
Decode path for cue url path
Referenced by TTK::trackRelatedPath().
const QMap<Qmmp::TrackProperty, QString>& TrackInfo::properties | ( | ) | const |
Returns the track property map.
Referenced by MusicQualityWidget::updateQuality().
const QMap<Qmmp::ReplayGainKey, double>& TrackInfo::replayGainInfo | ( | ) | const |
Returns the ReplayGain information.
void TrackInfo::setDuration | ( | qint64 | duration | ) |
Sets file duration to duration in milliseconds.
void TrackInfo::setPath | ( | const QString & | path | ) |
Sets file path or stream URL to path.
void TrackInfo::setValue | ( | Qmmp::MetaData | key, |
const QVariant & | value | ||
) |
Sets metadata key to value.
void TrackInfo::setValue | ( | Qmmp::TrackProperty | key, |
const QVariant & | value | ||
) |
Sets track property key to value.
void TrackInfo::setValue | ( | Qmmp::ReplayGainKey | key, |
double | value | ||
) |
Sets ReplayGain value key to value.
void TrackInfo::setValue | ( | Qmmp::ReplayGainKey | key, |
const QString & | value | ||
) |
Sets ReplayGain value key to value (string is converted to double).
void TrackInfo::setValues | ( | const QMap< Qmmp::MetaData, QString > & | metaData | ) |
Sets metadata to metaData.
void TrackInfo::setValues | ( | const QMap< Qmmp::TrackProperty, QString > & | properties | ) |
Sets track properties to properties.
void TrackInfo::setValues | ( | const QMap< Qmmp::ReplayGainKey, double > & | replayGainInfo | ) |
Sets ReplayGain information to replayGainInfo.
void TrackInfo::updateValues | ( | const QMap< Qmmp::MetaData, QString > & | metaData | ) |
Updates existing metadata using values from metaData.
void TrackInfo::updateValues | ( | const QMap< Qmmp::TrackProperty, QString > & | properties | ) |
Updates existing track properties using values from properties.
void TrackInfo::updateValues | ( | const QMap< Qmmp::ReplayGainKey, double > & | replayGainInfo | ) |
Updates existing ReplayGain information using values from replayGainInfo.
const QString TrackInfo::value | ( | Qmmp::MetaData | key | ) | const |
Returns the metdata string associated with the given key.
Referenced by MusicMPRISPlayerCore::metadata().
const QString TrackInfo::value | ( | Qmmp::TrackProperty | key | ) | const |
Returns the track property string associated with the given key.
double TrackInfo::value | ( | Qmmp::ReplayGainKey | key | ) | const |
Returns the ReplayGain value associated with the given key.
|
private |
Definition at line 180 of file trackinfo.h.
|
private |
Definition at line 175 of file trackinfo.h.
|
private |
Definition at line 178 of file trackinfo.h.
|
private |
Definition at line 179 of file trackinfo.h.
|
private |
Definition at line 176 of file trackinfo.h.
|
private |
Definition at line 177 of file trackinfo.h.