TTKMusicPlayer  4.3.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 - 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 <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
45 public:
49  explicit MusicApplicationModule(QObject *parent = nullptr);
54 
58  static MusicApplicationModule *instance();
59 
63  inline bool windowToTop() const noexcept { return m_setWindowToTop; }
64 
68  void cleanup();
72  bool isLastedVersion() const;
76  void loadNetWorkSetting();
80  void windowCloseAnimation();
84  void soureUpdateCheck();
85 
89  void sideAnimationByOn();
93  void sideAnimationByOff();
94 
98  void updateSoundEffectConfig(bool v);
99 
103  void applyParameter();
104 
105 Q_SIGNALS:
109  void enhancedSongChanged(int type);
110 
111 public Q_SLOTS:
115  void quit();
119  void windowCloseAnimationFinished();
123  void showAboutWidget();
127  void showBugReportView();
131  void showVersionWidget();
135  void showTimerWidget();
139  void showSpectrumWidget();
143  void setWindowToTop();
147  void resetWindowGeometry();
151  void executeTimerAutoModule();
155  void deviceNameChanged(const QString &name);
159  void deviceChanged(bool state);
163  void showEqualizerWidget();
167  void showSoundEffectWidget();
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 module.
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 application object.
Definition: ttkcompat.h:24
The class of the resource data request.
bool windowToTop() const noexcept
The class of the application backup module.
MusicPVCounterRequest * m_counterRequest
MusicMobileDevicesWidget * m_mobileDeviceWidget
#define const
Definition: zconf.h:233
MusicBackupModule * m_backupModule
static MusicApplicationModule * m_instance
state
Definition: http_parser.c:279