TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicsongchecktoolsthread.h
Go to the documentation of this file.
1 #ifndef MUSICSONGCHECKTOOLSTHREAD_H
2 #define MUSICSONGCHECKTOOLSTHREAD_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 "ttkabstractthread.h"
24 
29 {
30  Q_OBJECT
32 public:
36  explicit MusicSongCheckToolsRenameThread(QObject *parent = nullptr);
37 
41  inline void setMode(TTK::Mode mode) { m_operateMode = mode; }
45  inline TTK::Mode mode() const { return m_operateMode; }
49  inline void setItemList(const TTKIntList &items) { m_itemIDs = items; }
50 
54  void setRenameSongs(MusicSongList *songs);
55 
56 Q_SIGNALS:
60  void finished(const MusicSongCheckToolsRenameList &items);
61 
62 private:
66  virtual void run() override final;
67 
68  MusicSongList *m_songItems;
69  TTKIntList m_itemIDs;
70  MusicSongCheckToolsRenameList m_datas;
71  TTK::Mode m_operateMode;
72 
73 };
74 
75 
80 {
81  Q_OBJECT
83 public:
87  explicit MusicSongCheckToolsDuplicateThread(QObject *parent = nullptr);
88 
92  inline void setMode(TTK::Mode mode) { m_operateMode = mode; }
96  inline TTK::Mode mode() const { return m_operateMode; }
100  inline void setItemList(const TTKIntList &items) { m_itemIDs = items; }
101 
105  void setDuplicateSongs(MusicSongList *songs);
106 
107 Q_SIGNALS:
111  void finished(const MusicSongCheckToolsDuplicateList &items);
112 
113 private:
117  virtual void run() override final;
118 
119  MusicSongList *m_songItems;
120  TTKIntList m_itemIDs;
121  MusicSongCheckToolsDuplicateList m_datas;
122  TTK::Mode m_operateMode;
123 
124 };
125 
126 
130 class TTK_MODULE_EXPORT MusicSongCheckToolsQualityThread : public TTKAbstractThread
131 {
132  Q_OBJECT
134 public:
138  explicit MusicSongCheckToolsQualityThread(QObject *parent = nullptr);
139 
143  void setQualitySongs(MusicSongList *songs);
144 
145 Q_SIGNALS:
149  void finished(const MusicSongCheckToolsQualityList &items);
150 
151 private:
155  virtual void run() override final;
156 
157  MusicSongList *m_songItems;
158 
159 };
160 
161 #endif // MUSICSONGCHECKTOOLSTHREAD_H
#define TTK_MODULE_EXPORT
The class of the song check tools rename thread.
The class of the song check tools duplicate thread.
void setItemList(const TTKIntList &items)
void setItemList(const TTKIntList &items)
QList< int > TTKIntList
Definition: ttkqtglobal.h:188
The namespace of the process utils.
Definition: ttkcompat.h:24
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
virtual void run() override
The class of the ttk abstract thread.
const char int mode
Definition: ioapi.h:135
The class of the song check tools quality thread.