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
qaccessiblequickitem_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QACCESSIBLEQUICKITEM_H
6
#
define
QACCESSIBLEQUICKITEM_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
<
QtQuick
/
QQuickItem
>
20
#
include
<
QtQuick
/
QQuickView
>
21
#
include
<
QtGui
/
qaccessibleobject
.
h
>
22
#
include
<
QtQuick
/
private
/
qtquickglobal_p
.
h
>
23
24
QT_BEGIN_NAMESPACE
25
26
#
if
QT_CONFIG
(
accessibility
)
27
28
class
QTextDocument
;
29
30
class
Q_QUICK_EXPORT
QAccessibleQuickItem
:
public
QAccessibleObject
,
public
QAccessibleActionInterface
,
public
QAccessibleValueInterface
,
public
QAccessibleTextInterface
31
{
32
public
:
33
QAccessibleQuickItem
(
QQuickItem
*
item
);
34
35
bool
isValid
()
const
override
;
36
QWindow
*
window
()
const
override
;
37
38
QRect
rect
()
const
override
;
39
QRect
viewRect
()
const
;
40
41
bool
clipsChildren
()
const
;
42
QAccessibleInterface
*
childAt
(
int
x
,
int
y
)
const
override
;
43
44
QAccessibleInterface
*
parent
()
const
override
;
45
QAccessibleInterface
*
child
(
int
index
)
const
override
;
46
int
childCount
()
const
override
;
47
int
indexOfChild
(
const
QAccessibleInterface
*
iface
)
const
override
;
48
QList
<
QQuickItem
*>
childItems
()
const
;
49
50
QAccessible
::
State
state
()
const
override
;
51
QAccessible
::
Role
role
()
const
override
;
52
QString
text
(
QAccessible
::
Text
)
const
override
;
53
void
setText
(
QAccessible
::
Text
,
const
QString
&
text
)
override
;
54
55
bool
isAccessible
()
const
;
56
57
QList
<
std
::
pair
<
QAccessibleInterface
*,
QAccessible
::
Relation
>>
58
relations
(
QAccessible
::
Relation
match
=
QAccessible
::
AllRelations
)
const
override
;
59
60
// Action Interface
61
QStringList
actionNames
()
const
override
;
62
void
doAction
(
const
QString
&
actionName
)
override
;
63
QStringList
keyBindingsForAction
(
const
QString
&
actionName
)
const
override
;
64
65
// Value Interface
66
QVariant
currentValue
()
const
override
;
67
void
setCurrentValue
(
const
QVariant
&
value
)
override
;
68
QVariant
maximumValue
()
const
override
;
69
QVariant
minimumValue
()
const
override
;
70
QVariant
minimumStepSize
()
const
override
;
71
72
73
// Text Interface
74
void
selection
(
int
selectionIndex
,
int
*
startOffset
,
int
*
endOffset
)
const
override
;
75
int
selectionCount
()
const
override
;
76
void
addSelection
(
int
startOffset
,
int
endOffset
)
override
;
77
void
removeSelection
(
int
selectionIndex
)
override
;
78
void
setSelection
(
int
selectionIndex
,
int
startOffset
,
int
endOffset
)
override
;
79
80
// cursor
81
int
cursorPosition
()
const
override
;
82
void
setCursorPosition
(
int
position
)
override
;
83
84
// text
85
QString
text
(
int
startOffset
,
int
endOffset
)
const
override
;
86
QString
textBeforeOffset
(
int
offset
,
QAccessible
::
TextBoundaryType
boundaryType
,
87
int
*
startOffset
,
int
*
endOffset
)
const
override
;
88
QString
textAfterOffset
(
int
offset
,
QAccessible
::
TextBoundaryType
boundaryType
,
89
int
*
startOffset
,
int
*
endOffset
)
const
override
;
90
QString
textAtOffset
(
int
offset
,
QAccessible
::
TextBoundaryType
boundaryType
,
91
int
*
startOffset
,
int
*
endOffset
)
const
override
;
92
int
characterCount
()
const
override
;
93
94
// character <-> geometry
95
QRect
characterRect
(
int
/* offset */
)
const
override
{
return
QRect
(); }
96
int
offsetAtPoint
(
const
QPoint
&
/* point */
)
const
override
{
return
-1; }
97
98
void
scrollToSubstring
(
int
/* startIndex */
,
int
/* endIndex */
)
override
{}
99
QString
attributes
(
int
/* offset */
,
int
*
startOffset
,
int
*
endOffset
)
const
override
100
{ *
startOffset
= 0; *
endOffset
= 0;
return
QString
(); }
101
102
QTextDocument
*
textDocument
()
const
;
103
104
protected
:
105
QQuickItem
*
item
()
const
{
return
static_cast
<
QQuickItem
*>(
object
()); }
106
void
*
interface_cast
(
QAccessible
::
InterfaceType
t
)
override
;
107
108
private
:
109
// for Text nodes:
110
QTextDocument
*
m_doc
;
111
typedef
QHash
<
int
,
QAccessible
::
Id
>
ChildCache
;
112
mutable
ChildCache
m_childToId
;
113
114
};
115
116
QRect
itemScreenRect
(
QQuickItem
*
item
);
117
QList
<
QQuickItem
*>
accessibleUnignoredChildren
(
QQuickItem
*
item
,
bool
paintOrder
=
false
);
118
119
#
endif
// accessibility
120
121
QT_END_NAMESPACE
122
123
#
endif
// QACCESSIBLEQUICKITEM_H
QSqlRelationalDelegate
\inmodule QtSql
qtdeclarative
src
quick
accessible
qaccessiblequickitem_p.h
Generated on
for Qt by
1.14.0