Sayonara Player
GUI_CoverEdit.h
1 /* GUI_CoverEdit.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 #ifndef GUI_COVEREDIT_H
24 #define GUI_COVEREDIT_H
25 
26 #include "Gui/Utils/Widgets/Widget.h"
27 #include "Utils/Pimpl.h"
28 
29 UI_FWD(GUI_CoverEdit)
30 
31 namespace Tagging
32 {
33  class Editor;
34 }
35 
36 class MetaData;
37 class MetaDataList;
38 class QPixmap;
39 class GUI_TagEdit;
40 
46  public Gui::Widget
47 {
48  Q_OBJECT
49  PIMPL(GUI_CoverEdit)
50  UI_CLASS(GUI_CoverEdit)
51 
52  public:
58  explicit GUI_CoverEdit(GUI_TagEdit* parent);
59  ~GUI_CoverEdit();
60 
65  void reset();
66 
71  void refresh_current_track();
72 
77  void set_current_index(int index);
78 
84  QPixmap selected_cover(int index) const;
85 
86  private:
87  void set_cover(const MetaData& md);
88  void show_replacement_field(bool b);
89  bool is_cover_replacement_active() const;
90 
91  protected:
92  void language_changed() override;
93 
94  private slots:
98  void cover_changed();
99  void replace_toggled(bool b);
100  void cover_all_toggled(bool b);
101  void set_metadata(const MetaDataList& v_md);
102 };
103 
104 #endif // GUI_COVEREDIT_H
void reset()
Shows the current cover (if there) and offers to replace it Every other widget is hidden...
The GUI_CoverEdit class.
Definition: GUI_CoverEdit.h:45
QPixmap selected_cover(int index) const
returns the new cover for a current track.
Definition: GUI_TagEdit.h:42
The MetaData class.
Definition: MetaData.h:44
The MetaDataList class.
Definition: MetaDataList.h:37
The GUI_TagEdit class.
Definition: GenreFetcher.h:33
void refresh_current_track()
refetches the track from the tag editor and sets the cover to the left button
void set_current_index(int index)
sets the current index for a track which is currently processed
GUI_CoverEdit(GUI_TagEdit *parent)
GUI_CoverEdit.
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() wi...
Definition: Widget.h:37