Sayonara Player
GUI_InfoDialog.h
1 /* GUI_InfoDialog.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  * created by Lucio Carreras,
21  * Jul 19, 2012
22  *
23  */
24 
25 #ifndef GUI_INFODIALOG_H_
26 #define GUI_INFODIALOG_H_
27 
28 #include "GUI/Helper/SayonaraWidget/SayonaraDialog.h"
29 #include "Helper/MetaData/MetaDataFwd.h"
30 #include "Helper/Pimpl.h"
31 
33 class CoverLocation;
34 
35 namespace Ui { class InfoDialog; }
36 
42  public SayonaraDialog
43 {
44  Q_OBJECT
45 
46 public:
47 
48  enum class Tab : quint8
49  {
50  Info=0,
51  Lyrics=1,
52  Edit=2
53  };
54 
55  explicit GUI_InfoDialog(InfoDialogContainer* container, QWidget* parent=nullptr);
56  ~GUI_InfoDialog();
57 
58  void set_metadata(const MetaDataList& vd, MD::Interpretation interpretation);
59  bool has_metadata() const;
60 
61  void show(GUI_InfoDialog::Tab tab);
62 
63 
64 private slots:
65  void tab_index_changed_int(int idx);
66  void tab_index_changed(GUI_InfoDialog::Tab idx);
67 
68  void skin_changed() override;
69  void language_changed() override;
70 
71 private:
72 
73  void init();
74 
75  void prepare_cover(const CoverLocation& cover_path);
76  void prepare_info(MD::Interpretation mode);
77 
78  void closeEvent(QCloseEvent *e) override;
79  void showEvent(QShowEvent *e) override;
80 
81 
82 private:
83 
84  PIMPL(GUI_InfoDialog)
85  Ui::InfoDialog* ui=nullptr;
86 };
87 
88 #endif /* GUI_INFODIALOG_H_ */
The GUI_InfoDialog class.
Definition: GUI_InfoDialog.h:41
An interface used to abstract the usage of the info dialog. An implementing class has to return the i...
Definition: InfoDialogContainer.h:35
Definition: GUI_SomaFM.h:34
Definition: MetaDataList.h:39
The CoverLocation class.
Definition: CoverLocation.h:37
Definition: ui_GUI_InfoDialog.h:272
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: SayonaraDialog.h:33