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 
27 UI_FWD(GUI_Broadcast)
28 
30  public PlayerPlugin::Base
31 {
32  Q_OBJECT
33  PIMPL(GUI_Broadcast)
34  UI_CLASS(GUI_Broadcast)
35 
36 public:
37  explicit GUI_Broadcast(QWidget* parent=nullptr);
38  ~GUI_Broadcast() override;
39 
40  QString name() const override;
41  QString displayName() const override;
42 
43 private slots:
44  void connectionEstablished(const QString& ip);
45  void connectionClosed(const QString& ip);
46  void canListenChanged(bool b);
47 
48  void dismissClicked();
49  void dismissAllClicked();
50  void currentIndexChanged(int idx);
51  void retry();
52  void mp3EncoderFound();
53 
54 private:
55  void dismissAt(int idx);
56  void setStatusLabel();
57 
58  void retranslate() override;
59  void initUi() override;
60 
61  bool checkDismissVisible() const;
62  bool checkDismissAllVisible() const;
63  void updateDismissButtons();
64 
65  void startServer();
66 };
67 
68 #endif // GUI_BROADCAST_H
GUI_Broadcast
Definition: GUI_Broadcast.h:31
GUI_Broadcast::name
QString name() const override
must be overwritten
GUI_Broadcast::displayName
QString displayName() const override
must be overwritten
PlayerPlugin
Interface for PlayerPlugin classes. get_name() and language_changed() must be overwritten.
Definition: GUI_Player.h:41