Sayonara Player
GUI_AlternativeCovers.h
1 /* GUI_AlternativeCovers.h */
2 
3 /* Copyright (C) 2011-2017 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(QWidget* parent=nullptr);
58  virtual ~GUI_AlternativeCovers();
59 
60 public slots:
61  void start(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 cl_started();
74  void cl_finished(bool);
75  void cl_new_cover(const QPixmap& cover);
76 
77  void servers_changed();
78  void autostart_toggled(bool b);
79 
80 private:
81  void reset();
82  void connect_and_start();
83  void init_combobox();
84 
85 protected:
86  void resizeEvent(QResizeEvent* e) override;
87  void closeEvent(QCloseEvent* e) override;
88  void language_changed() override;
89 };
90 
91 #endif /* GUI_ALTERNATE_COVERS_H_ */
The CoverLocation class.
Definition: CoverLocation.h:43
The GUI_AlternativeCovers class.
Definition: GUI_AlternativeCovers.h:49