TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicdownloadbatchwidget.h
Go to the documentation of this file.
1 #ifndef MUSICDOWNLOADBATCHWIDGET_H
2 #define MUSICDOWNLOADBATCHWIDGET_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2024 Greedysky Studio
7 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License along
19  * with this program; If not, see <http://www.gnu.org/licenses/>.
20  ***************************************************************************/
21 
22 #include "musicdownloadwidget.h"
24 
25 namespace Ui {
27 }
28 
33 {
34  Q_OBJECT
36 public:
40  explicit MusicDownloadBatchTableItem(QWidget *parent = nullptr);
45 
49  void addCellItem(MusicAbstractQueryRequest *request, const TTK::MusicSongInformation &info);
50 
54  void startToRequest();
58  void setCurrentQuality(int index);
59 
60 public Q_SLOTS:
64  void currentQualityChanged(int index);
68  void downloadFinished();
69 
70 private:
71  int currentBitrate(int index);
75  void startToRequestMusic();
79  void startToRequestMovie();
80 
81  QComboBox *m_qulity;
83  QLabel *m_songName, *m_singer;
84  QLabel *m_information, *m_status;
87 
88 };
89 
90 
95 {
96  Q_OBJECT
98 public:
102  explicit MusicDownloadBatchTableWidget(QWidget *parent = nullptr);
107 
111  void addCellItem(MusicAbstractQueryRequest *request, const TTK::MusicSongInformation &info);
112 
113 public Q_SLOTS:
117  virtual void removeItems() override final;
121  void currentQualityChanged(int index);
125  void startToRequest();
126 
127 private:
128  QList<MusicDownloadBatchTableItem*> m_items;
129 
130 };
131 
132 
137 {
138  Q_OBJECT
140 public:
144  explicit MusicDownloadBatchWidget(QWidget *parent = nullptr);
149 
153  void initialize(MusicAbstractQueryRequest *request, const TTKIntList &items);
154 
155 private:
156  Ui::MusicDownloadBatchWidget *m_ui;
157 
158 };
159 
160 #endif // MUSICDOWNLOADBATCHWIDGET_H
The class of the download batch widget.
#define TTK_MODULE_EXPORT
Ui::MusicDownloadBatchWidget * m_ui
The class of the table widget base.
QList< int > TTKIntList
Definition: ttkqtglobal.h:188
The class of the download batch table item.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
MusicAbstractQueryRequest * m_networkRequest
The class of the moving dialog base.
QList< MusicDownloadBatchTableItem * > m_items
The class of the download batch table widget.
MusicAbstractQueryRequest::QueryType m_queryType
The class of the abstract query download data from net.
TTK::MusicSongInformation m_songInfo
The class of the music song information.
Definition: musicobject.h:281