TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicremotewidget.h
Go to the documentation of this file.
1 #ifndef MUSICREMOTEWIDGET_H
2 #define MUSICREMOTEWIDGET_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 <QTimer>
23 #include "musicwidgetutils.h"
24 #include "musicwidgetheaders.h"
25 #include "ttkabstractmovewidget.h"
26 
27 class TTKClickedSlider;
28 
33 {
34  Q_OBJECT
36 public:
37  enum Module
38  {
39  Null = 0,
44  Ripple
45  };
46 
50  explicit MusicRemoteWidget(QWidget *parent = nullptr);
55 
59  void setCurrentPlayState(bool state) const;
63  void setVolumeValue(int index);
67  int mapRemoteTypeIndex();
68 
72  virtual void setLabelText(const QString &text);
73 
74 Q_SIGNALS:
78  void showMainWindow();
82  void playStateChanged();
86  void playPreviousChanged();
90  void playNextChanged();
94  void volumeChanged(int value);
98  void settingChanged();
102  void remoteTypeChanged(QAction *type);
103 
104 public Q_SLOTS:
108  void volumeSliderChanged(int value);
112  void show();
116  bool close();
117 
118 protected:
122  virtual void contextMenuEvent(QContextMenuEvent *event) override;
126  void adjustPosition(QWidget *w);
127 
128  QPushButton *m_showMainWindowButton, *m_preSongButton;
129  QPushButton *m_nextSongButton, *m_playButton;
130  QPushButton *m_settingButton;
131  QWidget *m_mainWidget, *m_volumeWidget;
132  QToolButton *m_volumeButton;
134 
135 };
136 
137 #endif // MUSICREMOTEWIDGET_H
#define TTK_MODULE_EXPORT
QPushButton * m_showMainWindowButton
QToolButton * m_volumeButton
The class of the slider that can clicked any position.
QPushButton * m_settingButton
The class of the ttk moving widget base.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the desktop remote widget base.
TTKClickedSlider * m_volumeSlider
QPushButton * m_playButton
state
Definition: http_parser.c:279