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

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