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
qquicksidebar_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSIDEBAR_P_H
6#define QQUICKSIDEBAR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQml/qqmlcomponent.h>
20#include <QtQuickTemplates2/private/qquickcontainer_p.h>
21#include <QtCore/qstandardpaths.h>
22
24
26
27class QQuickSideBarPrivate;
28
29class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickSideBar : public QQuickContainer
30{
31 Q_OBJECT
32 Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged FINAL)
33 Q_PROPERTY(QList<QStandardPaths::StandardLocation> folderPaths READ folderPaths WRITE setFolderPaths NOTIFY folderPathsChanged FINAL)
34 Q_PROPERTY(QList<QStandardPaths::StandardLocation> effectiveFolderPaths READ effectiveFolderPaths NOTIFY effectiveFolderPathsChanged FINAL)
35 Q_PROPERTY(QList<QUrl> favoritePaths READ favoritePaths NOTIFY favoritePathsChanged FINAL)
36 Q_PROPERTY(QQmlComponent *buttonDelegate READ buttonDelegate WRITE setButtonDelegate NOTIFY buttonDelegateChanged FINAL)
37 Q_PROPERTY(QQmlComponent *separatorDelegate READ separatorDelegate WRITE setSeparatorDelegate NOTIFY separatorDelegateChanged FINAL)
38 Q_PROPERTY(QQmlComponent *addFavoriteDelegate READ addFavoriteDelegate WRITE setAddFavoriteDelegate NOTIFY addFavoriteDelegateChanged FINAL)
39 QML_NAMED_ELEMENT(SideBar)
40 QML_ADDED_IN_VERSION(6, 9)
41
42public:
43 explicit QQuickSideBar(QQuickItem *parent = nullptr);
44 ~QQuickSideBar();
45
46 QQuickDialog *dialog() const;
47 void setDialog(QQuickDialog *dialog);
48
49 QList<QStandardPaths::StandardLocation> folderPaths() const;
50 void setFolderPaths(const QList<QStandardPaths::StandardLocation>& folderPaths);
51
52 QList<QStandardPaths::StandardLocation> effectiveFolderPaths() const;
53
54 QList<QUrl> favoritePaths() const;
55
56 QQmlComponent *buttonDelegate() const;
57 void setButtonDelegate(QQmlComponent *delegate);
58
59 QQmlComponent *separatorDelegate() const;
60 void setSeparatorDelegate(QQmlComponent *delegate);
61
62 QQmlComponent *addFavoriteDelegate() const;
63 void setAddFavoriteDelegate(QQmlComponent *delegate);
64
65
66Q_SIGNALS:
67 void dialogChanged();
68 void folderPathsChanged();
69 void effectiveFolderPathsChanged();
70 void favoritePathsChanged();
71 void buttonDelegateChanged();
72 void separatorDelegateChanged();
73 void addFavoriteDelegateChanged();
74
75protected:
76 void componentComplete() override;
77
78private:
79 void setFavoritePaths(const QList<QUrl>& favoritePaths);
80
81 Q_DISABLE_COPY(QQuickSideBar)
82 Q_DECLARE_PRIVATE(QQuickSideBar)
83};
84
85QT_END_NAMESPACE
86
87#endif // QQUICKSIDEBAR_P_H
bool acceptKeyClick(Qt::Key key) const override
QPointer< QQuickTextField > fileNameTextField
QPointer< QQuickDialog > overwriteConfirmationDialog
QPointer< QQuickListView > fileDialogListView
QPointer< QQuickFolderBreadcrumbBar > breadcrumbBar
QPointer< QQuickComboBox > nameFiltersComboBox
void handleEventPoint(QPointerEvent *event, QEventPoint &point) override
void handleDrag(QQuickDragEvent *event)
QQuickFileDialogImpl * getFileDialogImpl() const
bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override
Returns true if the given point (as part of event) could be relevant at all to this handler,...
void handleDrop(QQuickDragEvent *event)