Mercurial > projects > qtd
annotate qt/core/QVariant.d @ 140:6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
D: implement QVariant.canConvert!(Type).
author | SokoL_SD |
---|---|
date | Sun, 07 Jun 2009 18:30:09 +0000 |
parents | cbdfc92eac7f |
children | 7ae51fb20f61 |
rev | line source |
---|---|
1 | 1 module qt.core.QVariant; |
2 | |
3 public import qt.QGlobal; | |
4 private import qt.QtDObject; | |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
5 private import qt.core.QMetaType; |
1 | 6 |
7 // automatic imports------------- | |
8 private import qt.core.QSizeF; | |
9 private import qt.core.QPoint; | |
10 private import qt.core.QRectF; | |
11 public import qt.core.Qt; | |
12 private import qt.core.QDateTime; | |
13 private import qt.core.QDataStream; | |
14 private import qt.core.QTime; | |
15 private import qt.core.QUrl; | |
16 private import qt.core.QRegExp; | |
17 private import qt.core.QBitArray; | |
18 private import qt.core.QLine; | |
19 private import qt.core.QByteArray; | |
20 private import qt.core.QSize; | |
21 private import qt.core.QDate; | |
22 private import qt.core.QPointF; | |
23 private import qt.core.QLineF; | |
24 private import qt.core.QRect; | |
25 private import qt.core.QLocale; | |
26 | |
27 version (Tango) | |
28 { | |
29 import tango.core.Array; | |
30 import tango.stdc.stringz; | |
31 import tango.text.convert.Utf; | |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
32 import tango.core.Traits; |
1 | 33 } |
34 | |
35 | |
36 public class QVariant : QtDObject | |
37 { | |
38 enum Type { | |
39 Invalid = 0, | |
40 | |
41 Bool = 1, | |
42 Int = 2, | |
43 UInt = 3, | |
44 LongLong = 4, | |
45 ULongLong = 5, | |
46 Double = 6, | |
47 Char = 7, | |
48 Map = 8, | |
49 List = 9, | |
50 String = 10, | |
51 StringList = 11, | |
52 ByteArray = 12, | |
53 BitArray = 13, | |
54 Date = 14, | |
55 Time = 15, | |
56 DateTime = 16, | |
57 Url = 17, | |
58 Locale = 18, | |
59 Rect = 19, | |
60 RectF = 20, | |
61 Size = 21, | |
62 SizeF = 22, | |
63 Line = 23, | |
64 LineF = 24, | |
65 Point = 25, | |
66 PointF = 26, | |
67 RegExp = 27, | |
68 LastCoreType = RegExp, | |
69 | |
70 // value 62 is internally reserved | |
71 | |
72 Font = 64, | |
73 Pixmap = 65, | |
74 Brush = 66, | |
75 Color = 67, | |
76 Palette = 68, | |
77 Icon = 69, | |
78 Image = 70, | |
79 Polygon = 71, | |
80 Region = 72, | |
81 Bitmap = 73, | |
82 Cursor = 74, | |
83 SizePolicy = 75, | |
84 KeySequence = 76, | |
85 Pen = 77, | |
86 TextLength = 78, | |
87 TextFormat = 79, | |
88 Matrix = 80, | |
89 Transform = 81, | |
90 LastGuiType = Transform, | |
91 | |
92 UserType = 127, | |
93 | |
94 LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type | |
95 } | |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
96 |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
97 // Functions |
1 | 98 |
140
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
99 private template getMetaId() |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
100 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
101 const char[] getMetaId = " |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
102 int i = qtd_MetatypeId(toStringz(name)); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
103 if(i <= 0) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
104 i = qRegisterMetaType!(T)(name);"; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
105 } |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
106 |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
107 static public QVariant fromValue(T)(T obj) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
108 { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
109 QVariant var; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
110 static if (is(T == class) || is(T == interface)) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
111 { |
140
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
112 string name = obj.classinfo.name; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
113 mixin(getMetaId!()); |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
114 var = new QVariant(i, cast(void*)(obj)); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
115 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
116 else static if (isDynamicArrayType!(T) || isStaticArrayType!(T) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
117 { |
140
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
118 string name = typeid(ElementTypeOfArray!(T)).toString ~ "[]"; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
119 mixin(getMetaId!()); |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
120 auto darray = new DArrayToC; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
121 darray.array = obj.dup; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
122 var = new QVariant(i, cast(void*)(darray)); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
123 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
124 else |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
125 { |
140
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
126 string name = typeid(T).toString; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
127 mixin(getMetaId!()); |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
128 auto data = new T; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
129 *data = obj; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
130 var = new QVariant(i, cast(void*)(data)); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
131 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
132 return var; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
133 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
134 |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
135 static public QVariant opCall(T)(T obj) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
136 { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
137 return fromValue(obj); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
138 } |
1 | 139 |
140 public this() { | |
141 void* __qt_return_value = qtd_QVariant_QVariant(); | |
142 super(__qt_return_value); | |
143 } | |
144 | |
145 | |
146 public this(QDataStream s) { | |
147 void* __qt_return_value = qtd_QVariant_QVariant_QDataStream(s is null ? null : s.nativeId); | |
148 super(__qt_return_value); | |
149 } | |
150 | |
151 | |
152 public this(Qt.GlobalColor color) { | |
153 void* __qt_return_value = qtd_QVariant_QVariant_GlobalColor(color); | |
154 super(__qt_return_value); | |
155 } | |
156 | |
157 | |
158 public this(bool b) { | |
159 void* __qt_return_value = qtd_QVariant_QVariant_bool(b); | |
160 super(__qt_return_value); | |
161 } | |
162 | |
163 | |
164 public this(QBitArray bitarray) { | |
165 void* __qt_return_value = qtd_QVariant_QVariant_QBitArray(bitarray is null ? null : bitarray.nativeId); | |
166 super(__qt_return_value); | |
167 } | |
168 | |
169 | |
170 public this(QByteArray bytearray) { | |
171 void* __qt_return_value = qtd_QVariant_QVariant_QByteArray(bytearray is null ? null : bytearray.nativeId); | |
172 super(__qt_return_value); | |
173 } | |
174 | |
175 | |
176 public this(QDate date) { | |
177 void* __qt_return_value = qtd_QVariant_QVariant_QDate(date is null ? null : date.nativeId); | |
178 super(__qt_return_value); | |
179 } | |
180 | |
181 | |
182 public this(QDateTime datetime) { | |
183 void* __qt_return_value = qtd_QVariant_QVariant_QDateTime(datetime is null ? null : datetime.nativeId); | |
184 super(__qt_return_value); | |
185 } | |
186 | |
187 | |
46 | 188 public this(string str) { |
1 | 189 void* __qt_return_value = qtd_QVariant_QVariant_String(str.ptr, str.length); |
190 super(__qt_return_value); | |
191 } | |
192 | |
193 | |
194 public this(QLine line) { | |
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
195 void* __qt_return_value = qtd_QVariant_QVariant_QLine(&line); |
1 | 196 super(__qt_return_value); |
197 } | |
198 | |
199 | |
200 public this(QLineF line) { | |
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
201 void* __qt_return_value = qtd_QVariant_QVariant_QLineF(&line); |
1 | 202 super(__qt_return_value); |
203 } | |
204 | |
205 | |
206 public this(QLocale locale) { | |
207 void* __qt_return_value = qtd_QVariant_QVariant_QLocale(locale is null ? null : locale.nativeId); | |
208 super(__qt_return_value); | |
209 } | |
210 | |
211 | |
212 public this(QPoint pt) { | |
213 void* __qt_return_value = qtd_QVariant_QVariant_QPoint(&pt); | |
214 super(__qt_return_value); | |
215 } | |
216 | |
217 | |
218 public this(QPointF pt) { | |
219 void* __qt_return_value = qtd_QVariant_QVariant_QPointF(&pt); | |
220 super(__qt_return_value); | |
221 } | |
222 | |
223 | |
224 public this(QRect rect) { | |
6 | 225 void* __qt_return_value = qtd_QVariant_QVariant_QRect(&rect); |
1 | 226 super(__qt_return_value); |
227 } | |
228 | |
229 | |
230 public this(QRectF rect) { | |
6 | 231 void* __qt_return_value = qtd_QVariant_QVariant_QRectF(&rect); |
1 | 232 super(__qt_return_value); |
233 } | |
234 | |
235 | |
236 public this(QRegExp regExp) { | |
237 void* __qt_return_value = qtd_QVariant_QVariant_QRegExp(regExp is null ? null : regExp.nativeId); | |
238 super(__qt_return_value); | |
239 } | |
240 | |
241 | |
242 public this(QSize size) { | |
243 void* __qt_return_value = qtd_QVariant_QVariant_QSize(&size); | |
244 super(__qt_return_value); | |
245 } | |
246 | |
247 | |
248 public this(QSizeF size) { | |
249 void* __qt_return_value = qtd_QVariant_QVariant_QSizeF(&size); | |
250 super(__qt_return_value); | |
251 } | |
252 | |
253 | |
254 public this(QTime time) { | |
255 void* __qt_return_value = qtd_QVariant_QVariant_QTime(time is null ? null : time.nativeId); | |
256 super(__qt_return_value); | |
257 } | |
258 | |
259 | |
260 public this(QUrl url) { | |
261 void* __qt_return_value = qtd_QVariant_QVariant_QUrl(url is null ? null : url.nativeId); | |
262 super(__qt_return_value); | |
263 } | |
264 | |
265 | |
266 public this(QVariant other) { | |
267 void* __qt_return_value = qtd_QVariant_QVariant_QVariant(other is null ? null : other.nativeId); | |
268 super(__qt_return_value); | |
269 } | |
270 | |
138 | 271 /* |
1 | 272 public this(char* str) { |
273 void* __qt_return_value = qtd_QVariant_QVariant_nativepointerchar(str); | |
274 super(__qt_return_value); | |
275 } | |
138 | 276 */ |
1 | 277 |
278 public this(double d) { | |
279 void* __qt_return_value = qtd_QVariant_QVariant_double(d); | |
280 super(__qt_return_value); | |
281 } | |
282 | |
283 | |
284 public this(int i) { | |
285 void* __qt_return_value = qtd_QVariant_QVariant_int(i); | |
286 super(__qt_return_value); | |
287 } | |
288 | |
289 | |
290 public this(int typeOrUserType, void* copy) { | |
291 void* __qt_return_value = qtd_QVariant_QVariant_int_nativepointervoid(typeOrUserType, copy); | |
292 super(__qt_return_value); | |
293 } | |
294 | |
295 | |
296 public this(long ll) { | |
297 void* __qt_return_value = qtd_QVariant_QVariant_long(ll); | |
298 super(__qt_return_value); | |
299 } | |
300 | |
301 | |
302 public this(uint ui) { | |
303 void* __qt_return_value = qtd_QVariant_QVariant_uint(ui); | |
304 super(__qt_return_value); | |
305 } | |
306 | |
307 | |
308 public this(ulong ull) { | |
309 void* __qt_return_value = qtd_QVariant_QVariant_ulong(ull); | |
310 super(__qt_return_value); | |
311 } | |
312 | |
140
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
313 private final bool canConvertImpl(char[] name) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
314 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
315 int i = qtd_MetatypeId(toStringz(name)); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
316 assert(i > 0); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
317 return qtd_QVariant_canConvert(nativeId, i); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
318 } |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
319 |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
320 public final bool canConvert(Type)() { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
321 static if ( is(Type == QBitArray) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
322 return canConvertImpl("QBitArray"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
323 else static if ( is(Type == bool) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
324 return canConvertImpl("bool"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
325 else static if ( is(Type == QByteArray) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
326 return canConvertImpl("QByteArray"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
327 else static if ( is(Type == QDate) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
328 return canConvertImpl("QDate"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
329 else static if ( is(Type == QDateTime) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
330 return canConvertImpl("QDateTime"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
331 else static if ( is(Type == double) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
332 return canConvertImpl("double"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
333 else static if ( is(Type == int) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
334 return canConvertImpl("int"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
335 else static if ( is(Type == QLine) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
336 return canConvertImpl("QLine"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
337 else static if ( is(Type == QLineF) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
338 return canConvertImpl("QLineF"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
339 else static if ( is(Type == QLocale) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
340 return canConvertImpl("QLocale"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
341 else static if ( is(Type == long) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
342 return canConvertImpl("long"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
343 else static if ( is(Type == QPoint) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
344 return canConvertImpl("QPoint"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
345 else static if ( is(Type == QPointF) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
346 return canConvertImpl("QPointF"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
347 else static if ( is(Type == QRect) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
348 return canConvertImpl("QRect"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
349 else static if ( is(Type == QRectF) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
350 return canConvertImpl("QRectF"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
351 else static if ( is(Type == QRegExp) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
352 return canConvertImpl("QRegExp"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
353 else static if ( is(Type == QSize) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
354 return canConvertImpl("QSize"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
355 else static if ( is(Type == QSizeF) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
356 return canConvertImpl("QSizeF"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
357 else static if ( is(Type == string) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
358 return canConvertImpl("QString"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
359 else static if ( is(Type == QTime) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
360 return canConvertImpl("QTime"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
361 else static if ( is(Type == uint) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
362 return canConvertImpl("unsigned int"); // TODO: |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
363 else static if ( is(Type == ulong) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
364 return canConvertImpl("unsigned long long"); // TODO: |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
365 else static if ( is(Type == QUrl) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
366 return canConvertImpl("QUrl"); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
367 else |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
368 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
369 static if( is( Type == class ) || is( Type == interface ) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
370 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
371 Object object = cast(Object)qtd_QVariant_data(nativeId); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
372 if(object) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
373 return cast(Type)(object) !is null; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
374 return false; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
375 } |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
376 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) ) |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
377 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
378 auto array = cast(DArrayToC*)qtd_QVariant_data(nativeId); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
379 return cast(Type)(array.array) !is null; |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
380 } |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
381 else |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
382 { |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
383 int i = qtd_MetatypeId(toStringz(typeid(Type).toString)); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
384 return qtd_QVariant_canConvert(nativeId, i); |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
385 } |
6cbe4f5f8fb7
D: autoregistration of new types in metasystem for QVariant.
SokoL_SD
parents:
138
diff
changeset
|
386 } |
1 | 387 } |
388 | |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
389 public final Type value(Type)() { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
390 static if ( is(Type == QBitArray) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
391 return toBitArra; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
392 else static if ( is(Type == bool) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
393 return toBool; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
394 else static if ( is(Type == QByteArray) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
395 return toByteArray; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
396 else static if ( is(Type == QDate) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
397 return toDate; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
398 else static if ( is(Type == QDateTime) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
399 return toDateTime; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
400 else static if ( is(Type == double) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
401 return toDouble; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
402 else static if ( is(Type == int) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
403 return toInt; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
404 else static if ( is(Type == QLine) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
405 return toLine; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
406 else static if ( is(Type == QLineF) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
407 return toLineF; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
408 else static if ( is(Type == QLocale) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
409 return toLocale; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
410 else static if ( is(Type == long) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
411 return toLongLong; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
412 else static if ( is(Type == QPoint) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
413 return toPoint; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
414 else static if ( is(Type == QPointF) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
415 return toPointF; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
416 else static if ( is(Type == QRect) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
417 return toRect; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
418 else static if ( is(Type == QRectF) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
419 return toRectF; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
420 else static if ( is(Type == QRegExp) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
421 return toRegExp; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
422 else static if ( is(Type == QSize) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
423 return toSize; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
424 else static if ( is(Type == QSizeF) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
425 return toSizeF; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
426 else static if ( is(Type == string) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
427 return toString; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
428 else static if ( is(Type == QTime) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
429 return toTime; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
430 else static if ( is(Type == uint) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
431 return toUInt; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
432 else static if ( is(Type == ulong) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
433 return toULongLong; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
434 else static if ( is(Type == QUrl) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
435 return toUrl; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
436 else static if( is( Type == class ) || is( Type == interface ) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
437 { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
438 Object object = cast(Object)qtd_QVariant_data(nativeId); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
439 if(object) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
440 return cast(Type)(object); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
441 return null; |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
442 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
443 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) ) |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
444 { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
445 auto array = cast(DArrayToC*)qtd_QVariant_data(nativeId); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
446 return cast(Type)(array.array); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
447 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
448 else |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
449 { |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
450 return *cast(Type*)qtd_QVariant_data(nativeId); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
451 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
452 } |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
453 |
1 | 454 public final void clear() { |
455 qtd_QVariant_clear(nativeId); | |
456 } | |
457 | |
458 protected final bool cmp(QVariant other) { | |
459 return qtd_QVariant_cmp_QVariant(nativeId, other is null ? null : other.nativeId); | |
460 } | |
461 | |
462 protected final void create(int type, void* copy) { | |
463 qtd_QVariant_create_int_nativepointervoid(nativeId, type, copy); | |
464 } | |
465 | |
466 public final bool isNull() { | |
467 return qtd_QVariant_isNull(nativeId); | |
468 } | |
469 | |
470 public final bool isValid() { | |
471 return qtd_QVariant_isValid(nativeId); | |
472 } | |
473 | |
474 public final void load(QDataStream ds) { | |
475 qtd_QVariant_load_QDataStream(nativeId, ds is null ? null : ds.nativeId); | |
476 } | |
477 | |
478 public final void writeTo(QDataStream s) { | |
479 qtd_QVariant_writeTo_QDataStream(nativeId, s is null ? null : s.nativeId); | |
480 } | |
481 | |
482 public final QVariant operator_assign(QVariant other) { | |
483 void* __qt_return_value = qtd_QVariant_operator_assign_QVariant(nativeId, other is null ? null : other.nativeId); | |
484 return new QVariant(__qt_return_value, true); | |
485 } | |
486 | |
487 private final bool operator_equal(QVariant v) { | |
488 return qtd_QVariant_operator_equal_QVariant(nativeId, v is null ? null : v.nativeId); | |
489 } | |
490 | |
491 public final void readFrom(QDataStream s) { | |
492 qtd_QVariant_readFrom_QDataStream(nativeId, s is null ? null : s.nativeId); | |
493 } | |
494 | |
495 public final void save(QDataStream ds) { | |
496 qtd_QVariant_save_QDataStream(nativeId, ds is null ? null : ds.nativeId); | |
497 } | |
498 | |
499 public final QBitArray toBitArray() { | |
500 void* __qt_return_value = qtd_QVariant_toBitArray(nativeId); | |
501 return new QBitArray(__qt_return_value, false); | |
502 } | |
503 | |
504 public final bool toBool() { | |
505 return qtd_QVariant_toBool(nativeId); | |
506 } | |
507 | |
508 public final QByteArray toByteArray() { | |
509 void* __qt_return_value = qtd_QVariant_toByteArray(nativeId); | |
510 return new QByteArray(__qt_return_value, false); | |
511 } | |
512 | |
513 public final QDate toDate() { | |
514 void* __qt_return_value = qtd_QVariant_toDate(nativeId); | |
515 return new QDate(__qt_return_value, false); | |
516 } | |
517 | |
518 public final QDateTime toDateTime() { | |
519 void* __qt_return_value = qtd_QVariant_toDateTime(nativeId); | |
520 return new QDateTime(__qt_return_value, false); | |
521 } | |
522 | |
523 public final double toDouble(bool* ok = null) { | |
524 return qtd_QVariant_toDouble_nativepointerbool(nativeId, ok); | |
525 } | |
526 | |
527 public final int toInt(bool* ok = null) { | |
528 return qtd_QVariant_toInt_nativepointerbool(nativeId, ok); | |
529 } | |
530 | |
531 public final QLine toLine() { | |
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
532 return qtd_QVariant_toLine(nativeId); |
1 | 533 } |
534 | |
535 public final QLineF toLineF() { | |
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
536 return qtd_QVariant_toLineF(nativeId); |
1 | 537 } |
538 | |
539 public final QLocale toLocale() { | |
540 void* __qt_return_value = qtd_QVariant_toLocale(nativeId); | |
541 return new QLocale(__qt_return_value, false); | |
542 } | |
543 | |
544 public final long toLongLong(bool* ok = null) { | |
545 return qtd_QVariant_toLongLong_nativepointerbool(nativeId, ok); | |
546 } | |
547 | |
548 public final QPoint toPoint() { | |
549 return qtd_QVariant_toPoint(nativeId); | |
550 } | |
551 | |
552 public final QPointF toPointF() { | |
553 return qtd_QVariant_toPointF(nativeId); | |
554 } | |
555 | |
556 public final QRect toRect() { | |
6 | 557 return qtd_QVariant_toRect(nativeId); |
1 | 558 } |
559 | |
560 public final QRectF toRectF() { | |
6 | 561 return qtd_QVariant_toRectF(nativeId); |
1 | 562 } |
563 | |
564 public final QRegExp toRegExp() { | |
565 void* __qt_return_value = qtd_QVariant_toRegExp(nativeId); | |
566 return new QRegExp(__qt_return_value, false); | |
567 } | |
568 | |
569 public final QSize toSize() { | |
570 return qtd_QVariant_toSize(nativeId); | |
571 } | |
572 | |
573 public final QSizeF toSizeF() { | |
574 return qtd_QVariant_toSizeF(nativeId); | |
575 } | |
576 | |
577 public final string toString() { | |
46 | 578 string res; |
1 | 579 qtd_QVariant_toString(nativeId, &res); |
46 | 580 return res; |
1 | 581 } |
582 | |
583 public final QTime toTime() { | |
584 void* __qt_return_value = qtd_QVariant_toTime(nativeId); | |
585 return new QTime(__qt_return_value, false); | |
586 } | |
587 | |
588 public final uint toUInt(bool* ok = null) { | |
589 return qtd_QVariant_toUInt_nativepointerbool(nativeId, ok); | |
590 } | |
591 | |
592 public final ulong toULongLong(bool* ok = null) { | |
593 return qtd_QVariant_toULongLong_nativepointerbool(nativeId, ok); | |
594 } | |
595 | |
596 public final QUrl toUrl() { | |
597 void* __qt_return_value = qtd_QVariant_toUrl(nativeId); | |
598 return new QUrl(__qt_return_value, false); | |
599 } | |
600 | |
601 public final char* typeName() { | |
602 return qtd_QVariant_typeName(nativeId); | |
603 } | |
604 | |
605 public final int userType() { | |
606 return qtd_QVariant_userType(nativeId); | |
607 } | |
608 // Field accessors | |
609 | |
610 public this(void* native_id, bool no_real_delete = false) { | |
611 super(native_id, no_real_delete); | |
612 } | |
613 | |
614 | |
615 ~this() { | |
616 if(!__no_real_delete) | |
617 __free_native_resources(); | |
618 } | |
619 | |
620 protected void __free_native_resources() { | |
621 qtd_QVariant_destructor(nativeId()); | |
622 } | |
623 | |
624 // Injected code in class | |
625 } | |
626 extern (C) void qtd_QVariant_destructor(void *ptr); | |
627 | |
628 | |
629 // C wrappers | |
630 private extern(C) void* qtd_QVariant_QVariant(); | |
631 private extern(C) void* qtd_QVariant_QVariant_QDataStream(void* s0); | |
632 private extern(C) void* qtd_QVariant_QVariant_GlobalColor(int color0); | |
633 private extern(C) void* qtd_QVariant_QVariant_bool(bool b0); | |
634 private extern(C) void* qtd_QVariant_QVariant_QBitArray(void* bitarray0); | |
635 private extern(C) void* qtd_QVariant_QVariant_QByteArray(void* bytearray0); | |
636 private extern(C) void* qtd_QVariant_QVariant_QDate(void* date0); | |
637 private extern(C) void* qtd_QVariant_QVariant_QDateTime(void* datetime0); | |
638 private extern(C) void* qtd_QVariant_QVariant_String(char* string0, uint string0_size); | |
639 private extern(C) void* qtd_QVariant_QVariant_QLine(void* line0); | |
640 private extern(C) void* qtd_QVariant_QVariant_QLineF(void* line0); | |
641 private extern(C) void* qtd_QVariant_QVariant_QLocale(void* locale0); | |
642 private extern(C) void* qtd_QVariant_QVariant_QPoint(void* pt0); | |
643 private extern(C) void* qtd_QVariant_QVariant_QPointF(void* pt0); | |
644 private extern(C) void* qtd_QVariant_QVariant_QRect(void* rect0); | |
645 private extern(C) void* qtd_QVariant_QVariant_QRectF(void* rect0); | |
646 private extern(C) void* qtd_QVariant_QVariant_QRegExp(void* regExp0); | |
647 private extern(C) void* qtd_QVariant_QVariant_QSize(void* size0); | |
648 private extern(C) void* qtd_QVariant_QVariant_QSizeF(void* size0); | |
649 private extern(C) void* qtd_QVariant_QVariant_QTime(void* time0); | |
650 private extern(C) void* qtd_QVariant_QVariant_QUrl(void* url0); | |
651 private extern(C) void* qtd_QVariant_QVariant_QVariant(void* other0); | |
652 private extern(C) void* qtd_QVariant_QVariant_nativepointerchar(char* str0); | |
653 private extern(C) void* qtd_QVariant_QVariant_double(double d0); | |
654 private extern(C) void* qtd_QVariant_QVariant_int(int i0); | |
655 private extern(C) void* qtd_QVariant_QVariant_int_nativepointervoid(int typeOrUserType0, | |
656 void* copy1); | |
657 private extern(C) void* qtd_QVariant_QVariant_long(long ll0); | |
658 private extern(C) void* qtd_QVariant_QVariant_uint(uint ui0); | |
659 private extern(C) void* qtd_QVariant_QVariant_ulong(ulong ull0); | |
660 private extern(C) bool qtd_QVariant_canConvert(void* __this_nativeId, int); | |
661 private extern(C) void qtd_QVariant_clear(void* __this_nativeId); | |
662 private extern(C) bool qtd_QVariant_cmp_QVariant(void* __this_nativeId, | |
663 void* other0); | |
664 private extern(C) void qtd_QVariant_create_int_nativepointervoid(void* __this_nativeId, | |
665 int type0, | |
666 void* copy1); | |
667 private extern(C) bool qtd_QVariant_isNull(void* __this_nativeId); | |
668 private extern(C) bool qtd_QVariant_isValid(void* __this_nativeId); | |
669 private extern(C) void qtd_QVariant_load_QDataStream(void* __this_nativeId, | |
670 void* ds0); | |
671 private extern(C) void qtd_QVariant_writeTo_QDataStream(void* __this_nativeId, | |
672 void* s0); | |
673 private extern(C) void* qtd_QVariant_operator_assign_QVariant(void* __this_nativeId, | |
674 void* other0); | |
675 private extern(C) bool qtd_QVariant_operator_equal_QVariant(void* __this_nativeId, | |
676 void* v0); | |
677 private extern(C) void qtd_QVariant_readFrom_QDataStream(void* __this_nativeId, | |
678 void* s0); | |
679 private extern(C) void qtd_QVariant_save_QDataStream(void* __this_nativeId, | |
680 void* ds0); | |
681 private extern(C) void* qtd_QVariant_toBitArray(void* __this_nativeId); | |
682 private extern(C) bool qtd_QVariant_toBool(void* __this_nativeId); | |
683 private extern(C) void* qtd_QVariant_toByteArray(void* __this_nativeId); | |
684 private extern(C) void* qtd_QVariant_toDate(void* __this_nativeId); | |
685 private extern(C) void* qtd_QVariant_toDateTime(void* __this_nativeId); | |
686 private extern(C) double qtd_QVariant_toDouble_nativepointerbool(void* __this_nativeId, | |
687 bool* ok0); | |
688 private extern(C) int qtd_QVariant_toInt_nativepointerbool(void* __this_nativeId, | |
689 bool* ok0); | |
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
690 private extern(C) QLine qtd_QVariant_toLine(void* __this_nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
1
diff
changeset
|
691 private extern(C) QLineF qtd_QVariant_toLineF(void* __this_nativeId); |
1 | 692 private extern(C) void* qtd_QVariant_toLocale(void* __this_nativeId); |
693 private extern(C) long qtd_QVariant_toLongLong_nativepointerbool(void* __this_nativeId, | |
694 bool* ok0); | |
695 private extern(C) QPoint qtd_QVariant_toPoint(void* __this_nativeId); | |
696 private extern(C) QPointF qtd_QVariant_toPointF(void* __this_nativeId); | |
6 | 697 private extern(C) QRect qtd_QVariant_toRect(void* __this_nativeId); |
698 private extern(C) QRectF qtd_QVariant_toRectF(void* __this_nativeId); | |
1 | 699 private extern(C) void* qtd_QVariant_toRegExp(void* __this_nativeId); |
700 private extern(C) QSize qtd_QVariant_toSize(void* __this_nativeId); | |
701 private extern(C) QSizeF qtd_QVariant_toSizeF(void* __this_nativeId); | |
702 private extern(C) void qtd_QVariant_toString(void* __this_nativeId, | |
703 void* __java_return_value); | |
704 private extern(C) void* qtd_QVariant_toTime(void* __this_nativeId); | |
705 private extern(C) uint qtd_QVariant_toUInt_nativepointerbool(void* __this_nativeId, | |
706 bool* ok0); | |
707 private extern(C) ulong qtd_QVariant_toULongLong_nativepointerbool(void* __this_nativeId, | |
708 bool* ok0); | |
709 private extern(C) void* qtd_QVariant_toUrl(void* __this_nativeId); | |
710 private extern(C) char* qtd_QVariant_typeName(void* __this_nativeId); | |
711 private extern(C) int qtd_QVariant_userType(void* __this_nativeId); | |
87
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
712 private extern(C) void *qtd_QVariant_data(void* __this_nativeId); |
f46133029d8b
qtd: Implement QMetaType. QVariant may save D types now.
SokoL_SD
parents:
46
diff
changeset
|
713 |
1 | 714 // Just the private functions for abstract functions implemeneted in superclasses |
715 | |
716 // Virtual Dispatch functions |