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
qqmlfileselector_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 BlackBerry Limited. All rights reserved.
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
4
5#ifndef QQMLFILESELECTOR_P_H
6#define QQMLFILESELECTOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20#include <QSet>
21#include <QQmlAbstractUrlInterceptor>
22#include <private/qobject_p.h>
23#include <private/qtqmlglobal_p.h>
24
25#include <QtCore/qpointer.h>
26
28
29class QFileSelector;
30class QQmlFileSelectorInterceptor;
31class Q_QML_EXPORT QQmlFileSelectorPrivate : public QObjectPrivate
32{
33 Q_DECLARE_PUBLIC(QQmlFileSelector)
34public:
35 enum class Owned: bool {No = false, Yes = true };
36
37 QQmlFileSelectorPrivate();
38 ~QQmlFileSelectorPrivate();
39
40 void deleteSelectorIfOwned();
41
42 QTaggedPointer<QFileSelector, Owned> selector;
43 QPointer<QQmlEngine> engine;
44 QScopedPointer<QQmlFileSelectorInterceptor> myInstance;
45};
46
47class Q_QML_EXPORT QQmlFileSelectorInterceptor : public QQmlAbstractUrlInterceptor
48{
49public:
50 QQmlFileSelectorInterceptor(QQmlFileSelectorPrivate* pd);
51 QQmlFileSelectorPrivate* d;
52protected:
53 QUrl intercept(const QUrl &path, DataType type) override;
54};
55
56QT_END_NAMESPACE
57
58#endif
A class for applying a QFileSelector to QML file loading.
Combined button and popup list for selecting options.