Qmmp
covereditor_p.h
1 /***************************************************************************
2  * Copyright (C) 2018-2020 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #ifndef COVEREDITOR_P_H
22 #define COVEREDITOR_P_H
23 
24 #include <QWidget>
25 #include <QString>
26 #include <qmmp/metadatamodel.h>
27 #include "ui_covereditor.h"
28 
29 class CoverViewer;
30 
36 class CoverEditor : public QWidget
37 {
38  Q_OBJECT
39 public:
40  explicit CoverEditor(MetaDataModel *model, const QString &coverPath, QWidget *parent = nullptr);
41 
42  bool isEditable() const;
43  void save();
44 
45 private slots:
46  void on_sourceComboBox_activated(int index);
47  void on_loadButton_clicked();
48  void on_deleteButton_clicked();
49  void on_saveAsButton_clicked();
50 
51 private:
52  Ui::CoverEditor m_ui;
53  MetaDataModel *m_model;
54  CoverViewer *m_viewer;
55  QString m_coverPath;
56  bool m_editable;
57 
58 };
59 
60 #endif // COVEREDITOR_P_H
The MetaDataModel is the base interface class of metadata access.
Definition: metadatamodel.h:80