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 
35 namespace Cover
36 {
37  class Location;
38 }
39 
40 
47 
49  public Gui::Dialog
50 {
51  Q_OBJECT
53  UI_CLASS(GUI_AlternativeCovers)
54 
55 public:
56  explicit GUI_AlternativeCovers(QWidget* parent=nullptr);
57  virtual ~GUI_AlternativeCovers();
58 
59 public slots:
60  void start(const Cover::Location& cl);
61 
62 signals:
63  void sig_cover_changed(const Cover::Location& cl);
64 
65 private slots:
66  void ok_clicked();
67  void apply_clicked();
68  void search_clicked();
69  void cover_pressed(const QModelIndex& idx);
70  void open_file_dialog();
71  void cl_new_cover(const QString& cover_path);
72  void cl_finished(bool);
73 
74 private:
75  void reset_model();
76  void connect_and_start();
77  void delete_all_files();
78  void init_combobox();
79 
80 protected:
81  void resizeEvent(QResizeEvent* e) override;
82  void closeEvent(QCloseEvent* e) override;
83  void language_changed() override;
84 };
85 
86 #endif /* GUI_ALTERNATE_COVERS_H_ */
Definition: ComboBoxDelegate.h:26
The CoverLocation class.
Definition: CoverLocation.h:41
The GUI_AlternativeCovers class.
Definition: GUI_AlternativeCovers.h:48
Definition: SomaFMStation.h:33