Sayonara Player
GUI_StationSearcher.h
1 /* GUI_StationSearcher.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 
22 
23 #ifndef GUISTATIONSEARCHER_H
24 #define GUISTATIONSEARCHER_H
25 
26 #include "Gui/Utils/Widgets/Dialog.h"
27 #include "Components/Streaming/StationSearcher/StationSearcher.h"
28 #include "Utils/Pimpl.h"
29 
30 UI_FWD(GUI_StationSearcher)
31 
33  public Gui::Dialog
34 {
35  Q_OBJECT
36  PIMPL(GUI_StationSearcher)
37  UI_CLASS(GUI_StationSearcher)
38 
39 signals:
40  void sigStreamSelected(const QString& name, const QString& url, bool save);
41 
42 public:
43  GUI_StationSearcher(QWidget* parent=nullptr);
44  ~GUI_StationSearcher() override;
45 
46 private:
47  QAbstractButton* okButton();
48  void initLineEdit();
49  void checkListenButton();
50  void clearStations();
51  void clearStreams();
52  void changeMode(StationSearcher::Mode mode);
53 
54 private slots:
55  void searchClicked();
56  void searchPreviousClicked();
57  void searchNextClicked();
58  void okClicked();
59 
60  void searchTextChanged(const QString& text);
61  void stationsFetched();
62 
63  void stationsChanged();
64  void streamChanged();
65 
66 protected:
67  void showEvent(QShowEvent* e) override;
68  void closeEvent(QCloseEvent* e) override;
69 
70  void languageChanged() override;
71  void skinChanged() override;
72 };
73 
74 
75 #endif // STATIONSEARCHER_H
GUI_StationSearcher
Definition: GUI_StationSearcher.h:34