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
qandroidmodelindexproxy_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
4#ifndef QANDROIDMODELINDEXPROXY_P_H
5#define QANDROIDMODELINDEXPROXY_P_H
6
7#include <QtCore/private/qandroidtypes_p.h>
8
9#include <QtCore/qabstractitemmodel.h>
10#include <QtCore/qjniobject.h>
11#include <QtCore/qjnienvironment.h>
12#include <QtCore/qjnitypes.h>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
25QT_BEGIN_NAMESPACE
26
27using namespace QtJniTypes;
28
29class QAndroidItemModelProxy;
30
31class Q_CORE_EXPORT QAndroidModelIndexProxy
32{
33public:
34 static JQtModelIndex jInstance(QModelIndex modelIndex);
35 static QModelIndex qInstance(JQtModelIndex jModelIndex);
36
37 static jobject data(JNIEnv *env, jobject object, int role);
38 Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(data)
39
40 static jlong internalId(JNIEnv *env, jobject object);
41 Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(internalId)
42
43 static jboolean isValid(JNIEnv *env, jobject object);
44 Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(isValid)
45
46 static JQtModelIndex parent(JNIEnv *env, jobject object);
47 Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(parent)
48
49 static bool registerNatives(QJniEnvironment &env);
50};
51
52QT_END_NAMESPACE
53
54#endif // QANDROIDMODELINDEXPROXY_P_H