TTKMusicPlayer  3.7.0.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 - 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 "ttkabstractxml.h"
25 
26 class QTreeWidgetItem;
27 class MusicCoreMPlayer;
28 
29 namespace Ui {
32 }
33 
38 {
39  QString m_name;
40  QString m_location;
41  QString m_url;
42 };
44 
45 
50 {
51  QString m_category;
52  MusicFMChannelList m_items;
53 };
55 
56 
61 {
63 public:
68 
72  virtual bool readBuffer(MusicFMCategoryList &items) override final;
76  virtual bool writeBuffer(const MusicFMCategoryList &items) override final;
77 
78 };
79 
80 
85 {
86  Q_OBJECT
88 public:
92  explicit MusicTTKFMRadioInformationWidget(QWidget *parent = nullptr);
97 
101  void setReadOnly(bool mode);
105  void setChannelInformation(const MusicFMChannel &channel);
109  MusicFMChannel channelInformation() const;
110 
111 private:
112  Ui::MusicTTKFMRadioInformationWidget *m_ui;
114 
115 };
116 
117 
122 {
123  Q_OBJECT
125 public:
129  explicit MusicTTKFMRadioPlayWidget(QWidget *parent = nullptr);
134 
135 public Q_SLOTS:
139  void radioItemChanged(QTreeWidgetItem *item, int column);
143  void mediaPlayFinished(int code);
147  void radioPlay();
151  void radioPrevious();
155  void radioNext();
159  void radioVolume(int num);
163  void positionChanged(qint64 position);
167  void addButtonClicked();
171  void deleteButtonClicked();
175  void infoButtonClicked();
176 
177 private:
181  virtual void closeEvent(QCloseEvent *event) override final;
182 
186  void initialize();
190  void createCoreModule();
194  void startCoreModule();
198  int indexValid(QTreeWidgetItem *item) const;
199 
200  Ui::MusicTTKFMRadioPlayWidget *m_ui;
205  MusicFMChannelList m_items;
206  MusicFMChannelList m_favItems;
207 
208 };
209 
210 #endif // MUSICTTKFMRADIOPLAYWIDGET_H
#define TTK_MODULE_EXPORT
The class of the ttk xml interface.
MusicFMChannelList m_items
The class of the fm config manager.
virtual bool writeBuffer(const T &items)=0
Ui::MusicTTKFMRadioInformationWidget * m_ui
The class of the web music radio information widget.
The class of the fm channel item.
virtual bool readBuffer(T &items)=0
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
TTK_DECLARE_LIST(MusicFMChannel)
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 read write interface.
The class of the web music radio widget.
The class of the fm category item.
const char int mode
Definition: ioapi.h:135
The class of the moving widget base.