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/Helper/SayonaraWidget/SayonaraDialog.h"
33 #include "Helper/Pimpl.h"
34 
35 namespace Ui { class AlternativeCovers; }
36 
41 class CoverLocation;
42 
44  public SayonaraDialog
45 {
46  Q_OBJECT
47 
48 public:
49  explicit GUI_AlternativeCovers(QWidget* parent=nullptr);
50  virtual ~GUI_AlternativeCovers();
51 
52 signals:
53  void sig_cover_changed(const CoverLocation& cl);
54 
55 public slots:
56  void start(const CoverLocation& cl);
57 
58 private slots:
59  void ok_clicked();
60  void apply_clicked();
61  void search_clicked();
62  void cover_pressed(const QModelIndex& idx);
63  void open_file_dialog();
64  void cl_new_cover(const QString& cover_path);
65  void cl_finished(bool);
66 
67 private:
68 
70  Ui::AlternativeCovers* ui=nullptr;
71 
72 
73 private:
74  void reset_model();
75  void connect_and_start(const CoverLocation& cl);
76  void delete_all_files();
77 
78 protected:
79  void closeEvent(QCloseEvent* e) override;
80  void language_changed() override;
81 };
82 
83 #endif /* GUI_ALTERNATE_COVERS_H_ */
Definition: ui_GUI_SomaFM.h:216
The CoverLocation class.
Definition: CoverLocation.h:37
Definition: GUI_AlternativeCovers.h:43
Definition: ui_GUI_AlternativeCovers.h:228
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: SayonaraDialog.h:33