Debian Codegraph @

src/album/controller/exporter.h

raw
1 /*
2 * Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co., Ltd.
3 *
4 * Author: ZhangYong <[email protected]>
5 *
6 * Maintainer: ZhangYong <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 #ifndef EXPORTER_H
22 #define EXPORTER_H
23
24 #include <QObject>
25 #include <QMap>
26
27 #include "controller/signalmanager.h"
28 #include "dbmanager/dbmanager.h"
29 #include "widgets/cexportimagedialog.h"
30 #include "application.h"
31
32 class Exporter : public QObject
33 {
34 Q_OBJECT
35 public:
36 static Exporter *instance();
37
38 public slots:
39 void exportImage(const QStringList &imagePaths);
40 void exportAlbum(const QStringList &albumPaths, const QString &albumname);
41 void popupDialogSaveImage(const QStringList &imagePaths);
42 private:
43 explicit Exporter(QObject *parent = nullptr);
44 static Exporter *m_exporter;
45 QMap<QString, QString> m_picFormatMap;
46
47 void initValidFormatMap();
48
49 private:
50
51 CExportImageDialog *m_exportImageDialog;
52 };
53
54 #endif // EXPORTER_H