#include <metadataformatter.h>
|
static QString | formatDuration (qint64 duration, bool hideZero=true, bool showMs=false) |
|
◆ MetaDataFormatter()
Constructor.
- Parameters
-
pattern | Metadata template. Syntax: p - artist, a - album, aa - album artist, t - title, n - track number, NN - 2-digit track number, g - genre, c - comment, C - composer, D - disc number, f - file name, F - full path, y - year, l - duration, I - track index, %{bitrate} - bitrate, %{samplerate} - sample rate, %{channels} - number of channels, %{samplesize} - bits per sample, %{format} - format name, %{decoder} - decoder name, %{filesize} - file size, if(A,B,C) or if(A&B&C,D,E) - condition, dir(n) - Name of the directory located on n levels above. |
◆ format() [1/3]
Converts metadata of item item to one string using template.
◆ format() [2/3]
QString format |
( |
const TrackInfo & |
info, |
|
|
int |
trackIndex = 0 |
|
) |
| const |
Converts metadata of TrackInfo reference info to one string using template.
- Parameters
-
info | pointer to TrackInfo object. |
trackIndex | Index of track. |
◆ format() [3/3]
QString format |
( |
const TrackInfo * |
info, |
|
|
int |
trackIndex = 0 |
|
) |
| const |
Converts metadata of TrackInfo pointer info to one string using template.
- Parameters
-
info | pointer to TrackInfo object. |
trackIndex | Index of track. |
◆ formatDuration()
static QString formatDuration |
( |
qint64 |
duration, |
|
|
bool |
hideZero = true , |
|
|
bool |
showMs = false |
|
) |
| |
|
static |
Returns formatted duration (example: 05:02:03).
- Parameters
-
duration | Duration in milliseconds. |
hideZero | Setting for zero values output. If hideZero is true, then the function outputs empty string for zero length, otherwise outputs "0:00". |
showMs | Adds milliseconds to the end of output (example: 05:02:03.324). |
◆ pattern()
const QString pattern |
( |
| ) |
const |
Returns metadata template.
◆ setPattern()
void setPattern |
( |
const QString & |
pattern | ) |
|
Setups metadata template.
- Parameters
-
pattern | Metadata template string. |
The documentation for this class was generated from the following file: