TTKMusicPlayer  4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicsettingwidget.h
Go to the documentation of this file.
1 #ifndef MUSICSETTINGWIDGET_H
2 #define MUSICSETTINGWIDGET_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2025 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 "musicsettingmanager.h"
25 
26 class QComboBox;
27 
28 namespace Ui {
29 class MusicSettingWidget;
30 }
31 
36 {
37  QString m_icon;
38  QString m_name;
39 
40  MusicFunctionItem(const QString &icon, const QString &name)
41  : m_icon(icon),
42  m_name(name)
43  {
44 
45  }
46 };
48 
53 {
54  Q_OBJECT
56 public:
60  explicit MusicFunctionTableWidget(QWidget *parent = nullptr);
61 
65  void addCellItems(int index, const MusicFunctionItemList &items);
66 
67 Q_SIGNALS:
71  void currentIndexChanged(int index);
72 
73 public Q_SLOTS:
77  virtual void itemCellClicked(int row, int column) override final;
78 
79 private:
81 
82 };
83 
84 
89 {
90  Q_OBJECT
92 public:
93  enum class Lrc
94  {
95  Interior,
96  Desktop
97  };
98 
99  enum class Proxy
100  {
101  Test,
102  Apply
103  };
104 
106  {
117  };
118 
122  explicit MusicSettingWidget(QWidget *parent = nullptr);
127 
131  void initialize();
132 
133 Q_SIGNALS:
137  void parameterSettingChanged();
138 
139 public Q_SLOTS:
143  void close();
144 
148  void changeDesktopLrcWidget();
152  void changeInteriorLrcWidget();
156  void changeDownloadWidget();
157 
158 private Q_SLOTS:
162  void clearFunctionTableSelection();
166  void fileAssociationChanged();
170  void globalHotkeyBoxChanged(bool state);
171 
175  void downloadCacheClean();
179  void downloadFileNameRuleChanged(QAction *action);
183  void downloadGroupCached(int index);
187  void downloadGroupSpeedLimit(int index);
191  void downloadDirChanged(int index);
192 
196  void rippleVersionUpdateChanged();
200  void rippleSpectrumColorChanged();
204  void rippleSpectrumTransChanged(int value);
208  void rippleSpectrumEnableClicked(bool state);
212  void rippleLowPowerEnableBoxClicked(bool state);
216  void otherPluginManagerChanged();
217 
221  void interiorLrcFrontgroundChanged();
225  void interiorLrcBackgroundChanged();
229  void defaultLrcColorChanged(int value);
233  void interiorLrcTransChanged(int value);
237  void showInteriorLrcDemo();
241  void resetInteriorParameter();
242 
246  void desktopFrontgroundChanged();
250  void desktopBackgroundChanged();
254  void defaultDesktopLrcColorChanged(int value);
258  void desktopLrcTransChanged(int value);
262  void showDesktopLrcDemo();
266  void resetDesktopParameter();
267 
271  void setNetworkProxyControl(int enable);
275  void testNetworkProxy();
279  void testProxyStateChanged(bool state);
283  void testNetworkConnection();
287  void checkNetworkConnection();
291  void testNetworkConnectionStateChanged(const QString &name);
292 
296  void fadeInAndOutClicked(bool state);
297 
301  void saveParameterSettings();
302 
303 private Q_SLOTS:
307  void setScrollWidgetPageIndex(int index);
311  void scrollWidgetValueChanged(int value);
312 
313 private:
317  void initScrollWidgetPage();
321  void initNormalSettingWidget();
325  void initDownloadWidget();
329  void initSpectrumSettingWidget();
333  void initOtherSettingWidget();
337  void initDesktopLrcWidget();
341  void initInteriorLrcWidget();
345  void initSoundEffectWidget();
349  void initAudioSettingWidget();
353  void initNetworkWidget();
354 
355 private:
359  void selectFunctionTableIndex(int row, int column);
363  void lcrColorValue(Lrc key, const QString &type, QLabel *obj);
367  void lrcColorByDefault(Lrc key, int index);
371  void lrcTransparentValue(Lrc key, int value) const;
375  bool setNetworkProxyByType(Proxy type);
376 
377  Ui::MusicSettingWidget *m_ui;
378 
379 };
380 
381 #endif // MUSICSETTINGWIDGET_H
MusicFunctionItem(const QString &icon, const QString &name)
#define TTK_MODULE_EXPORT
The class of the table widget base.
Ui::MusicSettingWidget * m_ui
static constexpr wchar_t key[]
The class of the function tool item.
The class of the list table widget.
const char * name
Definition: http_parser.c:458
TTK_DECLARE_LIST(MusicFunctionItem)
virtual void itemCellClicked(int row, int column)
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:168
The class of the setting parameters widget.
The class of the moving dialog base.
state
Definition: http_parser.c:279