TTKMusicPlayer  3.7.0.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 - 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 "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 clearFunctionTableSelection();
152  void fileAssociationChanged();
156  void globalHotkeyBoxChanged(bool state);
157 
161  void downloadCacheClean();
165  void downloadFileNameRuleChanged(QAction *action);
169  void downloadGroupCached(int index);
173  void downloadGroupSpeedLimit(int index);
177  void downloadDirChanged(int index);
178 
182  void rippleVersionUpdateChanged();
186  void rippleSpectrumColorChanged();
190  void rippleSpectrumOpacityEnableClicked(bool state);
194  void rippleLowPowerEnableBoxClicked(bool state);
195 
199  void otherPluginManagerChanged();
200 
204  void changeDesktopLrcWidget();
208  void changeInteriorLrcWidget();
212  void changeDownloadWidget();
213 
217  void interiorLrcFrontgroundChanged();
221  void interiorLrcBackgroundChanged();
225  void defaultLrcColorChanged(int value);
229  void interiorLrcTransChanged(int value);
233  void showInteriorLrcDemo();
237  void resetInteriorParameter();
238 
242  void desktopFrontgroundChanged();
246  void desktopBackgroundChanged();
250  void defaultDesktopLrcColorChanged(int value);
254  void desktopLrcTransChanged(int value);
258  void showDesktopLrcDemo();
262  void resetDesktopParameter();
263 
267  void setNetworkProxyControl(int enable);
271  void testNetworkProxy();
275  void testProxyStateChanged(bool state);
279  void testNetworkConnection();
283  void checkNetworkConnection();
287  void testNetworkConnectionStateChanged(const QString &name);
288 
292  void fadeInAndOutClicked(bool state);
293 
297  void saveParameterSettings();
298 
299 private Q_SLOTS:
303  void setScrollWidgetPageIndex(int index);
307  void scrollWidgetValueChanged(int value);
308 
309 private:
313  void initScrollWidgetPage();
317  void initNormalSettingWidget();
321  void initDownloadWidget();
325  void initSpectrumSettingWidget();
329  void initOtherSettingWidget();
333  void initDesktopLrcWidget();
337  void initInteriorLrcWidget();
341  void initSoundEffectWidget();
345  void initAudioSettingWidget();
349  void initNetworkWidget();
350 
351 private:
355  void selectFunctionTableIndex(int row, int column);
359  void lcrColorValue(Lrc key, const QString &type, QLabel *obj);
363  void lrcColorByDefault(Lrc key, int index);
367  void lrcTransparentValue(Lrc key, int value) const;
371  bool setNetworkProxyByType(Proxy type);
372 
373  Ui::MusicSettingWidget *m_ui;
374 
375 };
376 
377 #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:152
The class of the setting parameters widget.
The class of the moving dialog base.
state
Definition: http_parser.c:279