Sayonara Player
GUI_AlternativeCovers.h
1 /* GUI_AlternativeCovers.h */
2 
3 /* Copyright (C) 2011-2019 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_AlternativeCovers.h
24  *
25  * Created on: Jul 1, 2011
26  * Author: Lucio Carreras
27  */
28 
29 #ifndef GUI_ALTERNATE_COVERS_H_
30 #define GUI_ALTERNATE_COVERS_H_
31 
32 #include "Gui/Utils/Widgets/Dialog.h"
33 #include "Utils/Pimpl.h"
34 #include <QPixmap>
35 
36 namespace Cover
37 {
38  class Location;
39 }
40 
41 
48 
50  public Gui::Dialog
51 {
52  Q_OBJECT
54  UI_CLASS(GUI_AlternativeCovers)
55 
56 public:
57  explicit GUI_AlternativeCovers(const Cover::Location& cl, QWidget* parent=nullptr);
58  virtual ~GUI_AlternativeCovers();
59 
60  void set_cover_location(const Cover::Location& cl);
61 
62 
63 public slots:
64  //void start(const Cover::Location& cl);
65 
66 signals:
67  void sig_cover_changed(const Cover::Location& cl);
68 
69 private slots:
70  void ok_clicked();
71  void apply_clicked();
72  void search_clicked();
73  void cover_pressed(const QModelIndex& idx);
74  void open_file_dialog();
75 
76  void lookup_started();
77  void lookup_finished(bool);
78  void cover_found(const QPixmap& cover);
79 
80  void servers_changed();
81  void autostart_toggled(bool b);
82  void rb_autosearch_toggled(bool b);
83  void rb_textsearch_toggled(bool b);
84  void www_active_changed();
85 
86 private:
87  void init_ui();
88  void reset();
89  void connect_and_start();
90  void init_combobox();
91 
92 protected:
93  void showEvent(QShowEvent* e) override;
94  void resizeEvent(QResizeEvent* e) override;
95  void closeEvent(QCloseEvent* e) override;
96  void language_changed() override;
97 };
98 
99 #endif /* GUI_ALTERNATE_COVERS_H_ */
Definition: GUI_ControlsBase.h:43
The CoverLocation class.
Definition: CoverLocation.h:37
The GUI_AlternativeCovers class.
Definition: GUI_AlternativeCovers.h:49
Definition: SomaFMStation.h:33