1 | // Copyright (C) 2021 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQUICKPLATFORMFILEDIALOG_P_H |
5 | #define QQUICKPLATFORMFILEDIALOG_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtGui/qpa/qplatformdialoghelper.h> |
19 | |
20 | #include "qtquickdialogs2quickimplglobal_p.h" |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class QQuickFileDialogImpl; |
25 | class QWindow; |
26 | |
27 | class Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT QQuickPlatformFileDialog : public QPlatformFileDialogHelper |
28 | { |
29 | Q_OBJECT |
30 | |
31 | public: |
32 | explicit QQuickPlatformFileDialog(QObject *parent); |
33 | ~QQuickPlatformFileDialog() = default; |
34 | |
35 | bool isValid() const; |
36 | bool defaultNameFilterDisables() const override; |
37 | void setDirectory(const QUrl &directory) override; |
38 | QUrl directory() const override; |
39 | void selectFile(const QUrl &file) override; |
40 | QList<QUrl> selectedFiles() const override; |
41 | void setFilter() override; |
42 | void selectNameFilter(const QString &filter) override; |
43 | QString selectedNameFilter() const override; |
44 | |
45 | void exec() override; |
46 | bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; |
47 | void hide() override; |
48 | |
49 | QQuickFileDialogImpl *dialog() const; |
50 | |
51 | private: |
52 | QQuickFileDialogImpl *m_dialog = nullptr; |
53 | QString m_pendingNameFilter; |
54 | }; |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | #endif // QQUICKPLATFORMFILEDIALOG_P_H |
59 |