Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QQUICKTREEVIEW_P_H
5#define QQUICKTREEVIEW_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qabstractitemmodel.h>
19#include "qquicktableview_p.h"
20
22
24
25class Q_QUICK_EXPORT QQuickTreeView : public QQuickTableView
26{
28 Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex RESET resetRootIndex NOTIFY rootIndexChanged REVISION(6, 6) FINAL)
29 QML_NAMED_ELEMENT(TreeView)
31
32public:
33 QQuickTreeView(QQuickItem *parent = nullptr);
34 ~QQuickTreeView() override;
35
36 QModelIndex rootIndex() const;
37 void setRootIndex(const QModelIndex &index);
38 void resetRootIndex();
39
40 Q_INVOKABLE int depth(int row) const;
41
42 Q_INVOKABLE bool isExpanded(int row) const;
43 Q_INVOKABLE void expand(int row);
44 Q_INVOKABLE void collapse(int row);
45 Q_INVOKABLE void toggleExpanded(int row);
46
47 Q_REVISION(6, 4) Q_INVOKABLE void expandRecursively(int row = -1, int depth = -1);
48 Q_REVISION(6, 4) Q_INVOKABLE void collapseRecursively(int row = -1);
49 Q_REVISION(6, 4) Q_INVOKABLE void expandToIndex(const QModelIndex &index);
50
51 Q_INVOKABLE QModelIndex modelIndex(const QPoint &cell) const override;
52 Q_INVOKABLE QPoint cellAtIndex(const QModelIndex &index) const override;
53
54#if QT_DEPRECATED_SINCE(6, 4)
55 QT_DEPRECATED_VERSION_X_6_4("Use index(row, column) instead")
56 Q_REVISION(6, 4) Q_INVOKABLE QModelIndex modelIndex(int row, int column) const override;
57#endif
58
60 void expanded(int row, int depth);
61 void collapsed(int row, bool recursively);
62 Q_REVISION(6, 6) void rootIndexChanged();
63
64protected:
65 void keyPressEvent(QKeyEvent *event) override;
66
68 Q_DISABLE_COPY(QQuickTreeView)
69 Q_DECLARE_PRIVATE(QQuickTreeView)
70};
71
73
74#endif // QQUICKTREEVIEW_P_H
The QKeyEvent class describes a key event.
Definition qevent.h:424
\inmodule QtCore
\inmodule QtCore\reentrant
Definition qpoint.h:25
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
void expanded(int row, int depth)
Q_REVISION(6, 6) void rootIndexChanged()
void collapsed(int row, bool recursively)
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLint GLenum GLsizei GLsizei GLsizei depth
GLuint index
[2]
GLenum GLenum GLsizei void GLsizei void * column
struct _cl_event * event
GLenum GLenum GLsizei void * row
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_DEPRECATED_VERSION_X_6_4(text)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_INVOKABLE
#define Q_SIGNALS