Sayonara Player
GUI_InfoDialog.h
1/* GUI_InfoDialog.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 * created by Michael Lugmair (Lucio Carreras),
21 * Jul 19, 2012
22 *
23 */
24
25#ifndef GUI_INFODIALOG_H_
26#define GUI_INFODIALOG_H_
27
28#include "Gui/Utils/Widgets/Dialog.h"
29#include "Utils/Pimpl.h"
30
31namespace Cover
32{
33 class Location;
34}
35
36UI_FWD(InfoDialog)
37
38
43 public Gui::Dialog
44{
45 Q_OBJECT
46 PIMPL(GUI_InfoDialog)
47 UI_CLASS(InfoDialog)
48
49 public:
50 enum class Tab :
51 uint8_t
52 {
53 Info = 0,
54 Lyrics = 1,
55 Edit = 2
56 };
57
58 explicit GUI_InfoDialog(QWidget* parent = nullptr);
59 ~GUI_InfoDialog() override;
60
61 void setMetadata(const MetaDataList& tracks, MD::Interpretation interpretation);
62 bool hasMetadata() const;
63
64 GUI_InfoDialog::Tab show(GUI_InfoDialog::Tab track);
65 void showCoverEditTab();
66
67 void setBusy(bool b);
68
69 protected:
70 void skinChanged() override;
71 void languageChanged() override;
72
73 private slots:
74 void tabIndexChangedInt(int idx);
75 void writeCoversToTracksClicked();
76 void coverChanged();
77
78 private:
79 void init();
80 void initTagEdit();
81 void initLyrics();
82
83 void showInfoTab();
84 void showLyricsTab();
85 void showTagEditTab();
86
87 void prepareCover(const Cover::Location& coverLocation);
88 void prepareInfo(MD::Interpretation mode);
89 void prepareTab(GUI_InfoDialog::Tab idx);
90
91 protected:
92 void closeEvent(QCloseEvent* e) override;
93 void showEvent(QShowEvent* e) override;
94 void resizeEvent(QResizeEvent* e) override;
95
96 using Gui::Dialog::show;
97};
98
99#endif /* GUI_INFODIALOG_H_ */
Definition: CoverLocation.h:39
The GUI_InfoDialog class.
Definition: GUI_InfoDialog.h:44
The MetaDataList class.
Definition: MetaDataList.h:39