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
QtAbstractListModel.java
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
4package org.qtproject.qt.android;
5
6import java.util.HashMap;
7
8public abstract class QtAbstractListModel extends QtAbstractItemModel
9{
11
12 @Override public final int columnCount(QtModelIndex parent) { return parent.isValid() ? 0 : 1; }
13
14 @Override public QtModelIndex index(int row, int column, QtModelIndex parent)
15 {
16 return hasIndex(row, column, parent) ? createIndex(row, column, 0) : new QtModelIndex();
17 }
18
19 @Override public final QtModelIndex parent(QtModelIndex index) { return new QtModelIndex(); }
20
21 @Override public final boolean hasChildren(QtModelIndex parent)
22 {
23 return parent.isValid() ? false : (rowCount(new QtModelIndex()) > 0);
24 }
25
26 @Override public QtModelIndex sibling(int row, int column, QtModelIndex parent)
27 {
28 return index(row, column, new QtModelIndex());
29 }
30}
abstract int rowCount(QtModelIndex parent)
native boolean hasIndex(int row, int column, QtModelIndex parent)
final QtModelIndex createIndex(int row, int column, long id)
final QtModelIndex parent(QtModelIndex index)
QtModelIndex index(int row, int column, QtModelIndex parent)
QtModelIndex sibling(int row, int column, QtModelIndex parent)
final boolean hasChildren(QtModelIndex parent)
GLuint index
[2]
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row