TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicbottomareawidget.h
Go to the documentation of this file.
1 #ifndef MUSICBOTTOMAREAWIDGET_H
2 #define MUSICBOTTOMAREAWIDGET_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 <QWidget>
23 #include <QSystemTrayIcon>
24 #include "musicglobaldefine.h"
25 
29 
30 namespace Ui {
31  class MusicApplication;
32 }
33 
38 {
39  Q_OBJECT
41 public:
45  explicit MusicBottomAreaWidget(QWidget *parent = nullptr);
50 
54  static MusicBottomAreaWidget *instance();
55 
59  void setupUi(Ui::MusicApplication *ui);
63  void setDestopLrcVisible(bool status) const;
67  void setCurrentPlayState(bool state) const;
71  void setVolumeValue(int value) const;
75  void setLabelText(const QString &name) const;
76 
80  void setSystemCloseConfig(bool status) { m_systemCloseConfig = status; }
84  bool systemCloseConfig() { return m_systemCloseConfig; }
88  bool systemTrayIsVisible() { return m_systemTray->isVisible(); }
92  void showMessage(const QString &title, const QString &text);
93 
97  void setWindowConcise();
101  bool isLrcWidgetShowFullScreen() const;
102 
106  void resizeWindow();
110  void applyParameter();
111 
112 public Q_SLOTS:
116  void lrcWidgetShowFullScreen();
120  void lockDesktopLrc(bool lock);
124  void desktopLrcClosed();
128  void iconActivated(QSystemTrayIcon::ActivationReason);
129 
130 private:
134  void createSystemTrayIcon();
135 
136  Ui::MusicApplication *m_ui;
139  QSystemTrayIcon *m_systemTray;
143 
145 
146 };
147 
148 #endif // MUSICBOTTOMAREAWIDGET_H
#define TTK_MODULE_EXPORT
The class of the app main widget.
The class of the blur spectrum object.
The class of the platform extras.
const char * name
Definition: http_parser.c:458
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the app bottom area widget.
The class of the system tray menu widget.
MusicSystemTrayMenu * m_systemTrayMenu
void setSystemCloseConfig(bool status)
MusicBlurSpecturmModule * m_blurModule
MusicPlatformExtras * m_platformExtras
QSystemTrayIcon * m_systemTray
Ui::MusicApplication * m_ui
static MusicBottomAreaWidget * m_instance
state
Definition: http_parser.c:279