| 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_P_H |
| 5 | #define QQUICKFOLDERDIALOG_P_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 | |
| 18 | #include <QtQuickTemplates2/private/qquickdialog_p_p.h> |
| 19 | #include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h> |
| 20 | |
| 21 | #include "qquickfolderdialogimpl_p.h" |
| 22 | |
| 23 | #include <QtCore/qpointer.h> |
| 24 | |
| 25 | QT_BEGIN_NAMESPACE |
| 26 | |
| 27 | class QQuickFolderDialogImplPrivate : public QQuickDialogPrivate |
| 28 | { |
| 29 | Q_DECLARE_PUBLIC(QQuickFolderDialogImpl) |
| 30 | |
| 31 | public: |
| 32 | QQuickFolderDialogImplPrivate(); |
| 33 | |
| 34 | static QQuickFolderDialogImplPrivate *get(QQuickFolderDialogImpl *dialog) |
| 35 | { |
| 36 | return dialog->d_func(); |
| 37 | } |
| 38 | |
| 39 | QQuickFolderDialogImplAttached *attachedOrWarn(); |
| 40 | |
| 41 | void updateEnabled(); |
| 42 | void updateSelectedFolder(const QString &oldFolderPath); |
| 43 | |
| 44 | void handleAccept() override; |
| 45 | void handleClick(QQuickAbstractButton *button) override; |
| 46 | |
| 47 | QSharedPointer<QFileDialogOptions> options; |
| 48 | QUrl currentFolder; |
| 49 | QUrl selectedFolder; |
| 50 | QString acceptLabel; |
| 51 | QString rejectLabel; |
| 52 | }; |
| 53 | |
| 54 | class QQuickFolderDialogImplAttachedPrivate : public QObjectPrivate |
| 55 | { |
| 56 | public: |
| 57 | Q_DECLARE_PUBLIC(QQuickFolderDialogImplAttached) |
| 58 | |
| 59 | void folderDialogListViewCurrentIndexChanged(); |
| 60 | |
| 61 | QPointer<QQuickDialogButtonBox> buttonBox; |
| 62 | QPointer<QQuickListView> folderDialogListView; |
| 63 | QPointer<QQuickFolderBreadcrumbBar> breadcrumbBar; |
| 64 | }; |
| 65 | |
| 66 | QT_END_NAMESPACE |
| 67 | |
| 68 | #endif // QQUICKFOLDERDIALOG_P_P_H |
| 69 |
