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
qquicktreeview_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
QQUICKTREEVIEW_P_H
6
#
define
QQUICKTREEVIEW_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
<
QtCore
/
qabstractitemmodel
.
h
>
20
#
include
"qquicktableview_p.h"
21
22
QT_BEGIN_NAMESPACE
23
24
class
QQuickTreeViewPrivate;
25
26
class
Q_QUICK_EXPORT
QQuickTreeView
:
public
QQuickTableView
27
{
28
Q_OBJECT
29
Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex RESET resetRootIndex NOTIFY rootIndexChanged REVISION(6, 6) FINAL)
30
QML_NAMED_ELEMENT(TreeView)
31
QML_ADDED_IN_VERSION(6, 3)
32
33
public
:
34
QQuickTreeView(QQuickItem *parent =
nullptr
);
35
~QQuickTreeView() override;
36
37
QModelIndex rootIndex()
const
;
38
void
setRootIndex(
const
QModelIndex &index);
39
void
resetRootIndex();
40
41
Q_INVOKABLE
int
depth(
int
row)
const
;
42
43
Q_INVOKABLE
bool
isExpanded(
int
row)
const
;
44
Q_INVOKABLE
void
expand(
int
row);
45
Q_INVOKABLE
void
collapse(
int
row);
46
Q_INVOKABLE
void
toggleExpanded(
int
row);
47
48
Q_REVISION(6, 4) Q_INVOKABLE
void
expandRecursively(
int
row = -1,
int
depth = -1);
49
Q_REVISION(6, 4) Q_INVOKABLE
void
collapseRecursively(
int
row = -1);
50
Q_REVISION(6, 4) Q_INVOKABLE
void
expandToIndex(
const
QModelIndex &index);
51
52
Q_INVOKABLE QModelIndex modelIndex(
const
QPoint &cell)
const
override;
53
Q_INVOKABLE QPoint cellAtIndex(
const
QModelIndex &index)
const
override;
54
55
#
if
QT_DEPRECATED_SINCE
(
6
,
4
)
56
QT_DEPRECATED_VERSION_X_6_4(
"Use index(row, column) instead"
)
57
Q_REVISION(6, 4) Q_INVOKABLE QModelIndex modelIndex(
int
row,
int
column)
const
override;
58
#
endif
59
60
Q_SIGNALS:
61
void
expanded(
int
row,
int
depth);
62
void
collapsed(
int
row,
bool
recursively);
63
Q_REVISION(6, 6)
void
rootIndexChanged();
64
65
protected
:
66
void
keyPressEvent(QKeyEvent *event) override;
67
68
private
:
69
Q_DISABLE_COPY(QQuickTreeView)
70
Q_DECLARE_PRIVATE(QQuickTreeView)
71
};
72
73
QT_END_NAMESPACE
74
75
#
endif
// QQUICKTREEVIEW_P_H
QQuickTreeView
Definition
qquicktreeview_p.h:27
kTreeColumn
static const int kTreeColumn
\qmlproperty QModelIndex QtQuick::TreeView::rootIndex
Definition
qquicktreeview.cpp:308
qtdeclarative
src
quick
items
qquicktreeview_p.h
Generated on
for Qt by
1.18.0