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
qquickfolderbreadcrumbbar_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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKFOLDERBREADCRUMBBAR_P_H
6#define QQUICKFOLDERBREADCRUMBBAR_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 <QtQuickTemplates2/private/qquicktextfield_p.h>
22
24
26
27class QQuickFolderBreadcrumbBarPrivate;
28
29class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFolderBreadcrumbBar : public QQuickContainer
30{
31 Q_OBJECT
32 Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged)
33 Q_PROPERTY(QQmlComponent *buttonDelegate READ buttonDelegate WRITE setButtonDelegate NOTIFY buttonDelegateChanged)
34 Q_PROPERTY(QQmlComponent *separatorDelegate READ separatorDelegate WRITE setSeparatorDelegate NOTIFY separatorDelegateChanged)
35 Q_PROPERTY(QQuickAbstractButton *upButton READ upButton WRITE setUpButton NOTIFY upButtonChanged)
36 Q_PROPERTY(QQuickTextField *textField READ textField WRITE setTextField NOTIFY textFieldChanged)
37 Q_PROPERTY(int upButtonSpacing READ upButtonSpacing WRITE setUpButtonSpacing NOTIFY upButtonSpacingChanged)
38 QML_NAMED_ELEMENT(FolderBreadcrumbBar)
39 QML_ADDED_IN_VERSION(6, 2)
40
41public:
42 explicit QQuickFolderBreadcrumbBar(QQuickItem *parent = nullptr);
43
44 QQuickDialog *dialog() const;
45 void setDialog(QQuickDialog *dialog);
46
47 QQmlComponent *buttonDelegate();
48 void setButtonDelegate(QQmlComponent *delegate);
49
50 QQmlComponent *separatorDelegate();
51 void setSeparatorDelegate(QQmlComponent *delegate);
52
53 QQuickAbstractButton *upButton();
54 void setUpButton(QQuickAbstractButton *upButton);
55
56 int upButtonSpacing() const;
57 void setUpButtonSpacing(int upButtonSpacing);
58
59 QQuickTextField *textField();
60 void setTextField(QQuickTextField *textField);
61
62Q_SIGNALS:
63 void dialogChanged();
64 void buttonDelegateChanged();
65 void separatorDelegateChanged();
66 void upButtonChanged();
67 void upButtonSpacingChanged();
68 void textFieldChanged();
69
70protected:
71 bool event(QEvent *event) override;
72 void keyPressEvent(QKeyEvent *event) override;
73
74 void componentComplete() override;
75
76 void itemChange(ItemChange change, const ItemChangeData &data) override;
77
78 bool isContent(QQuickItem *item) const override;
79
80 QFont defaultFont() const override;
81
82#if QT_CONFIG(accessibility)
83 QAccessible::Role accessibleRole() const override;
84#endif
85
86private:
87 Q_DISABLE_COPY(QQuickFolderBreadcrumbBar)
88 Q_DECLARE_PRIVATE(QQuickFolderBreadcrumbBar)
89};
90
91QT_END_NAMESPACE
92
93#endif // QQUICKFOLDERBREADCRUMBBAR_P_H