TTKMusicPlayer  4.3.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 - 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 "musicsettingmanager.h"
25 
26 class QComboBox;
28 
29 namespace Ui {
30 class MusicSettingWidget;
31 }
32 
37 {
38  QString m_icon;
39  QString m_name;
40 
41  MusicFunctionItem(const QString &icon, const QString &name) noexcept
42  : m_icon(icon),
43  m_name(name)
44  {
45 
46  }
47 };
49 
54 {
55  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
91 public:
92  enum class Lrc
93  {
94  Interior,
95  Desktop
96  };
97 
98  enum class Proxy
99  {
100  Test,
101  Apply
102  };
103 
105  {
116  };
117 
121  explicit MusicSettingWidget(QWidget *parent = nullptr);
126 
130  void initialize();
131 
132 Q_SIGNALS:
136  void parameterSettingChanged();
137 
138 public Q_SLOTS:
142  void close();
143 
147  void changeDesktopLrcWidget();
151  void changeInteriorLrcWidget();
155  void changeDownloadWidget();
156 
157 private Q_SLOTS:
161  void clearFunctionTableSelection();
165  void fileAssociationChanged();
169  void globalHotkeyBoxChanged(bool state);
170 
174  void downloadCacheClean();
178  void downloadFileNameRuleChanged(QAction *action);
182  void serverPluginChanged();
186  void downloadGroupCached(int index);
190  void downloadGroupSpeedLimit(int index);
194  void downloadDirChanged(int index);
195 
199  void rippleVersionUpdateChanged();
203  void rippleSpectrumColorChanged();
207  void rippleSpectrumTransChanged(int value);
211  void rippleSpectrumEnableClicked(bool state);
215  void rippleLowPowerEnableBoxClicked(bool state);
219  void otherPluginManagerChanged();
220 
224  void interiorLrcFrontgroundChanged();
228  void interiorLrcBackgroundChanged();
232  void defaultLrcColorChanged(int value);
236  void interiorLrcTransChanged(int value);
240  void showInteriorLrcDemo();
244  void resetInteriorParameter();
245 
249  void desktopFrontgroundChanged();
253  void desktopBackgroundChanged();
257  void defaultDesktopLrcColorChanged(int value);
261  void desktopLrcTransChanged(int value);
265  void showDesktopLrcDemo();
269  void resetDesktopParameter();
270 
274  void setNetworkProxyControl(int enable);
278  void testNetworkProxy();
282  void testProxyStateChanged(bool state);
286  void testNetworkConnection();
290  void checkNetworkConnection();
294  void testNetworkConnectionStateChanged(const QString &name);
295 
299  void fadeInAndOutClicked(bool state);
300 
304  void saveParameterSettings();
305 
306 private Q_SLOTS:
310  void setScrollWidgetPageIndex(int index);
314  void scrollWidgetValueChanged(int value);
315 
316 private:
320  void initScrollWidgetPage();
324  void initNormalSettingWidget();
328  void initDownloadWidget();
332  void initSpectrumSettingWidget();
336  void initOtherSettingWidget();
340  void initDesktopLrcWidget();
344  void initInteriorLrcWidget();
348  void initSoundEffectWidget();
352  void initAudioSettingWidget();
356  void initNetworkWidget();
357 
358 private:
362  void selectFunctionTableIndex(int row, int column);
366  void lcrColorValue(Lrc key, const QString &type, QLabel *obj);
370  void lrcColorByDefault(Lrc key, int index);
374  void lrcTransparentValue(Lrc key, int value) const;
378  bool setNetworkProxyByType(Proxy type);
379 
380  Ui::MusicSettingWidget *m_ui;
381 
382  QVector<MusicGlobalHotKeyEdit*> m_hotKeyEdits;
383 
384 };
385 
386 #endif // MUSICSETTINGWIDGET_H
#define TTK_MODULE_EXPORT
The class of the global hotKey lineEdit.
MusicFunctionItem(const QString &icon, const QString &name) noexcept
The class of the table widget base.
Ui::MusicSettingWidget * m_ui
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)
static constexpr wchar_t key[]
virtual void itemCellClicked(int row, int column)
TTK_MODULE_EXPORT void initialize(TTK::Attribute attr)
The class of the setting parameters widget.
The class of the moving dialog base.
QVector< MusicGlobalHotKeyEdit * > m_hotKeyEdits
state
Definition: http_parser.c:279