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 
43 
44 
45 
51  public Gui::Dialog
52 {
53  Q_OBJECT
55  UI_CLASS(GUI_AlternativeCovers)
56 
57 public:
58  explicit GUI_AlternativeCovers(const Cover::Location& cl, bool silent, QWidget* parent);
59  virtual ~GUI_AlternativeCovers();
60 
61  void set_cover_location(const Cover::Location& cl);
62 
63 signals:
64  void sig_cover_changed(const Cover::Location& cl);
65 
66 private slots:
67  void ok_clicked();
68  void apply_clicked();
69  void search_clicked();
70  void cover_pressed(const QModelIndex& idx);
71  void open_file_dialog();
72 
73  void lookup_started();
74 
75  void lookup_finished(bool);
76  void cover_found(const QPixmap& cover);
77  void ready_for_progressbar();
78 
79  void servers_changed();
80  void autostart_toggled(bool b);
81  void rb_autosearch_toggled(bool b);
82  void rb_textsearch_toggled(bool b);
83  void www_active_changed();
84 
85 
86 public slots:
87  void start();
88  void stop();
89 
90 private:
91  void init_ui();
92  void reset();
93  void reload_combobox();
94  void init_save_to_library();
95 
96 protected:
97  void showEvent(QShowEvent* e) override;
98  void resizeEvent(QResizeEvent* e) override;
99  void language_changed() override;
100 };
101 
102 #endif /* GUI_ALTERNATE_COVERS_H_ */
The CoverLocation class.
Definition: CoverLocation.h:42
The GUI_AlternativeCovers class.
Definition: GUI_AlternativeCovers.h:50