TTKMusicPlayer  4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicttkfmradioplaywidget.h
Go to the documentation of this file.
1 #ifndef MUSICTTKFMRADIOPLAYWIDGET_H
2 #define MUSICTTKFMRADIOPLAYWIDGET_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 "musicfmconfigmanager.h"
25 
26 class QTreeWidgetItem;
27 class MusicCoreMPlayer;
28 
29 namespace Ui {
32 }
33 
34 
39 {
40  Q_OBJECT
42 public:
46  explicit MusicTTKFMRadioInformationWidget(QWidget *parent = nullptr);
51 
55  void setReadOnly(bool mode);
59  void setChannelInformation(const MusicFMChannel &channel);
63  MusicFMChannel channelInformation() const;
64 
65 private:
66  Ui::MusicTTKFMRadioInformationWidget *m_ui;
67  bool m_readOnly;
68 
69 };
70 
71 
76 {
77  Q_OBJECT
79 public:
83  explicit MusicTTKFMRadioPlayWidget(QWidget *parent = nullptr);
88 
89 public Q_SLOTS:
93  void radioItemChanged(QTreeWidgetItem *item, int column);
97  void mediaPlayFinished(int code);
101  void radioPlay();
105  void radioPrevious();
109  void radioNext();
113  void radioVolume(int num);
117  void positionChanged(qint64 position);
121  void addButtonClicked();
125  void deleteButtonClicked();
129  void infoButtonClicked();
130 
131 private:
135  virtual void closeEvent(QCloseEvent *event) override final;
136 
140  void initialize();
144  void createCoreModule();
148  void startCoreModule();
152  int indexValid(QTreeWidgetItem *item) const;
153 
154  Ui::MusicTTKFMRadioPlayWidget *m_ui;
159  MusicFMChannelList m_items;
160  MusicFMChannelList m_favItems;
161 
162 };
163 
164 #endif // MUSICTTKFMRADIOPLAYWIDGET_H
#define TTK_MODULE_EXPORT
Ui::MusicTTKFMRadioInformationWidget * m_ui
The class of the web music radio information widget.
The class of the fm channel item.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:168
Ui::MusicTTKFMRadioPlayWidget * m_ui
The class of the moving dialog base.
The class of the mplayer core.
Definition: inftrees.h:24
The class of the web music radio widget.
const char int mode
Definition: ioapi.h:135
The class of the moving widget base.