TTKMusicPlayer  4.3.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 - 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 <QTimer>
23 #include "musicwidgetutils.h"
24 #include "musicwidgetheaders.h"
25 #include "ttkabstractmovewidget.h"
26 
27 class TTKClickedSlider;
28 
33 {
34  Q_OBJECT
35 public:
36  enum Module
37  {
38  Null = 0,
43  Ripple
44  };
45 
49  explicit MusicRemoteWidget(QWidget *parent = nullptr);
54 
58  void setCurrentPlayState(bool state) const;
62  void setVolumeValue(int index);
66  int mapRemoteTypeIndex();
67 
71  virtual void setLabelText(const QString &text);
72 
73 Q_SIGNALS:
77  void showMainWindow();
81  void playStateChanged();
85  void playPreviousChanged();
89  void playNextChanged();
93  void volumeChanged(int value);
97  void settingChanged();
101  void remoteTypeChanged(QAction *type);
102 
103 public Q_SLOTS:
107  void volumeSliderChanged(int value);
111  void show();
115  bool close();
116 
117 protected:
121  virtual void contextMenuEvent(QContextMenuEvent *event) override;
125  void adjustPosition(QWidget *w);
126 
127  QPushButton *m_showMainWindowButton, *m_preSongButton;
128  QPushButton *m_nextSongButton, *m_playButton;
129  QPushButton *m_settingButton;
130  QWidget *m_mainWidget, *m_volumeWidget;
131  QToolButton *m_volumeButton;
133 
134 };
135 
136 #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.
The class of the desktop remote widget base.
TTKClickedSlider * m_volumeSlider
QPushButton * m_playButton
state
Definition: http_parser.c:279