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 | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MusicDownloadBatchTableWidget Class Reference

The class of the download batch table widget. More...

#include <musicdownloadbatchwidget.h>

+ Inheritance diagram for MusicDownloadBatchTableWidget:

Public Slots

virtual void removeItems () overridefinal
 
void currentQualityChanged (int index)
 
void startToRequest ()
 
void timeout ()
 
- Public Slots inherited from TTKAbstractTableWidget
virtual void itemCellEntered (int row, int column)
 
virtual void itemCellClicked (int row, int column)
 
virtual void removeItems ()
 

Public Member Functions

 MusicDownloadBatchTableWidget (QWidget *parent=nullptr)
 
 ~MusicDownloadBatchTableWidget ()
 
bool isRunning () const noexcept
 
void addCellItem (MusicAbstractQueryRequest *request, const TTK::MusicSongInformation &info)
 
- Public Member Functions inherited from MusicAbstractTableWidget
 MusicAbstractTableWidget (QWidget *parent=nullptr)
 
- Public Member Functions inherited from TTKAbstractTableWidget
 TTKAbstractTableWidget (QWidget *parent=nullptr)
 
TTKIntList selectedRows () const
 

Private Member Functions

void generateTimer ()
 

Private Attributes

int m_index
 
QTimer * m_timer
 
QList< MusicDownloadBatchTableItem * > m_items
 

Additional Inherited Members

- Protected Member Functions inherited from TTKAbstractTableWidget
virtual void leaveEvent (QEvent *event) override
 
void setRowColor (int row, const QColor &color) const
 
bool isValid () const noexcept
 
- Protected Attributes inherited from TTKAbstractTableWidget
int m_previousColorRow
 
int m_previousClickRow
 
QColor m_backgroundColor
 

Detailed Description

The class of the download batch table widget.

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

Definition at line 93 of file musicdownloadbatchwidget.h.

Constructor & Destructor Documentation

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

Object destructor.

Definition at line 176 of file musicdownloadbatchwidget.cpp.

References m_timer, and removeItems().

Member Function Documentation

void MusicDownloadBatchTableWidget::addCellItem ( MusicAbstractQueryRequest request,
const TTK::MusicSongInformation info 
)

Create cell item by input data.

Definition at line 183 of file musicdownloadbatchwidget.cpp.

References MusicDownloadBatchTableItem::addCellItem(), m_items, and TTK_ITEM_SIZE_S.

void MusicDownloadBatchTableWidget::currentQualityChanged ( int  index)
slot

Table widget item cell click.

Definition at line 207 of file musicdownloadbatchwidget.cpp.

References m_items, and qAsConst.

void MusicDownloadBatchTableWidget::generateTimer ( )
private

Generate timer's .

Definition at line 241 of file musicdownloadbatchwidget.cpp.

References m_timer, TTK::random(), and TTK_DN_S2MS.

Referenced by startToRequest(), and timeout().

bool MusicDownloadBatchTableWidget::isRunning ( ) const
inlinenoexcept

Download is running now.

Definition at line 109 of file musicdownloadbatchwidget.h.

void MusicDownloadBatchTableWidget::removeItems ( )
finaloverridevirtualslot

Remove all items.

Definition at line 198 of file musicdownloadbatchwidget.cpp.

References m_items, and TTKAbstractTableWidget::removeItems().

Referenced by ~MusicDownloadBatchTableWidget().

void MusicDownloadBatchTableWidget::startToRequest ( )
slot

Start to download data.

Definition at line 215 of file musicdownloadbatchwidget.cpp.

References generateTimer(), m_index, m_items, m_timer, and MusicToastLabel::popup().

void MusicDownloadBatchTableWidget::timeout ( )
slot

Thread run timeout.

Definition at line 227 of file musicdownloadbatchwidget.cpp.

References generateTimer(), m_index, m_items, m_timer, and MusicToastLabel::popup().

Referenced by MusicDownloadBatchTableWidget().

Member Data Documentation

int MusicDownloadBatchTableWidget::m_index
private

Definition at line 141 of file musicdownloadbatchwidget.h.

Referenced by startToRequest(), and timeout().

QList<MusicDownloadBatchTableItem*> MusicDownloadBatchTableWidget::m_items
private
QTimer* MusicDownloadBatchTableWidget::m_timer
private

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