Sayonara Player
GUI_CoverEdit.h
1 /* GUI_CoverEdit.h */
2 
3 /* Copyright (C) 2011-2020 Michael Lugmair (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() override;
60 
65  void reset();
66 
72 
77  void setCurrentIndex(int index);
78 
84  QPixmap selectedCover(int index) const;
85 
86  private:
87  void setCover(const MetaData& md);
88  void showReplacementField(bool b);
89  bool isCoverReplacementActive() const;
90 
91  private slots:
95  void coverChanged();
96  void replaceToggled(bool b);
97  void coverAllToggled(bool b);
98  void setMetadata(const MetaDataList& v_md);
99 
100  protected:
101  void languageChanged() override;
102 };
103 
104 #endif // GUI_COVEREDIT_H
GUI_CoverEdit::refreshCurrentTrack
void refreshCurrentTrack()
refetches the track from the tag editor and sets the cover to the left button
GUI_CoverEdit::selectedCover
QPixmap selectedCover(int index) const
returns the new cover for a current track.
GUI_TagEdit
Definition: GUI_TagEdit.h:45
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
Gui::Widget
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition: Widget.h:39
Tagging
The GUI_TagEdit class.
Definition: GenreFetcher.h:34
GUI_CoverEdit::GUI_CoverEdit
GUI_CoverEdit(GUI_TagEdit *parent)
GUI_CoverEdit.
GUI_CoverEdit::reset
void reset()
Shows the current cover (if there) and offers to replace it Every other widget is hidden.
GUI_CoverEdit
The GUI_CoverEdit class.
Definition: GUI_CoverEdit.h:47
MetaData
The MetaData class.
Definition: MetaData.h:47
GUI_CoverEdit::setCurrentIndex
void setCurrentIndex(int index)
sets the current index for a track which is currently processed