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