Sayonara Player
StationSearcher.h
1 /* 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 #ifndef STATIONSEARCHER_H
22 #define STATIONSEARCHER_H
23 
24 #include "Utils/Pimpl.h"
25 
26 #include <QObject>
27 
28 struct RadioStation;
30  public QObject
31 {
32  Q_OBJECT
33  PIMPL(StationSearcher)
34 
35  signals:
36  void sigStationsFound();
37 
38  private:
39  void startCall();
40 
41  public:
42  enum Mode
43  {
44  NewSearch,
45  Incremental,
46  Style
47  };
48 
49  StationSearcher(QObject* parent = nullptr);
50  ~StationSearcher();
51 
52  void searchStyle(const QString& style);
53  void searchStation(const QString& name);
54  void searchPrevious();
55  void searchNext();
56 
57  bool canSearchNext() const;
58  bool canSearchPrevious() const;
59  Mode mode() const;
60 
61  const QList<RadioStation>& foundStations() const;
62 
63  private slots:
64  void searchFinished();
65 };
66 
67 #endif // STATIONSEARCHER_H
Style::style
QString style(bool dark)
fetch the stylesheet file formatted as string
QList
Definition: EngineUtils.h:33
StationSearcher
Definition: StationSearcher.h:31
RadioStation
Definition: RadioStation.h:36
Style
Definition: Style.h:43