Sayonara Player
GUI_SomaFM.h
1 /* GUI_SomaFM.h */
2 
3 /* Copyright (C) 2011-2017 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 /* GUI_SomaFM.h */
22 
23 #ifndef GUI_SOMAFM_H
24 #define GUI_SOMAFM_H
25 
26 #include "GUI/Helper/SayonaraWidget/SayonaraWidget.h"
27 
28 #include <QItemSelection>
29 
30 class SomaFMStation;
31 class SomaFMLibrary;
32 class QComboBox;
33 
34 namespace Ui
35 {
36  class GUI_SomaFM;
37 }
38 
39 class GUI_SomaFM :
40  public SayonaraWidget
41 {
42  Q_OBJECT
43 
44 private:
45  SomaFMLibrary* _library=nullptr;
46  Ui::GUI_SomaFM* ui=nullptr;
47 
48 
49 public:
50  explicit GUI_SomaFM(QWidget *parent = 0);
51  ~GUI_SomaFM();
52 
53  QComboBox* get_libchooser() const;
54 
55 
56 private slots:
57  void stations_loaded(const QList<SomaFMStation>& stations);
58  void station_changed(const SomaFMStation& station);
59 
60  void station_double_clicked(const QModelIndex& idx);
61  void station_clicked(const QModelIndex& idx);
62  void station_index_changed(const QModelIndex& idx);
63  void playlist_double_clicked(const QModelIndex& idx);
64  void cover_found(const QString& cover_path);
65 
66  void selection_changed(const QModelIndexList& selected);
67 
68 
69 private:
70  SomaFMStation get_station(int row) const;
71 };
72 
73 #endif // GUI_SOMAFM_H
Definition: GUI_SomaFM.h:34
Definition: SomaFMStation.h:35
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() wi...
Definition: SayonaraWidget.h:36
Definition: GUI_SomaFM.h:39
Definition: SomaFMLibrary.h:33
Definition: ui_GUI_SomaFM.h:217
Definition: org_mpris_media_player2_adaptor.h:20