Sayonara Player
GUI_SomaFM.h
1 /* GUI_SomaFM.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 /* GUI_SomaFM.h */
22 
23 #ifndef GUI_SOMAFM_H
24 #define GUI_SOMAFM_H
25 
26 #include "Utils/Pimpl.h"
27 #include "Gui/Utils/Widgets/Widget.h"
28 
29 #include <QItemSelection>
30 
31 class QComboBox;
32 class QFrame;
33 
34 UI_FWD(GUI_SomaFM)
35 namespace SomaFM
36 {
37  class Station;
38  class Library;
39 
40  class GUI_SomaFM :
41  public Gui::Widget
42  {
43  Q_OBJECT
44  UI_CLASS(GUI_SomaFM)
45  PIMPL(GUI_SomaFM)
46 
47  public:
48  explicit GUI_SomaFM(QWidget* parent=nullptr);
49  ~GUI_SomaFM() override;
50 
51  QFrame* headerFrame() const;
52 
53  private slots:
54  void stationsLoaded(const QList<SomaFM::Station>& stations);
55  void stationChanged(const SomaFM::Station& station);
56 
57  void stationDoubleClicked(const QModelIndex& idx);
58  void stationClicked(const QModelIndex& idx);
59  void stationIndexChanged(const QModelIndex& idx);
60  void playlistDoubleClicked(const QModelIndex& idx);
61  void coverFound(const QPixmap& cover);
62 
63  void selectionChanged(const QModelIndexList& selected);
64 
65  private:
66  SomaFM::Station getStation(int row) const;
67  };
68 }
69 
70 #endif // GUI_SOMAFM_H
SomaFM::Station
Definition: SomaFMStation.h:41
Gui::Widget
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition: Widget.h:39
QList
Definition: EngineUtils.h:33
Station
Definition: Station.h:9
Library
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31
SomaFM::GUI_SomaFM
Definition: GUI_SomaFM.h:42