TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MusicSongsListPlayWidget Class Reference

The class of the song list play widget. More...

#include <musicsongslistplaywidget.h>

+ Inheritance diagram for MusicSongsListPlayWidget:

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 &current, 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
 
MusicSplitItemClickedLabelm_songNameLabel
 
QPushButton * m_loveButton
 
QPushButton * m_deleteButton
 
QPushButton * m_showMVButton
 
QPushButton * m_downloadButton
 
QPushButton * m_moreButton
 
MusicItemRenameEidtm_renameEdit
 

Detailed Description

The class of the song list play widget.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 33 of file musicsongslistplaywidget.h.

Constructor & Destructor Documentation

MusicSongsListPlayWidget::MusicSongsListPlayWidget ( int  index,
QWidget *  parent = nullptr 
)
explicit
MusicSongsListPlayWidget::~MusicSongsListPlayWidget ( )

Member Function Documentation

void MusicSongsListPlayWidget::changItemName ( const QString &  name)
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().

void MusicSongsListPlayWidget::createMoreMenu ( QMenu *  menu)
private

Create more menu information.

Definition at line 216 of file musicsongslistplaywidget.cpp.

References TTK::UI::MenuStyle02.

Referenced by MusicSongsListPlayWidget().

void MusicSongsListPlayWidget::currentDownloadStateClicked ( )
slot
void MusicSongsListPlayWidget::currentLoveStateClicked ( )
slot
int MusicSongsListPlayWidget::currentPlayIndex ( ) const
inline

Get current play index.

Definition at line 76 of file musicsongslistplaywidget.h.

void MusicSongsListPlayWidget::deleteRenameItem ( )
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().

void MusicSongsListPlayWidget::enterChanged ( int  row,
int  column 
)
signal

Mouse is the item geometry.

Referenced by enterEvent(), and MusicSongsListPlayWidget().

void MusicSongsListPlayWidget::enterEvent ( QtEnterEvent event)
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 
)
bool MusicSongsListPlayWidget::isRenameMode ( )
inline

Get rename item artist label state.

Definition at line 68 of file musicsongslistplaywidget.h.

Referenced by MusicSongsListPlayTableWidget::showTimeOut().

void MusicSongsListPlayWidget::renameFinished ( const QString &  text)
signal

Rename item artist label is finised it.

Referenced by changItemName(), enableRenameMode(), and MusicSongsListPlayWidget().

void MusicSongsListPlayWidget::setCurrentPlayIndex ( int  index)
inline

Set current play index.

Definition at line 72 of file musicsongslistplaywidget.h.

bool MusicSongsListPlayWidget::showArtistPicture ( const QString &  name) const
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 ( )
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().

Member Data Documentation

QLabel* MusicSongsListPlayWidget::m_artistPictureLabel
private
int MusicSongsListPlayWidget::m_currentPlayIndex
private

Definition at line 121 of file musicsongslistplaywidget.h.

Referenced by enterEvent().

QPushButton * MusicSongsListPlayWidget::m_deleteButton
private
QPushButton* MusicSongsListPlayWidget::m_downloadButton
private
QLabel * MusicSongsListPlayWidget::m_durationLabel
private
QPushButton* MusicSongsListPlayWidget::m_loveButton
private
QPushButton * MusicSongsListPlayWidget::m_moreButton
private
bool MusicSongsListPlayWidget::m_noCover
private

Definition at line 120 of file musicsongslistplaywidget.h.

Referenced by initialize(), and updateCurrentArtist().

MusicItemRenameEidt* MusicSongsListPlayWidget::m_renameEdit
private
QPushButton * MusicSongsListPlayWidget::m_showMVButton
private
MusicSplitItemClickedLabel* MusicSongsListPlayWidget::m_songNameLabel
private

The documentation for this class was generated from the following files: