TTKMusicPlayer  4.2.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 - 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;
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
57 public:
61  explicit MusicFunctionTableWidget(QWidget *parent = nullptr);
62 
66  void addCellItems(int index, const MusicFunctionItemList &items);
67 
68 Q_SIGNALS:
72  void currentIndexChanged(int index);
73 
74 public Q_SLOTS:
78  virtual void itemCellClicked(int row, int column) override final;
79 
80 private:
82 
83 };
84 
85 
90 {
91  Q_OBJECT
93 public:
94  enum class Lrc
95  {
96  Interior,
97  Desktop
98  };
99 
100  enum class Proxy
101  {
102  Test,
103  Apply
104  };
105 
107  {
118  };
119 
123  explicit MusicSettingWidget(QWidget *parent = nullptr);
128 
132  void initialize();
133 
134 Q_SIGNALS:
138  void parameterSettingChanged();
139 
140 public Q_SLOTS:
144  void close();
145 
149  void changeDesktopLrcWidget();
153  void changeInteriorLrcWidget();
157  void changeDownloadWidget();
158 
159 private Q_SLOTS:
163  void clearFunctionTableSelection();
167  void fileAssociationChanged();
171  void globalHotkeyBoxChanged(bool state);
172 
176  void downloadCacheClean();
180  void downloadFileNameRuleChanged(QAction *action);
184  void serverPluginChanged();
188  void downloadGroupCached(int index);
192  void downloadGroupSpeedLimit(int index);
196  void downloadDirChanged(int index);
197 
201  void rippleVersionUpdateChanged();
205  void rippleSpectrumColorChanged();
209  void rippleSpectrumTransChanged(int value);
213  void rippleSpectrumEnableClicked(bool state);
217  void rippleLowPowerEnableBoxClicked(bool state);
221  void otherPluginManagerChanged();
222 
226  void interiorLrcFrontgroundChanged();
230  void interiorLrcBackgroundChanged();
234  void defaultLrcColorChanged(int value);
238  void interiorLrcTransChanged(int value);
242  void showInteriorLrcDemo();
246  void resetInteriorParameter();
247 
251  void desktopFrontgroundChanged();
255  void desktopBackgroundChanged();
259  void defaultDesktopLrcColorChanged(int value);
263  void desktopLrcTransChanged(int value);
267  void showDesktopLrcDemo();
271  void resetDesktopParameter();
272 
276  void setNetworkProxyControl(int enable);
280  void testNetworkProxy();
284  void testProxyStateChanged(bool state);
288  void testNetworkConnection();
292  void checkNetworkConnection();
296  void testNetworkConnectionStateChanged(const QString &name);
297 
301  void fadeInAndOutClicked(bool state);
302 
306  void saveParameterSettings();
307 
308 private Q_SLOTS:
312  void setScrollWidgetPageIndex(int index);
316  void scrollWidgetValueChanged(int value);
317 
318 private:
322  void initScrollWidgetPage();
326  void initNormalSettingWidget();
330  void initDownloadWidget();
334  void initSpectrumSettingWidget();
338  void initOtherSettingWidget();
342  void initDesktopLrcWidget();
346  void initInteriorLrcWidget();
350  void initSoundEffectWidget();
354  void initAudioSettingWidget();
358  void initNetworkWidget();
359 
360 private:
364  void selectFunctionTableIndex(int row, int column);
368  void lcrColorValue(Lrc key, const QString &type, QLabel *obj);
372  void lrcColorByDefault(Lrc key, int index);
376  void lrcTransparentValue(Lrc key, int value) const;
380  bool setNetworkProxyByType(Proxy type);
381 
382  Ui::MusicSettingWidget *m_ui;
383 
384  QVector<MusicGlobalHotKeyEdit*> m_hotKeyEdits;
385 
386 };
387 
388 #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)
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:164
The class of the setting parameters widget.
The class of the moving dialog base.
QVector< MusicGlobalHotKeyEdit * > m_hotKeyEdits
state
Definition: http_parser.c:279