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
qquickfiledialogdelegate_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 QQUICKFILEDIALOGDELEGATE_P_H
6#define QQUICKFILEDIALOGDELEGATE_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 <QtQuickTemplates2/private/qquickitemdelegate_p.h>
20
22
23QT_BEGIN_NAMESPACE
24
25class QQuickDialog;
27
28class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFileDialogDelegate : public QQuickItemDelegate
29{
30 Q_OBJECT
31 Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged)
32 Q_PROPERTY(QUrl file READ file WRITE setFile NOTIFY fileChanged)
33 QML_NAMED_ELEMENT(FileDialogDelegate)
34 QML_ADDED_IN_VERSION(6, 2)
35
36public:
37 explicit QQuickFileDialogDelegate(QQuickItem *parent = nullptr);
38
39 QQuickDialog *dialog() const;
40 void setDialog(QQuickDialog *dialog);
41
42 QUrl file() const;
43 void setFile(const QUrl &file);
44
45Q_SIGNALS:
46 void dialogChanged();
47 void fileChanged();
48
49protected:
50 void keyReleaseEvent(QKeyEvent *event) override;
51
52private:
53 Q_DISABLE_COPY(QQuickFileDialogDelegate)
54 Q_DECLARE_PRIVATE(QQuickFileDialogDelegate)
55};
56
57QT_END_NAMESPACE
58
59#endif // QQUICKFILEDIALOGDELEGATE_P_H
bool acceptKeyClick(Qt::Key key) const override
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)