Sayonara Player
GUI_Broadcast.h
1/* GUI_Broadcast.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef GUI_BROADCAST_H
22#define GUI_BROADCAST_H
23
24#include "Gui/Plugins/PlayerPluginBase.h"
25#include "Utils/Pimpl.h"
26
27UI_FWD(GUI_Broadcast)
28
29class PlayManager;
31
34{
35 Q_OBJECT
36 PIMPL(GUI_Broadcast)
37 UI_CLASS(GUI_Broadcast)
38
39public:
40 explicit GUI_Broadcast(PlayManager* playManager, RawAudioDataProvider* audioDataProvider, QWidget* parent=nullptr);
41 ~GUI_Broadcast() override;
42
43 QString name() const override;
44 QString displayName() const override;
45
46private slots:
47 void connectionEstablished(const QString& ip);
48 void connectionClosed(const QString& ip);
49 void canListenChanged(bool b);
50
51 void dismissClicked();
52 void dismissAllClicked();
53 void currentIndexChanged(int idx);
54 void retry();
55 void mp3EncoderFound();
56
57private:
58 void dismissAt(int idx);
59 void setStatusLabel();
60
61 void retranslate() override;
62 void initUi() override;
63
64 bool checkDismissVisible() const;
65 bool checkDismissAllVisible() const;
66 void updateDismissButtons();
67
68 void startServer();
69};
70
71#endif // GUI_BROADCAST_H
Definition: GUI_Broadcast.h:34
QString displayName() const override
must be overwritten
QString name() const override
must be overwritten
Global handler for current playback state (Singleton)
Definition: PlayManager.h:36
Definition: PlayerPluginBase.h:40
Definition: AudioDataProvider.h:55