Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qiosfiledialog.h
Go to the documentation of this file.
1// Copyright (C) 2016 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// Qt-Security score:significant reason:default
4
5#ifndef QIOSFILEDIALOG_H
6#define QIOSFILEDIALOG_H
7
8#include <QtCore/qeventloop.h>
9#include <qpa/qplatformdialoghelper.h>
10
12
13QT_BEGIN_NAMESPACE
14
15class QIOSFileDialog : public QPlatformFileDialogHelper
16{
17public:
18 QIOSFileDialog();
19 ~QIOSFileDialog();
20
21 void exec() override;
22 bool defaultNameFilterDisables() const override { return false; }
23 bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override;
24 void hide() override;
25 void setDirectory(const QUrl &) override {}
26 QUrl directory() const override { return QUrl(); }
27 void selectFile(const QUrl &) override {}
28 QList<QUrl> selectedFiles() const override;
29 void setFilter() override {}
30 void selectNameFilter(const QString &) override {}
31 QString selectedNameFilter() const override { return QString(); }
32
33 void selectedFilesChanged(const QList<QUrl> &selection);
34
35private:
36 QUrl m_directory;
37 QList<QUrl> m_selection;
38 QEventLoop m_eventLoop;
39 UIViewController *m_viewController;
40
41 bool showImagePickerDialog(QWindow *parent);
42 bool showNativeDocumentPickerDialog(QWindow *parent);
43 void showImagePickerDialog_helper(QWindow *parent);
44};
45
46QT_END_NAMESPACE
47
48#endif // QIOSFILEDIALOG_H
Q_FORWARD_DECLARE_OBJC_CLASS(UIViewController)