TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Functions
TTK::Number Namespace Reference

Functions

TTK_MODULE_EXPORT QString sizeByteToLabel (qint64 size)
 
TTK_MODULE_EXPORT QString sizeByteToLabel (const QString &duration, int bitrate)
 
TTK_MODULE_EXPORT QString speedByteToLabel (qint64 size)
 
TTK_MODULE_EXPORT int bitrateToNormal (int bitrate)
 
TTK_MODULE_EXPORT TTK::QueryQuality bitrateToLevel (int bitrate)
 
TTK_MODULE_EXPORT TTK::QueryQuality bitrateToLevel (const QString &bitrate)
 
TTK_MODULE_EXPORT void bitrateToQuality (TTK::QueryQuality level, QString &bitrate, QColor &color)
 

Function Documentation

TTK::QueryQuality TTK::Number::bitrateToLevel ( int  bitrate)
TTK::QueryQuality TTK::Number::bitrateToLevel ( const QString &  bitrate)

Transfrom bitrate to level.

Definition at line 152 of file musicnumberutils.cpp.

References bitrateToLevel().

int TTK::Number::bitrateToNormal ( int  bitrate)

Transfrom bitrate to normal.

Definition at line 100 of file musicnumberutils.cpp.

References TTK_BN_0, TTK_BN_128, TTK_BN_192, TTK_BN_32, TTK_BN_320, TTK_BN_500, and TTK_BN_64.

Referenced by parseSongProperty().

void TTK::Number::bitrateToQuality ( TTK::QueryQuality  level,
QString &  bitrate,
QColor &  color 
)

Transfrom bitrate to quality.

Definition at line 168 of file musicnumberutils.cpp.

Referenced by MusicSongCheckToolsQualityTableWidget::addCellItems(), and MusicFileInformationWidget::initialize().

QString TTK::Number::sizeByteToLabel ( qint64  size)
QString TTK::Number::sizeByteToLabel ( const QString &  duration,
int  bitrate 
)

Transform value to size label value.

Definition at line 61 of file musicnumberutils.cpp.

References TTKTime::formatDuration(), sizeByteToLabel(), and TTK_DEFAULT_STR.

QString TTK::Number::speedByteToLabel ( qint64  size)

Transform value to speed label value.

Definition at line 70 of file musicnumberutils.cpp.

References size2Number(), TTK_SN_GB2B, TTK_SN_KB2B, TTK_SN_MB2B, and TTK_SN_TB2B.

Referenced by MusicDownloadDataRequest::updateDownloadSpeed().