TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicapplicationmodule.h
Go to the documentation of this file.
1 #ifndef MUSICAPPLICATIONMODULE_H
2 #define MUSICAPPLICATIONMODULE_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 <QPropertyAnimation>
23 #include "musicglobaldefine.h"
24 
25 class QDeviceWatcher;
26 class MusicBackupModule;
33 
34 namespace TTK
35 {
36 enum class Direction;
37 }
38 
43 {
44  Q_OBJECT
46 public:
50  explicit MusicApplicationModule(QObject *parent = nullptr);
55 
59  static MusicApplicationModule *instance();
60 
64  inline bool windowToTop() const { return m_setWindowToTop; }
65 
69  void cleanup();
73  bool isLastedVersion() const;
77  void loadNetWorkSetting();
81  void windowCloseAnimation();
85  void soureUpdateCheck();
86 
90  void sideAnimationByOn();
94  void sideAnimationByOff();
95 
99  void applyParameter();
100 
101 Q_SIGNALS:
105  void enhancedMusicChanged(int type);
106 
107 public Q_SLOTS:
111  void quit();
115  void windowCloseAnimationFinished();
119  void showAboutWidget();
123  void showBugReportView();
127  void showVersionWidget();
131  void showTimerWidget();
135  void showSpectrumWidget();
139  void setWindowToTop();
143  void resetWindowGeometry();
147  void runTimerAutoModule();
151  void deviceNameChanged(const QString &name);
155  void deviceChanged(bool state);
159  void showEqualizerWidget();
163  void showSoundEffectWidget();
167  void soundEffectChanged();
168 
169 private:
173  bool closeCurrentEqualizer();
174 
177  QPropertyAnimation *m_quitAnimation, *m_sideAnimation;
182  QWidget *m_quitContainer;
183 
188 
190 
191 };
192 
193 #endif // MUSICAPPLICATIONMODULE_H
#define TTK_MODULE_EXPORT
The class of the app object widget.
MusicTimerAutoModule * m_timerAutoModule
MusicScreenSaverBackgroundWidget * m_screenSaverWidget
MusicSourceUpdateRequest * m_sourceUpdateRequest
QPropertyAnimation * m_sideAnimation
The class of the time auto run.
The class of the pv counter.
The class of the device watcher.
The class of the screen saver background widget.
MusicResourceRequest * m_resourceRequest
Direction
Definition: ttklibrary.h:27
The class of the mobile devices widget.
The class of the source data query update request.
const char * name
Definition: http_parser.c:458
The namespace of the process utils.
Definition: ttkcompat.h:24
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the resource data request.
The class of the application backup module.
MusicPVCounterRequest * m_counterRequest
MusicMobileDevicesWidget * m_mobileDeviceWidget
MusicBackupModule * m_backupModule
static MusicApplicationModule * m_instance
state
Definition: http_parser.c:279