TTKMusicPlayer  4.3.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 - 2026 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
31 public:
35  explicit MusicSongCheckToolsRenameThread(QObject *parent = nullptr);
36 
40  inline void setMode(TTK::Mode mode) noexcept { m_operateMode = mode; }
44  inline TTK::Mode mode() const noexcept { return m_operateMode; }
48  inline void setItemList(const TTKIntList &items) noexcept { m_ids = items; }
49 
53  void setRenameSongs(MusicSongList *songs) noexcept;
54 
55 Q_SIGNALS:
59  void finished(const MusicSongCheckToolsRenameList &items);
60 
61 private:
65  virtual void run() override final;
66 
67  TTKIntList m_ids;
68  MusicSongList *m_items;
69  TTK::Mode m_operateMode;
70  MusicSongCheckToolsRenameList m_datas;
71 
72 };
73 
74 
79 {
80  Q_OBJECT
81 public:
85  explicit MusicSongCheckToolsDuplicateThread(QObject *parent = nullptr);
86 
90  inline void setMode(TTK::Mode mode) noexcept { m_operateMode = mode; }
94  inline TTK::Mode mode() const noexcept { return m_operateMode; }
98  inline void setItemList(const TTKIntList &items) noexcept { m_ids = items; }
99 
103  void setDuplicateSongs(MusicSongList *songs) noexcept;
104 
105 Q_SIGNALS:
109  void finished(const MusicSongCheckToolsDuplicateList &items);
110 
111 private:
115  virtual void run() override final;
116 
117  TTKIntList m_ids;
118  MusicSongList *m_items;
119  TTK::Mode m_operateMode;
120  MusicSongCheckToolsDuplicateList m_datas;
121 
122 };
123 
124 
128 class TTK_MODULE_EXPORT MusicSongCheckToolsQualityThread : public TTKAbstractThread
129 {
130  Q_OBJECT
131 public:
135  explicit MusicSongCheckToolsQualityThread(QObject *parent = nullptr);
136 
140  void setQualitySongs(MusicSongList *songs) noexcept;
141 
142 Q_SIGNALS:
146  void finished(const MusicSongCheckToolsQualityList &items);
147 
148 private:
152  virtual void run() override final;
153 
154  MusicSongList *m_items;
155 
156 };
157 
158 #endif // MUSICSONGCHECKTOOLSTHREAD_H
void setItemList(const TTKIntList &items) noexcept
#define TTK_MODULE_EXPORT
void setMode(TTK::Mode mode) noexcept
void setItemList(const TTKIntList &items) noexcept
The class of the song check tools rename thread.
The class of the song check tools duplicate thread.
QList< int > TTKIntList
Definition: ttkqtglobal.h:200
The namespace of the application object.
Definition: ttkcompat.h:24
void setMode(TTK::Mode mode) noexcept
virtual void run() override
The class of the ttk abstract thread.
const char int mode
Definition: ioapi.h:135
#define const
Definition: zconf.h:233
The class of the song check tools quality thread.