TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicabstractdownloadskinrequest.h
Go to the documentation of this file.
1 #ifndef MUSICABSTRACTDOWNLOADSKINREQUEST_H
2 #define MUSICABSTRACTDOWNLOADSKINREQUEST_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 "ttkabstractxml.h"
23 #include "musicglobaldefine.h"
24 
25 static constexpr const char *SKIN_BING_DIR = "Bing";
26 static constexpr const char *SKIN_THUNDER_DIR = "Thunder/";
27 static constexpr const char *SKIN_BIRD_DIR = "Bird/";
28 
33 {
34  QString m_name;
35  QString m_url;
37  int m_index;
38 
40  : m_name(TTK_AUTHOR_NAME),
41  m_useCount(8888),
42  m_index(0)
43  {
44 
45  }
46 
47  inline bool isValid() const
48  {
49  return !m_name.isEmpty();
50  }
51 };
53 
54 
59 {
60  QString m_group;
61  QString m_id;
62  MusicSkinRemoteItemList m_items;
63 
64  inline bool isValid() const
65  {
66  return !(m_group.isEmpty() && m_id.isEmpty() && m_items.isEmpty());
67  }
68 };
70 
71 
76 {
77  Q_OBJECT
79 public:
83  explicit MusicAbstractDownloadSkinRequest(QObject *parent = nullptr);
84 
88  virtual void startToRequest();
92  virtual void startToRequest(const QString &id);
93 
94 Q_SIGNALS:
98  void downLoadDataChanged(const MusicSkinRemoteGroupList &bytes);
99 
100 public Q_SLOTS:
105  virtual void downLoadFinished(const QByteArray &bytes) = 0;
106 
107 };
108 
109 #endif // MUSICABSTRACTDOWNLOADSKINREQUEST_H
#define TTK_MODULE_EXPORT
The class of the remote skin item.
#define TTK_AUTHOR_NAME
The class of the download skin remote background.
static constexpr const char * SKIN_THUNDER_DIR
static constexpr const char * SKIN_BING_DIR
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the remote skin item group.
static constexpr const char * SKIN_BIRD_DIR
TTK_DECLARE_LIST(MusicSkinRemoteItem)