Debian Codegraph @

src/album/importview/importview.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 IMPORTVIEW_H
22 #define IMPORTVIEW_H
23
24 #include "application.h"
25 #include "utils/baseutils.h"
26 #include "utils/imageutils.h"
27 #include "controller/configsetter.h"
28 #include "controller/signalmanager.h"
29 #include "dbmanager/dbmanager.h"
30 #include "thumbnail/thumbnaillistview.h"
31
32
33 #include <QWidget>
34 #include <QVBoxLayout>
35 #include <DLabel>
36 #include <QPixmap>
37 #include <QStandardPaths>
38 #include <QImageReader>
39 #include <DPushButton>
40 #include <QDir>
41 #include <QFileDialog>
42 #include <QFileInfo>
43 #include <DStackedWidget>
44 #include <DSlider>
45 #include <QMimeData>
46 #include <DFileDialog>
47
48 DWIDGET_USE_NAMESPACE
49
50 class ImportView : public DWidget, public ImageEngineImportObject
51 {
52 Q_OBJECT
53
54 public:
55 ImportView();
56 bool imageImported(bool success) override;
57 void setAlbumname(const QString &name);
58 void onImprotBtnClicked(bool useDialog = true, const QStringList &list = QStringList());
59
60 private:
61 void initConnections();
62 void initUI();
63 void mousePressEvent(QMouseEvent *e) override;
64 void dragEnterEvent(QDragEnterEvent *e) override;
65 void dropEvent(QDropEvent *event) override;
66 void dragMoveEvent(QDragMoveEvent *event) override;
67 // void dragLeaveEvent(QDragLeaveEvent *e) override;
68
69 private slots:
70 void onThemeTypeChanged();
71
72 signals:
73
74 public:
75 DPushButton *m_pImportBtn;
76 QString m_albumname;
77 DLabel *pLabel;
78 DBImgInfoList m_dbInfos;
79 DLabel *pDragLabel;
80 };
81
82 #endif // IMPORTVIEW_H