Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickfiledialogdelegate_p_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
QQUICKFILEDIALOGDELEGATE_P_P_H
6
#
define
QQUICKFILEDIALOGDELEGATE_P_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
"qquickfiledialogimpl_p.h"
20
#
include
"qquickfiledialogimpl_p_p.h"
21
#
include
"qquickfolderdialogimpl_p.h"
22
#
include
"qquickfiledialogdelegate_p.h"
23
#
include
<
QtQuick
/
private
/
qquicksinglepointhandler_p
.
h
>
24
#
include
<
QtQuick
/
private
/
qquicktaphandler_p
.
h
>
25
#
include
<
QtQuick
/
private
/
qquickdroparea_p
.
h
>
26
#
include
<
QtQuickTemplates2
/
private
/
qquickitemdelegate_p_p
.
h
>
27
#
include
<
QtGui
/
qdrag
.
h
>
28
29
QT_BEGIN_NAMESPACE
30
31
class
QQuickFileDialogTapHandler
:
public
QQuickTapHandler
32
{
33
Q_OBJECT
34
35
public
:
36
explicit
QQuickFileDialogTapHandler
(
QQuickItem
*
parent
);
37
38
enum
State
{
39
Listening
,
// the pointer is not being pressed
40
Tracking
,
// the pointer is being pressed
41
DraggingStarted
,
// dragging started
42
Dragging
,
// a drag is ongoing
43
DraggingFinished
// dragging finished
44
};
45
46
State
state
() {
return
m_state; }
47
48
QQuickFileDialogImpl
*
getFileDialogImpl
()
const
;
49
void
grabFolder
();
50
QUrl
getFolderUrlAtPress
()
const
;
51
52
void
handleDrag
(QQuickDragEvent *event);
53
void
handleDrop
(QQuickDragEvent *event);
54
void
handleContainsDragChanged
();
55
56
friend
class
QQuickFileDialogDelegatePrivate
;
57
58
protected
:
59
void
handleEventPoint
(QPointerEvent *event, QEventPoint &point)
override
;
60
bool
wantsEventPoint
(
const
QPointerEvent *event,
const
QEventPoint &point)
override
;
61
62
private
:
63
void
resetDragData();
64
65
QPointer<QDrag> m_drag;
66
QPointer<QQuickDropArea> m_dropArea;
67
State
m_state =
Listening
;
68
QUrl m_sourceUrl;
69
bool
m_longPressed =
false
;
70
};
71
72
class
QQuickFileDialogDelegatePrivate
:
public
QQuickItemDelegatePrivate
73
{
74
public
:
75
Q_DECLARE_PUBLIC(QQuickFileDialogDelegate)
76
77
static
QQuickFileDialogDelegatePrivate
*
get
(QQuickFileDialogDelegate *delegate)
78
{
79
return
delegate->d_func();
80
}
81
82
void
highlightFile
();
83
void
chooseFile
();
84
void
initTapHandler
();
85
void
destroyTapHandler
();
86
void
handleLongPress
();
87
88
bool
acceptKeyClick
(Qt::Key key)
const
override
;
89
90
QQuickDialog *
dialog
=
nullptr
;
91
QQuickFileDialogImpl
*
fileDialog
=
nullptr
;
92
QQuickFolderDialogImpl
*
folderDialog
=
nullptr
;
93
QQuickFileDialogTapHandler
*
tapHandler
=
nullptr
;
94
QUrl
file
;
95
};
96
97
QT_END_NAMESPACE
98
99
#
endif
// QQUICKFILEDIALOGDELEGATE_P_P_H
QQuickFileDialogDelegatePrivate
Definition
qquickfiledialogdelegate_p_p.h:73
QQuickFileDialogDelegatePrivate::handleLongPress
void handleLongPress()
Definition
qquickfiledialogdelegate.cpp:179
QQuickFileDialogDelegatePrivate::dialog
QQuickDialog * dialog
Definition
qquickfiledialogdelegate_p_p.h:90
QQuickFileDialogDelegatePrivate::fileDialog
QQuickFileDialogImpl * fileDialog
Definition
qquickfiledialogdelegate_p_p.h:91
QQuickFileDialogDelegatePrivate::destroyTapHandler
void destroyTapHandler()
Definition
qquickfiledialogdelegate.cpp:173
QQuickFileDialogDelegatePrivate::chooseFile
void chooseFile()
Definition
qquickfiledialogdelegate.cpp:48
QQuickFileDialogDelegatePrivate::get
static QQuickFileDialogDelegatePrivate * get(QQuickFileDialogDelegate *delegate)
Definition
qquickfiledialogdelegate_p_p.h:77
QQuickFileDialogDelegatePrivate::initTapHandler
void initTapHandler()
Definition
qquickfiledialogdelegate.cpp:162
QQuickFileDialogDelegatePrivate::highlightFile
void highlightFile()
Definition
qquickfiledialogdelegate.cpp:25
QQuickFileDialogDelegatePrivate::folderDialog
QQuickFolderDialogImpl * folderDialog
Definition
qquickfiledialogdelegate_p_p.h:92
QQuickFileDialogDelegatePrivate::acceptKeyClick
bool acceptKeyClick(Qt::Key key) const override
Definition
qquickfiledialogdelegate.cpp:75
QQuickFileDialogDelegatePrivate::file
QUrl file
Definition
qquickfiledialogdelegate_p_p.h:94
QQuickFileDialogDelegatePrivate::tapHandler
QQuickFileDialogTapHandler * tapHandler
Definition
qquickfiledialogdelegate_p_p.h:93
QQuickFileDialogDelegate
Definition
qquickfiledialogdelegate_p.h:29
QQuickFileDialogTapHandler
Definition
qquickfiledialogdelegate_p_p.h:32
QQuickFileDialogTapHandler::getFolderUrlAtPress
QUrl getFolderUrlAtPress() const
Definition
qquickfiledialogdelegate.cpp:249
QQuickFileDialogTapHandler::handleEventPoint
void handleEventPoint(QPointerEvent *event, QEventPoint &point) override
Definition
qquickfiledialogdelegate.cpp:351
QQuickFileDialogTapHandler::state
State state()
Definition
qquickfiledialogdelegate_p_p.h:46
QQuickFileDialogTapHandler::handleContainsDragChanged
void handleContainsDragChanged()
Definition
qquickfiledialogdelegate.cpp:313
QQuickFileDialogTapHandler::grabFolder
void grabFolder()
Definition
qquickfiledialogdelegate.cpp:210
QQuickFileDialogTapHandler::handleDrag
void handleDrag(QQuickDragEvent *event)
Definition
qquickfiledialogdelegate.cpp:255
QQuickFileDialogTapHandler::getFileDialogImpl
QQuickFileDialogImpl * getFileDialogImpl() const
Definition
qquickfiledialogdelegate.cpp:203
QQuickFileDialogTapHandler::wantsEventPoint
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,...
Definition
qquickfiledialogdelegate.cpp:426
QQuickFileDialogTapHandler::State
State
Definition
qquickfiledialogdelegate_p_p.h:38
QQuickFileDialogTapHandler::DraggingStarted
@ DraggingStarted
Definition
qquickfiledialogdelegate_p_p.h:41
QQuickFileDialogTapHandler::Tracking
@ Tracking
Definition
qquickfiledialogdelegate_p_p.h:40
QQuickFileDialogTapHandler::Listening
@ Listening
Definition
qquickfiledialogdelegate_p_p.h:39
QQuickFileDialogTapHandler::Dragging
@ Dragging
Definition
qquickfiledialogdelegate_p_p.h:42
QQuickFileDialogTapHandler::DraggingFinished
@ DraggingFinished
Definition
qquickfiledialogdelegate_p_p.h:43
QQuickFileDialogTapHandler::handleDrop
void handleDrop(QQuickDragEvent *event)
Definition
qquickfiledialogdelegate.cpp:290
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quickdialogs
quickdialogsquickimpl
qquickfiledialogdelegate_p_p.h
Generated on
for Qt by
1.18.0