TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicspectrumwidget.h
Go to the documentation of this file.
1 #ifndef MUSICSPECTRUMWIDGET_H
2 #define MUSICSPECTRUMWIDGET_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 
23 
24 namespace Ui {
26 }
27 
32 {
33  Q_OBJECT
35 public:
39  explicit MusicSpectrumWidget(QWidget *parent = nullptr);
44 
45 public Q_SLOTS:
49  void spectrumNormalTypeChanged(bool &state, const QString &name);
53  void spectrumPlusTypeChanged(bool &state, const QString &name);
57  void spectrumWaveTypeChanged(bool &state, const QString &name);
61  void spectrumFlowTypeChanged(bool &state, const QString &name);
65  void spectrumFloridTypeChanged(bool &state, const QString &name);
69  void localFileButtonClicked();
73  void openFileButtonClicked();
77  void fullscreenByUser(QWidget *widget, bool state);
78 
79 private:
81  {
82  enum class Module
83  {
84  Normal,
85  Plus,
86  Wave,
87  Flow,
88  Florid,
89  Light
90  };
91 
92  QString m_module;
93  QWidget *m_object;
95  };
97 
98 private:
102  virtual void mouseDoubleClickEvent(QMouseEvent *event) override final;
103 
107  void createSpectrumWidget(MusicSpectrum::Module spectrum, bool &state, const QString &name, QLayout *layout);
111  void createFlowWidget(MusicSpectrum::Module spectrum, bool &state, const QString &name, QLayout *layout);
115  void createFloridWidget(MusicSpectrum::Module spectrum, bool &state, const QString &name, QLayout *layout);
119  void createModuleWidget(MusicSpectrum::Module spectrum, bool &state, const QString &name, QLayout *layout, bool florid);
123  void createLightWidget(MusicSpectrum::Module spectrum, bool &state, const QString &name, QLayout *layout, const QString &url = {});
127  int findSpectrumWidget(const QString &name);
131  void showMessageBoxWidget();
132 
133 private:
134  Ui::MusicSpectrumWidget *m_ui;
136  QString m_lastFlowName;
138  MusicSpectrumList m_types;
139 
140 };
141 
142 #endif // MUSICSPECTRUMWIDGET_H
#define TTK_MODULE_EXPORT
The class of the moving resize widget with plain.
#define TTK_DECLARE_LIST(Class)
Definition: ttkqtglobal.h:161
Helper class to light widget.
Definition: lightfactory.h:28
The class of the music spectrum widget all.
const char * name
Definition: http_parser.c:458
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
Ui::MusicSpectrumWidget * m_ui
MusicSpectrumList m_types
Helper class to florid widget.
Definition: florid.h:77
state
Definition: http_parser.c:279