Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickfolderdialogimpl_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 QQUICKFOLDERDIALOGIMPL_P_H
5#define QQUICKFOLDERDIALOGIMPL_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 <QtQuick/private/qquicklistview_p.h>
19#include <QtQuickTemplates2/private/qquickdialog_p.h>
20
22
24
26
31
32class Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT QQuickFolderDialogImpl : public QQuickDialog
33{
35 Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL)
36 Q_PROPERTY(QUrl selectedFolder READ selectedFolder WRITE setSelectedFolder NOTIFY selectedFolderChanged FINAL)
37 QML_NAMED_ELEMENT(FolderDialogImpl)
40
41public:
42 explicit QQuickFolderDialogImpl(QObject *parent = nullptr);
43
44 static QQuickFolderDialogImplAttached *qmlAttachedProperties(QObject *object);
45
46 QUrl currentFolder() const;
47 void setCurrentFolder(const QUrl &folder);
48
49 QUrl selectedFolder() const;
50 void setSelectedFolder(const QUrl &selectedFolder);
51
53 void setOptions(const QSharedPointer<QFileDialogOptions> &options);
54
55 void setAcceptLabel(const QString &label);
56 void setRejectLabel(const QString &label);
57
59 void currentFolderChanged(const QUrl &folderUrl);
60 void selectedFolderChanged(const QUrl &folderUrl);
62
63private:
64 void componentComplete() override;
66
67 Q_DISABLE_COPY(QQuickFolderDialogImpl)
68 Q_DECLARE_PRIVATE(QQuickFolderDialogImpl)
69};
70
71class Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT QQuickFolderDialogImplAttached : public QObject
72{
74 Q_PROPERTY(QQuickListView *folderDialogListView READ folderDialogListView WRITE setFolderDialogListView NOTIFY folderDialogListViewChanged)
75 Q_PROPERTY(QQuickFolderBreadcrumbBar *breadcrumbBar READ breadcrumbBar WRITE setBreadcrumbBar NOTIFY breadcrumbBarChanged)
76 Q_MOC_INCLUDE(<QtQuickTemplates2/private/qquickdialogbuttonbox_p.h>)
77
78public:
80
81 QQuickListView *folderDialogListView() const;
82 void setFolderDialogListView(QQuickListView *folderDialogListView);
83
84 QQuickFolderBreadcrumbBar *breadcrumbBar() const;
85 void setBreadcrumbBar(QQuickFolderBreadcrumbBar *breadcrumbBar);
86
90
91private:
92 Q_DISABLE_COPY(QQuickFolderDialogImplAttached)
93 Q_DECLARE_PRIVATE(QQuickFolderDialogImplAttached)
94};
95
97
99
100#endif // QQUICKFOLDERDIALOGIMPL_P_H
\inmodule QtCore
Definition qobject.h:90
void selectedFolderChanged(const QUrl &folderUrl)
void currentFolderChanged(const QUrl &folderUrl)
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:143
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
virtual void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data)
\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.
GLuint GLsizei const GLchar * label
[43]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
\inmodule QtQuick
Definition qquickitem.h:158