4 public static class ItemIndex{
5 int _row = -1, _column = -1;
12 _row = (
id >> 32) & 0xffffffff;
13 _column =
id & 0xffffffff;
23 return _id << 32 | _column;
30 @SuppressWarnings
public class QStandardModel{
31 private long _index(
int row,
int col,
long parent){
32 return index(row, col,
new ItemIndex(parent)).id();
35 return parent(
new ItemIndex(child)).id();
38 return rowCount(
new ItemIndex(parent));
41 return columnCount(
new ItemIndex(parent));
44 return data(
new ItemIndex(index), (ItemDataRole)role);
47 return flags(
new ItemIndex(index));
50 return headerdata(section, (Orientation)orientation, (ItemDataRole)role);
52 public ItemIndex
index(
int row,
int col, ItemIndex parent);
53 public ItemIndex
parent(ItemIndex child);
58 public ItemFlag
flags(ItemIndex index);
ItemIndex(int row, int col)
long _index(int row, int col, long parent)
Object _data(long index, int role)
int rowCount(ItemIndex parent)
int _rowCount(long parent)
ItemIndex index(int row, int col, ItemIndex parent)
ItemIndex parent(ItemIndex child)
int columnCount(ItemIndex parent)
Object data(ItemIndex index, ItemDataRole role)
int _columnCount(long parent)
Object _headerdata(int section, int orientation, int role)
Object headerdata(int section, Orientation orientation, int role)
ItemFlag flags(ItemIndex index)