Qt 6.x
The Qt SDK
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_PRIVATE_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
66
67protected:
68 bool useNativeDialog() const override;
70 void onShow(QPlatformDialogHelper *dialog) override;
71
72private:
74};
75
77
79
80#endif // QQUICKFOLDERDIALOG_P_H
\inmodule QtCore
Definition qobject.h:90
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
virtual void onCreate(QPlatformDialogHelper *dialog)
virtual bool useNativeDialog() const
virtual void onShow(QPlatformDialogHelper *dialog)
void selectedFolderChanged()
void currentFolderChanged()
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\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_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#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
QFileDialog dialog(this)
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent