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
29UI_FWD(GUI_CoverEdit)
30
31namespace Tagging
32{
33 class Editor;
34}
35
36class MetaData;
37class MetaDataList;
38class QPixmap;
39
40namespace Tagging
41{
42 class Editor;
43}
44
50 public Gui::Widget
51{
52 Q_OBJECT
53 PIMPL(GUI_CoverEdit)
54 UI_CLASS(GUI_CoverEdit)
55
56 public:
62 explicit GUI_CoverEdit(Tagging::Editor* tagEditor, QWidget* parent);
63 ~GUI_CoverEdit() override;
64
69 void reset();
70
76
81 void setCurrentIndex(int index);
82
88 QPixmap selectedCover(int index) const;
89
90 private:
91 void setCover(const MetaData& track);
92 void showReplacementField(bool b);
93 bool isCoverReplacementActive() const;
94
95 private slots:
99 void coverChanged();
100 void replaceToggled(bool b);
101 void coverAllToggled(bool b);
102 void setMetadata(const MetaDataList& tracks);
103
104 protected:
105 void languageChanged() override;
106};
107
108#endif // GUI_COVEREDIT_H
The GUI_CoverEdit class.
Definition: GUI_CoverEdit.h:51
void setCurrentIndex(int index)
sets the current index for a track which is currently processed
void reset()
Shows the current cover (if there) and offers to replace it Every other widget is hidden.
void refreshCurrentTrack()
refetches the track from the tag editor and sets the cover to the left button
QPixmap selectedCover(int index) const
returns the new cover for a current track.
GUI_CoverEdit(Tagging::Editor *tagEditor, QWidget *parent)
GUI_CoverEdit.
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition: Widget.h:39
The MetaDataList class.
Definition: MetaDataList.h:37
The MetaData class.
Definition: MetaData.h:47
The TagEdit class Metadata has to be added using the set_metadata(const MetaDataList&) method....
Definition: Editor.h:43
The GUI_TagEdit class.
Definition: GenreFetcher.h:34