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
qquicklabsplatformfolderdialog_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKLABSPLATFORMFOLDERDIALOG_P_H
5#define QQUICKLABSPLATFORMFOLDERDIALOG_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This folder is not part of the Qt API. It exists purely as an
12// implementation detail. This header folder may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
19#include <QtCore/qurl.h>
20#include <QtQml/qqml.h>
21
23
25{
26 Q_OBJECT
27 QML_NAMED_ELEMENT(FolderDialog)
34
35public:
37
38 QUrl folder() const;
39 void setFolder(const QUrl &folder);
40
41 QUrl currentFolder() const;
42 void setCurrentFolder(const QUrl &folder);
43
45 void setOptions(QFileDialogOptions::FileDialogOptions options);
46 void resetOptions();
47
48 QString acceptLabel() const;
49 void setAcceptLabel(const QString &label);
50 void resetAcceptLabel();
51
52 QString rejectLabel() const;
53 void setRejectLabel(const QString &label);
54 void resetRejectLabel();
55
62
63protected:
64 bool useNativeDialog() const override;
65 void onCreate(QPlatformDialogHelper *dialog) override;
66 void onShow(QPlatformDialogHelper *dialog) override;
67 void accept() override;
68
69private:
70 QUrl m_folder;
71 QSharedPointer<QFileDialogOptions> m_options;
72};
73
74QT_END_NAMESPACE
75
76#endif // QQUICKLABSPLATFORMFOLDERDIALOG_P_H
\inmodule QtCore
Definition qobject.h:103
virtual void accept()
\qmlmethod void Qt.labs.platform::Dialog::accept()
QString rejectLabel() const
\qmlproperty string Qt.labs.platform::FolderDialog::rejectLabel
void setOptions(QFileDialogOptions::FileDialogOptions options)
void accept() override
\qmlmethod void Qt.labs.platform::Dialog::accept()
void onCreate(QPlatformDialogHelper *dialog) override
QString acceptLabel() const
\qmlproperty string Qt.labs.platform::FolderDialog::acceptLabel
void onShow(QPlatformDialogHelper *dialog) override
QFileDialogOptions::FileDialogOptions options() const
\qmlproperty flags Qt.labs.platform::FolderDialog::options
QUrl currentFolder() const
\qmlproperty url Qt.labs.platform::FolderDialog::currentFolder
QUrl folder() const
\qmlproperty url Qt.labs.platform::FolderDialog::folder
Combined button and popup list for selecting options.