Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickfolderdialog_p.h
Go to the documentation of this file.
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 QQUICKFOLDERDIALOG_P_H
5#define QQUICKFOLDERDIALOG_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 <QtCore/qurl.h>
19#include <QtQml/qqml.h>
20
22
24
26
27class Q_QUICKDIALOGS2_EXPORT QQuickFolderDialog : public QQuickAbstractDialog
28{
30 Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL)
31 Q_PROPERTY(QUrl selectedFolder READ selectedFolder WRITE setSelectedFolder NOTIFY selectedFolderChanged FINAL)
32 Q_PROPERTY(QFileDialogOptions::FileDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged FINAL)
33 Q_PROPERTY(QString acceptLabel READ acceptLabel WRITE setAcceptLabel RESET resetAcceptLabel NOTIFY acceptLabelChanged FINAL)
34 Q_PROPERTY(QString rejectLabel READ rejectLabel WRITE setRejectLabel RESET resetRejectLabel NOTIFY rejectLabelChanged FINAL)
35 Q_FLAGS(QFileDialogOptions::FileDialogOptions)
38
39public:
40 explicit QQuickFolderDialog(QObject *parent = nullptr);
41
42 QUrl currentFolder() const;
43 void setCurrentFolder(const QUrl &folder);
44
45 QUrl selectedFolder() const;
46 void setSelectedFolder(const QUrl &folder);
47
48 QFileDialogOptions::FileDialogOptions options() const;
49 void setOptions(QFileDialogOptions::FileDialogOptions options);
50 void resetOptions();
51
52 QString acceptLabel() const;
53 void setAcceptLabel(const QString &label);
54 void resetAcceptLabel();
55
56 QString rejectLabel() const;
57 void setRejectLabel(const QString &label);
58 void resetRejectLabel();
59
61 void currentFolderChanged();
62 void selectedFolderChanged();
63 void optionsChanged();
64 void acceptLabelChanged();
65 void rejectLabelChanged();
66
67protected:
68 bool useNativeDialog() const override;
69 void onCreate(QPlatformDialogHelper *dialog) override;
70 void onShow(QPlatformDialogHelper *dialog) override;
71
74};
75
77
78#endif // QQUICKFOLDERDIALOG_P_H
\inmodule QtCore
Definition qobject.h:103
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
GLuint GLsizei const GLchar * label
[43]
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_FLAGS(x)
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]