TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicconsolemodule.h
Go to the documentation of this file.
1 #ifndef MUSICCONSOLEMODULE_H
2 #define MUSICCONSOLEMODULE_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 "musicobject.h"
23 #include "ttkcommandline.h"
24 
25 class MusicPlayer;
26 class MusicPlaylist;
27 
31 class TTK_MODULE_EXPORT MusicConsoleModule : public QObject
32 {
33  Q_OBJECT
34 public:
38  explicit MusicConsoleModule(QObject *parent = nullptr);
43 
47  bool initialize();
48 
49 private Q_SLOTS:
53  void positionChanged(qint64 position);
57  void currentIndexChanged(int index);
58 
62  void switchToPlayState();
66  void playPrevious();
70  void playNext();
71 
75  void resetVolume();
79  void volumeDown();
83  void volumeUp();
84 
88  void playOrder();
92  void playRandom();
96  void playlistLoop();
100  void playOneLoop();
104  void playOnce();
105 
109  void setEnhancedOff();
113  void setEnhanced3D();
117  void setEnhancedNICAM();
121  void setEnhancedSubwoofer();
125  void setEnhancedVocal();
126 
127 private:
131  void print(qint64 position, qint64 duration) const;
132 
135  int m_volume;
136  QString m_playbackMode, m_enhanced;
137 
138 };
139 
140 #endif // MUSICCONSOLEMODULE_H
#define TTK_MODULE_EXPORT
MusicPlaylist * m_playlist
The class of the music player.
Definition: musicplayer.h:31
The class of the music console module.
The class of the music play list.
Definition: musicplaylist.h:63