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
31
33 public Gui::Dialog
34{
35 Q_OBJECT
37 UI_CLASS(GUI_StationSearcher)
38
39signals:
40 void sigStreamSelected(const QString& name, const QString& url, bool save);
41
42public:
43 GUI_StationSearcher(QWidget* parent=nullptr);
44 ~GUI_StationSearcher() override;
45
46private:
47 QAbstractButton* okButton();
48 void checkOkButton();
49 void clearStations();
50 void clearStreams();
51 void changeMode(StationSearcher::Mode mode);
52 void setupCoverButton(const RadioStation& station);
53 void initLineEdit();
54
55private slots:
56 void searchClicked();
57 void searchPreviousClicked();
58 void searchNextClicked();
59 void okClicked();
60
61 void searchTextChanged(const QString& text);
62 void stationsFetched();
63
64 void currentStationChanged();
65
66protected:
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
Definition: GUI_StationSearcher.h:34
Definition: RadioStation.h:36