TTKMusicPlayer  4.3.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 | Static Public Attributes | Private Attributes | List of all members
MusicSquareQueryItemWidget Class Reference

The class of the square query item widget. More...

#include <musicqueryitemwidget.h>

+ Inheritance diagram for MusicSquareQueryItemWidget:

Public Slots

void downloadFinished (const QByteArray &bytes)
 
void renderFinished (const QPixmap &data)
 
void itemClicked ()
 

Signals

void currentItemClicked (const MusicResultDataItem &item)
 

Public Member Functions

 MusicSquareQueryItemWidget (QWidget *parent=nullptr)
 
 ~MusicSquareQueryItemWidget ()
 
void setShowTime (bool v) noexcept
 
void setShowCount (bool v) noexcept
 
void setValueLabel (bool v) noexcept
 
void setResultDataItem (const MusicResultDataItem &item, MusicCoverRequest *cover)
 

Static Public Attributes

static constexpr int WIDTH_LABEL_SIZE = 150
 
static constexpr int HEIGHT_LABEL_SIZE = 200
 
static constexpr int LINE_SPACING_SIZE = 150
 

Private Attributes

bool m_showTime
 
bool m_showCount
 
TTKClickedLabelm_iconLabel
 
QLabel * m_nameLabel
 
QLabel * m_valueLabel
 
QPushButton * m_listenButton
 
QPushButton * m_playButton
 
MusicResultDataItem m_itemData
 

Detailed Description

The class of the square query item widget.

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

Definition at line 31 of file musicqueryitemwidget.h.

Constructor & Destructor Documentation

MusicSquareQueryItemWidget::MusicSquareQueryItemWidget ( QWidget *  parent = nullptr)
explicit
MusicSquareQueryItemWidget::~MusicSquareQueryItemWidget ( )

Object destructor.

Definition at line 45 of file musicqueryitemwidget.cpp.

References m_iconLabel, m_listenButton, m_nameLabel, m_playButton, and m_valueLabel.

Member Function Documentation

void MusicSquareQueryItemWidget::currentItemClicked ( const MusicResultDataItem item)
signal

Current item clicked.

Referenced by itemClicked().

void MusicSquareQueryItemWidget::downloadFinished ( const QByteArray &  bytes)
slot

Download data from net finished.

Definition at line 102 of file musicqueryitemwidget.cpp.

References m_iconLabel, renderFinished(), MusicImageRenderer::setInputData(), TTKAbstractThread::start(), and TTK_ERROR_STREAM.

Referenced by setResultDataItem().

void MusicSquareQueryItemWidget::itemClicked ( )
slot

Current item clicked.

Definition at line 123 of file musicqueryitemwidget.cpp.

References currentItemClicked(), and m_itemData.

Referenced by MusicSquareQueryItemWidget().

void MusicSquareQueryItemWidget::renderFinished ( const QPixmap &  data)
slot

Image render finished.

Definition at line 116 of file musicqueryitemwidget.cpp.

References m_iconLabel, m_listenButton, and m_playButton.

Referenced by downloadFinished().

void MusicSquareQueryItemWidget::setResultDataItem ( const MusicResultDataItem item,
MusicCoverRequest cover 
)
void MusicSquareQueryItemWidget::setShowCount ( bool  v)
inlinenoexcept
void MusicSquareQueryItemWidget::setShowTime ( bool  v)
inlinenoexcept
void MusicSquareQueryItemWidget::setValueLabel ( bool  v)
inlinenoexcept

Member Data Documentation

constexpr int MusicSquareQueryItemWidget::HEIGHT_LABEL_SIZE = 200
static

Definition at line 36 of file musicqueryitemwidget.h.

Referenced by MusicSquareQueryItemWidget().

constexpr int MusicSquareQueryItemWidget::LINE_SPACING_SIZE = 150
static
TTKClickedLabel* MusicSquareQueryItemWidget::m_iconLabel
private
MusicResultDataItem MusicSquareQueryItemWidget::m_itemData
private

Definition at line 92 of file musicqueryitemwidget.h.

Referenced by itemClicked(), and setResultDataItem().

QPushButton* MusicSquareQueryItemWidget::m_listenButton
private
QLabel* MusicSquareQueryItemWidget::m_nameLabel
private
QPushButton * MusicSquareQueryItemWidget::m_playButton
private
bool MusicSquareQueryItemWidget::m_showCount
private

Definition at line 88 of file musicqueryitemwidget.h.

Referenced by setResultDataItem().

bool MusicSquareQueryItemWidget::m_showTime
private

Definition at line 88 of file musicqueryitemwidget.h.

Referenced by setResultDataItem().

QLabel * MusicSquareQueryItemWidget::m_valueLabel
private
constexpr int MusicSquareQueryItemWidget::WIDTH_LABEL_SIZE = 150
static

Definition at line 35 of file musicqueryitemwidget.h.

Referenced by MusicSquareQueryItemWidget(), and setResultDataItem().


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