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 song list play widget. More...
#include <musicsongslistplaywidget.h>
Public Slots | |
void | deleteRenameItem () |
void | changItemName (const QString &name) |
void | currentLoveStateClicked () |
void | currentDownloadStateClicked () |
Signals | |
void | renameFinished (const QString &text) |
void | enterChanged (int row, int column) |
Public Member Functions | |
MusicSongsListPlayWidget (int index, QWidget *parent=nullptr) | |
~MusicSongsListPlayWidget () | |
void | updateDurationLabel (const QString ¤t, const QString &total) |
void | updateCurrentArtist () |
void | initialize (const QString &name, const QString &path, QString &time) |
void | enableRenameMode () |
bool | isRenameMode () |
void | setCurrentPlayIndex (int index) |
int | currentPlayIndex () const |
Private Member Functions | |
virtual void | enterEvent (QtEnterEvent *event) overridefinal |
void | createMoreMenu (QMenu *menu) |
bool | showArtistPicture (const QString &name) const |
Private Attributes | |
bool | m_noCover |
int | m_currentPlayIndex |
QLabel * | m_artistPictureLabel |
QLabel * | m_durationLabel |
MusicSplitItemClickedLabel * | m_songNameLabel |
QPushButton * | m_loveButton |
QPushButton * | m_deleteButton |
QPushButton * | m_showMVButton |
QPushButton * | m_downloadButton |
QPushButton * | m_moreButton |
MusicItemRenameEidt * | m_renameEdit |
The class of the song list play widget.
Definition at line 33 of file musicsongslistplaywidget.h.
|
explicit |
Object constructor by index.
Definition at line 15 of file musicsongslistplaywidget.cpp.
References TTK::UI::ColorStyle06, createMoreMenu(), currentDownloadStateClicked(), currentLoveStateClicked(), enterChanged(), MusicLeftAreaWidget::instance(), MusicApplication::instance(), TTK::UI::LabelStyle02, m_artistPictureLabel, m_deleteButton, m_downloadButton, m_durationLabel, m_loveButton, m_moreButton, m_showMVButton, m_songNameLabel, TTK::UI::PushButtonStyle10, renameFinished(), TTK::UI::TinyBtnDelete, TTK::UI::TinyBtnMore, TTK::UI::TinyBtnMV, and TTK::UI::TinyBtnPlayLater.
MusicSongsListPlayWidget::~MusicSongsListPlayWidget | ( | ) |
Object destructor.
Definition at line 103 of file musicsongslistplaywidget.cpp.
References m_artistPictureLabel, m_deleteButton, m_downloadButton, m_durationLabel, m_loveButton, m_moreButton, m_renameEdit, m_showMVButton, and m_songNameLabel.
|
slot |
Rename item artist label is finised.
Definition at line 189 of file musicsongslistplaywidget.cpp.
References deleteRenameItem(), TTK::Widget::elidedText(), m_songNameLabel, renameFinished(), TTK_SIGNLE_SHOT, and TTK_SLOT.
Referenced by enableRenameMode().
|
private |
Create more menu information.
Definition at line 216 of file musicsongslistplaywidget.cpp.
References TTK::UI::MenuStyle02.
Referenced by MusicSongsListPlayWidget().
|
slot |
Reset current music download icon state.
Definition at line 203 of file musicsongslistplaywidget.cpp.
References MusicApplication::containsDownloadItem(), MusicApplication::instance(), m_downloadButton, TTK::UI::TinyBtnDownload, and TTK::UI::TinyBtnUnDownload.
Referenced by MusicSongsListPlayWidget().
|
slot |
Reset current music love icon state.
Definition at line 197 of file musicsongslistplaywidget.cpp.
References MusicApplication::containsLovestItem(), MusicApplication::instance(), m_loveButton, TTK::UI::TinyBtnLove, and TTK::UI::TinyBtnUnLove.
Referenced by MusicSongsListPlayWidget().
|
inline |
Get current play index.
Definition at line 76 of file musicsongslistplaywidget.h.
|
slot |
Delete rename item.
Definition at line 183 of file musicsongslistplaywidget.cpp.
References m_renameEdit.
Referenced by changItemName().
void MusicSongsListPlayWidget::enableRenameMode | ( | ) |
Rename item artist label name.
Definition at line 175 of file musicsongslistplaywidget.cpp.
References changItemName(), m_renameEdit, m_songNameLabel, and renameFinished().
Referenced by MusicSongsListPlayTableWidget::setChangSongName().
Mouse is the item geometry.
Referenced by enterEvent(), and MusicSongsListPlayWidget().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 210 of file musicsongslistplaywidget.cpp.
References enterChanged(), and m_currentPlayIndex.
void MusicSongsListPlayWidget::initialize | ( | const QString & | name, |
const QString & | path, | ||
QString & | time | ||
) |
Update item artist label by name.
Definition at line 135 of file musicsongslistplaywidget.cpp.
References MusicSongMeta::cover(), MusicSongMeta::duration(), TTK::Widget::elidedText(), G_SETTING_PTR, TTK::generateSongArtist(), TTK::generateSongTitle(), m_artistPictureLabel, m_durationLabel, m_noCover, m_songNameLabel, MusicSettingManager::OtherReadAlbumCover, MusicSongMeta::read(), showArtistPicture(), TTK_SEPARATOR, TTK_STR_CAT, and TTK_TIME_INIT.
Referenced by MusicSongsListPlayTableWidget::selectRow().
|
inline |
Get rename item artist label state.
Definition at line 68 of file musicsongslistplaywidget.h.
Referenced by MusicSongsListPlayTableWidget::showTimeOut().
|
signal |
Rename item artist label is finised it.
Referenced by changItemName(), enableRenameMode(), and MusicSongsListPlayWidget().
|
inline |
Set current play index.
Definition at line 72 of file musicsongslistplaywidget.h.
|
private |
Show artist small picture, if no exsit there is default pic.
Definition at line 223 of file musicsongslistplaywidget.cpp.
References ART_DIR_FULL, m_artistPictureLabel, and SKN_FILE.
Referenced by initialize(), and updateCurrentArtist().
void MusicSongsListPlayWidget::updateCurrentArtist | ( | ) |
Update current artist when it download finished.
Definition at line 121 of file musicsongslistplaywidget.cpp.
References G_SETTING_PTR, TTK::generateSongArtist(), TTK::generateSongTitle(), m_artistPictureLabel, m_noCover, m_songNameLabel, name, MusicSettingManager::OtherReadAlbumCover, and showArtistPicture().
Referenced by MusicSongsListPlayTableWidget::updateCurrentArtist().
void MusicSongsListPlayWidget::updateDurationLabel | ( | const QString & | current, |
const QString & | total | ||
) |
Update item duration label.
Definition at line 116 of file musicsongslistplaywidget.cpp.
References m_durationLabel.
Referenced by MusicSongsListPlayTableWidget::updateDurationLabel().
|
private |
Definition at line 122 of file musicsongslistplaywidget.h.
Referenced by initialize(), MusicSongsListPlayWidget(), showArtistPicture(), updateCurrentArtist(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 121 of file musicsongslistplaywidget.h.
Referenced by enterEvent().
|
private |
Definition at line 124 of file musicsongslistplaywidget.h.
Referenced by MusicSongsListPlayWidget(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 125 of file musicsongslistplaywidget.h.
Referenced by currentDownloadStateClicked(), MusicSongsListPlayWidget(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 122 of file musicsongslistplaywidget.h.
Referenced by initialize(), MusicSongsListPlayWidget(), updateDurationLabel(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 124 of file musicsongslistplaywidget.h.
Referenced by currentLoveStateClicked(), MusicSongsListPlayWidget(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 125 of file musicsongslistplaywidget.h.
Referenced by MusicSongsListPlayWidget(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 120 of file musicsongslistplaywidget.h.
Referenced by initialize(), and updateCurrentArtist().
|
private |
Definition at line 126 of file musicsongslistplaywidget.h.
Referenced by deleteRenameItem(), enableRenameMode(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 124 of file musicsongslistplaywidget.h.
Referenced by MusicSongsListPlayWidget(), and ~MusicSongsListPlayWidget().
|
private |
Definition at line 123 of file musicsongslistplaywidget.h.
Referenced by changItemName(), enableRenameMode(), initialize(), MusicSongsListPlayWidget(), updateCurrentArtist(), and ~MusicSongsListPlayWidget().