annotate d2/qt/core/QModelIndex.d @ 414:b2a803c73b89 default tip

Declare tabArray const.
author David Nadlinger <code@klickverbot.at>
date Fri, 06 May 2011 13:39:49 +0200
parents 590dcfc85873
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
1 module qt.core.QModelIndex;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
2
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
3 public import qt.QGlobal;
254
maxter
parents: 252
diff changeset
4 private import qt.core.QObject;
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
5
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
6 // automatic imports-------------
288
f9559a957be9 new signals and slots implementation
eldar
parents: 254
diff changeset
7 //private import qt.core.QVariant;
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
8 private import qt.core.QAbstractItemModel;
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
9 public import qt.core.Qt;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
10
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
11
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
12 public struct QModelIndex
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
13 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
14 public static QModelIndex opCall() {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
15 QModelIndex mi;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
16 mi.r = mi.c = -1;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
17 mi.p = mi.m = null;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
18 return mi;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
19 }
254
maxter
parents: 252
diff changeset
20
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
21 public final QModelIndex child(int row, int column) const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
22 return __qtd_QModelIndex_child_int_int(cast(void*)&this, row, column);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
23 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
24
190
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
25 public final int column() const {
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
26 return __qtd_QModelIndex_column(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
27 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
28
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
29 public final QVariant data(int role = 0) const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
30 void* __qt_return_value = __qtd_QModelIndex_data_int(cast(void*)&this, role);
254
maxter
parents: 252
diff changeset
31 return new QVariant(__qt_return_value);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
32 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
33
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
34 public final int flags() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
35 return __qtd_QModelIndex_flags(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
36 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
37
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
38 public final long internalId() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
39 return __qtd_QModelIndex_internalId(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
40 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
41
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
42 public final const(void*) internalPointer() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
43 return p;
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
44 }
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
45
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
46 public final const(Object) object() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
47 return cast(const(Object)) p;
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
48 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
49
190
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
50 public final bool isValid() const {
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
51 return __qtd_QModelIndex_isValid(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
52 }
389
d37abad3def9 Added missing ?const? to qt.core.QModelIndex.object.
David Nadlinger <code@klickverbot.at>
parents: 344
diff changeset
53
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
54 public final const(QAbstractItemModel) model() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
55 void* __qt_return_value = cast(void*)m;
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
56 if (m is null)
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
57 return null;
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
58 void* d_obj = qtd_get_d_qobject(cast(void*)m);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
59 return cast(QAbstractItemModel) d_obj;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
60 }
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
61
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
62 private final bool operator_less(QModelIndex other) const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
63 return __qtd_QModelIndex_operator_less_QModelIndex(cast(void*)&this, other);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
64 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
65
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
66 private final bool operator_equal(QModelIndex other) const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
67 return __qtd_QModelIndex_operator_equal_QModelIndex(cast(void*)&this, other);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
68 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
69
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
70 public final QModelIndex parent() const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
71 return __qtd_QModelIndex_parent(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
72 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
73
190
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
74 public final int row() const {
a1b48a630f73 D2 support, simple stuff works now
eldar
parents: 188
diff changeset
75 return __qtd_QModelIndex_row(cast(void*)&this);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
76 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
77
397
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
78 public final QModelIndex sibling(int row, int column) const {
590dcfc85873 Quick const-correctness fix for QModelIndex.
David Nadlinger <code@klickverbot.at>
parents: 389
diff changeset
79 return __qtd_QModelIndex_sibling_int_int(cast(void*)&this, row, column);
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
80 }
389
d37abad3def9 Added missing ?const? to qt.core.QModelIndex.object.
David Nadlinger <code@klickverbot.at>
parents: 344
diff changeset
81
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
82 public alias void __isNativeValueType;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
83
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
84 struct QTypeInfo
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
85 {
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
86 enum bool isComplex = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
87 enum bool isStatic = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
88 enum bool isLarge = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
89 enum bool isPointer = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
90 enum bool isDummy = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 288
diff changeset
91 }
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
92
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
93 private:
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
94 int r;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
95 int c;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
96 void *p;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
97 void *m;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
98 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
99
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
100
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
101 alias QModelIndex QModelIndexAccessor;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
102
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
103
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
104 // C wrappers
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
105 private extern(C) void* __qtd_QModelIndex_QModelIndex_QModelIndex(QModelIndex other0);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
106 private extern(C) QModelIndex __qtd_QModelIndex_child_int_int(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
107 int row0,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
108 int column1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
109 private extern(C) int __qtd_QModelIndex_column(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
110 private extern(C) void* __qtd_QModelIndex_data_int(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
111 int role0);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
112 private extern(C) int __qtd_QModelIndex_flags(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
113 private extern(C) long __qtd_QModelIndex_internalId(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
114 private extern(C) void* __qtd_QModelIndex_internalPointer(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
115 private extern(C) bool __qtd_QModelIndex_isValid(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
116 private extern(C) void* __qtd_QModelIndex_model(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
117 private extern(C) bool __qtd_QModelIndex_operator_less_QModelIndex(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
118 QModelIndex other0);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
119 private extern(C) bool __qtd_QModelIndex_operator_equal_QModelIndex(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
120 QModelIndex other0);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
121 private extern(C) QModelIndex __qtd_QModelIndex_parent(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
122 private extern(C) int __qtd_QModelIndex_row(void* __this_nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
123 private extern(C) QModelIndex __qtd_QModelIndex_sibling_int_int(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
124 int row0,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
125 int column1);