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
qaccessiblequickpage.cpp
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
4
#
include
"qaccessiblequickpage_p.h"
5
#
include
"qquickpage_p.h"
6
7
QT_BEGIN_NAMESPACE
8
9
QAccessibleQuickPage
::
QAccessibleQuickPage
(
QQuickPage
*
page
)
10
:
QAccessibleQuickItem
(
page
)
11
{
12
}
13
14
QAccessibleInterface *QAccessibleQuickPage::child(
int
index)
const
15
{
16
const
QList<QQuickItem*> kids = orderedChildItems();
17
if
(QQuickItem *item = kids.value(index))
18
return
QAccessible::queryAccessibleInterface(item);
19
return
nullptr
;
20
}
21
22
int
QAccessibleQuickPage
::
indexOfChild
(
const
QAccessibleInterface *iface)
const
23
{
24
const
QList<QQuickItem*> kids = orderedChildItems();
25
return
(
int
)kids.indexOf(
static_cast
<QQuickItem*>(iface->object()));
26
}
27
28
QList<QQuickItem *>
QAccessibleQuickPage
::orderedChildItems()
const
29
{
30
// Just ensures that the header is first, and footer is last. Other existing order is kept.
31
const
QQuickPage *p = page();
32
QList<QQuickItem*> kids = childItems();
33
const
qsizetype hidx = kids.indexOf(p->header());
34
if
(hidx != -1)
35
kids.move(hidx, 0);
36
const
qsizetype fidx = kids.indexOf(p->footer());
37
if
(fidx != -1)
38
kids.move(fidx, kids.size() - 1);
39
return
kids;
40
}
41
42
QQuickPage *
QAccessibleQuickPage
::page()
const
43
{
44
return
static_cast
<QQuickPage*>(object());
45
}
46
47
QT_END_NAMESPACE
QAccessibleQuickPage
Definition
qaccessiblequickpage_p.h:25
QAccessibleQuickPage::indexOfChild
int indexOfChild(const QAccessibleInterface *iface) const override
Definition
qaccessiblequickpage.cpp:22
QQuickPage
Definition
qquickpage_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
page
QByteArray page
[45]
Definition
src_corelib_kernel_qobject.cpp:382
qtdeclarative
src
quicktemplates
accessible
qaccessiblequickpage.cpp
Generated on Thu Nov 14 2024 00:49:47 for Qt by
1.12.0