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 class of the music song info. More...
#include <musicsong.h>
Public Types | |
enum | Sort { Sort::ByFileName, Sort::BySinger, Sort::ByFileSize, Sort::ByAddTime, Sort::ByDuration, Sort::ByPlayCount } |
Public Member Functions | |
MusicSong () noexcept | |
MusicSong (const QString &path, bool track=false) noexcept | |
MusicSong (const QString &path, const QString &duration, const QString &name={}, bool track=false) noexcept | |
QString | title () const noexcept |
QString | artist () const noexcept |
void | setAddTimeStr (const QString &t) noexcept |
QString | addTimeStr () const noexcept |
void | setSizeStr (const QString &s) noexcept |
QString | sizeStr () const noexcept |
void | setName (const QString &n) noexcept |
QString | name () const noexcept |
void | setPath (const QString &p) noexcept |
QString | path () const noexcept |
void | setFormat (const QString &t) noexcept |
QString | format () const noexcept |
void | setDuration (const QString &t) noexcept |
QString | duration () const noexcept |
qint64 | size () const noexcept |
void | setPlayCount (const int c) noexcept |
int | playCount () const noexcept |
void | setSort (const Sort s) noexcept |
bool | operator== (const MusicSong &other) const noexcept |
bool | operator< (const MusicSong &other) const noexcept |
bool | operator> (const MusicSong &other) const noexcept |
Private Attributes | |
Sort | m_sort |
qint64 | m_size |
qint64 | m_addTime |
QString | m_sizeStr |
QString | m_addTimeStr |
int | m_playCount |
QString | m_name |
QString | m_path |
QString | m_format |
QString | m_duration |
The class of the music song info.
Definition at line 28 of file musicsong.h.
|
strong |
Enumerator | |
---|---|
ByFileName |
Sort by file name |
BySinger |
Sort by singer name |
ByFileSize |
Sort by file size |
ByAddTime |
Sort by add time |
ByDuration |
Sort by duration |
ByPlayCount |
Sort by play count |
Definition at line 32 of file musicsong.h.
|
noexcept |
Object constructor.
Definition at line 10 of file musicsong.cpp.
|
explicitnoexcept |
Definition at line 25 of file musicsong.cpp.
|
noexcept |
Definition at line 31 of file musicsong.cpp.
References name, TTK::Number::sizeByteToLabel(), TTK::trackRelatedPath(), TTK_FILE_SUFFIX, TTK_SEPARATOR, and TTK_WSEPARATOR.
|
inlinenoexcept |
Get music add time string.
Definition at line 65 of file musicsong.h.
Referenced by MusicCloudDownloadTableWidget::addCellItem(), MusicDownloadRecordTableWidget::addCellItem(), MusicCloudUploadTableWidget::addCellItem(), and MusicAbstractDownloadTableWidget::updateSongsList().
|
noexcept |
Get music artist name.
Definition at line 54 of file musicsong.cpp.
References TTK::generateSongArtist(), and m_name.
Referenced by MusicLrcDownloadBatchTableWidget::addCellItems(), and MusicSongsListItemInfoWidget::initialize().
|
inlinenoexcept |
Get music duration.
Definition at line 106 of file musicsong.h.
Referenced by MusicConnectTransferTableWidget::addCellItems(), MusicSongCheckToolsDuplicateTableWidget::addCellItems(), MusicSongCheckToolsQualityTableWidget::addCellItems(), MusicSongsListPlayTableWidget::selectRow(), MusicPlaylistBackupTableWidget::updateSongsList(), MusicSongsListPlayedTableWidget::updateSongsList(), and MusicSongsListPlayTableWidget::updateSongsList().
|
inlinenoexcept |
Get music format.
Definition at line 98 of file musicsong.h.
Referenced by MusicApplication::containsDownloadItem(), and MusicSongsListItemInfoWidget::initialize().
|
inlinenoexcept |
Get music name.
Definition at line 82 of file musicsong.h.
Referenced by MusicCloudDownloadTableWidget::addCellItem(), MusicDownloadRecordTableWidget::addCellItem(), MusicCloudUploadTableWidget::addCellItem(), MusicLrcDownloadBatchTableWidget::addCellItems(), MusicSongCheckToolsDuplicateTableWidget::addCellItems(), MusicSongCheckToolsQualityTableWidget::addCellItems(), MusicLrcDownloadBatchWidget::downloadButtonClicked(), MusicSongsListItemInfoWidget::initialize(), MusicPlaylistBackupTableWidget::updateSongsList(), MusicSongsListPlayedTableWidget::updateSongsList(), and MusicSongsListPlayTableWidget::updateSongsList().
Definition at line 64 of file musicsong.cpp.
Definition at line 59 of file musicsong.cpp.
Definition at line 79 of file musicsong.cpp.
|
inlinenoexcept |
Get music path.
Definition at line 90 of file musicsong.h.
Referenced by MusicCloudUploadTableWidget::addCellItem(), MusicConnectTransferTableWidget::addCellItems(), MusicLrcDownloadBatchTableWidget::addCellItems(), MusicSongCheckToolsDuplicateTableWidget::addCellItems(), MusicSongCheckToolsQualityTableWidget::addCellItems(), MusicSongsContainerWidget::addSongToLovestList(), MusicPlayedListPopWidget::append(), MusicLrcDownloadBatchWidget::downloadButtonClicked(), MusicSongsListItemInfoWidget::initialize(), MusicPlayedListPopWidget::insert(), MusicSongDlnaTransferWidget::playSongClicked(), MusicPlayedListPopWidget::remove(), MusicSongsContainerWidget::removeItemAt(), MusicSongCheckToolsDuplicateThread::run(), MusicPlayedListPopWidget::selectCurrentIndex(), and MusicSongsContainerWidget::songToLovestListAt().
|
inlinenoexcept |
Get music play count.
Definition at line 118 of file musicsong.h.
Referenced by MusicSongsListItemInfoWidget::initialize(), and MusicSongsContainerWidget::setSongPlayCount().
|
inlinenoexcept |
Set music add time string.
Definition at line 61 of file musicsong.h.
Referenced by MusicAbstractDownloadTableWidget::createDownloadItem(), MusicDownloadRecordConfigManager::readBuffer(), and MusicDownloadWidget::startToRequestMusic().
|
inlinenoexcept |
Set music duration.
Definition at line 102 of file musicsong.h.
Referenced by MusicSongsListPlayTableWidget::selectRow().
|
inlinenoexcept |
Set music format.
Definition at line 94 of file musicsong.h.
|
inlinenoexcept |
Set music name.
Definition at line 78 of file musicsong.h.
Referenced by MusicAbstractDownloadTableWidget::createDownloadItem(), MusicDownloadRecordConfigManager::readBuffer(), MusicDownloadWidget::startToRequestMusic(), and MusicCloudUploadTableWidget::uploadFileError().
|
inlinenoexcept |
Set music path.
Definition at line 86 of file musicsong.h.
Referenced by MusicAbstractDownloadTableWidget::createDownloadItem(), MusicDownloadRecordConfigManager::readBuffer(), MusicDownloadWidget::startToRequestMusic(), and MusicCloudUploadTableWidget::uploadFileError().
Set music play count.
Definition at line 114 of file musicsong.h.
Referenced by MusicTKPLConfigManager::readMusicFilePath(), and MusicSongsContainerWidget::setSongPlayCount().
|
inlinenoexcept |
Set music size string.
Definition at line 69 of file musicsong.h.
Referenced by MusicAbstractDownloadTableWidget::createDownloadItem(), MusicDownloadRecordConfigManager::readBuffer(), MusicDownloadWidget::startToRequestMusic(), and MusicCloudUploadTableWidget::uploadFileError().
Set music sort type.
Definition at line 122 of file musicsong.h.
|
inlinenoexcept |
Get music size.
Definition at line 110 of file musicsong.h.
|
inlinenoexcept |
Get music size string.
Definition at line 73 of file musicsong.h.
Referenced by MusicCloudDownloadTableWidget::addCellItem(), MusicDownloadRecordTableWidget::addCellItem(), MusicCloudUploadTableWidget::addCellItem(), MusicSongCheckToolsDuplicateTableWidget::addCellItems(), MusicSongCheckToolsQualityTableWidget::addCellItems(), and MusicSongsListItemInfoWidget::initialize().
|
noexcept |
Get music title name.
Definition at line 49 of file musicsong.cpp.
References TTK::generateSongTitle(), and m_name.
Referenced by MusicLrcDownloadBatchTableWidget::addCellItems(), and MusicSongsListItemInfoWidget::initialize().
|
private |
Definition at line 130 of file musicsong.h.
|
private |
Definition at line 131 of file musicsong.h.
|
private |
Definition at line 133 of file musicsong.h.
|
private |
Definition at line 133 of file musicsong.h.
|
private |
Definition at line 133 of file musicsong.h.
|
private |
Definition at line 133 of file musicsong.h.
|
private |
Definition at line 132 of file musicsong.h.
|
private |
Definition at line 130 of file musicsong.h.
|
private |
Definition at line 131 of file musicsong.h.
|
private |
Definition at line 129 of file musicsong.h.