added "install" instruction
[Leditor.git] / src / lqt_bind_QObject.cpp
blob168c5cef02373a5847519f2ee16715fc1ef4feae
1 #include "lqt_bind_QObject.hpp"
3 int LuaBinder< QObject >::__LuaWrapCall__parent (lua_State *L) {
4 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
5 if (__lua__obj==0) {
6 lua_pushstring(L, "trying to reference deleted pointer");
7 lua_error(L);
8 return 0;
10 QObject * ret = __lua__obj->QObject::parent();
11 lqtL_pushudata(L, ret, "QObject*");
12 return 1;
14 int LuaBinder< QObject >::__LuaWrapCall__signalsBlocked (lua_State *L) {
15 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
16 if (__lua__obj==0) {
17 lua_pushstring(L, "trying to reference deleted pointer");
18 lua_error(L);
19 return 0;
21 bool ret = __lua__obj->QObject::signalsBlocked();
22 lua_pushboolean(L, ret);
23 return 1;
25 int LuaBinder< QObject >::__LuaWrapCall__trUtf8__OverloadedVersion__1 (lua_State *L) {
26 const char * arg1 = lua_tostring(L, 1);
27 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
28 QString ret = QObject::trUtf8(arg1, arg2);
29 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
30 return 1;
32 int LuaBinder< QObject >::__LuaWrapCall__trUtf8__OverloadedVersion__2 (lua_State *L) {
33 const char * arg1 = lua_tostring(L, 1);
34 const char * arg2 = lua_tostring(L, 2);
35 int arg3 = lua_tointeger(L, 3);
36 QString ret = QObject::trUtf8(arg1, arg2, arg3);
37 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
38 return 1;
40 int LuaBinder< QObject >::__LuaWrapCall__trUtf8 (lua_State *L) {
41 int score[3];
42 const int premium = 11+lua_gettop(L);
43 score[1] = 0;
44 if ((lua_type(L, 1)==LUA_TSTRING)) {
45 score[1] += premium;
46 } else if (false) {
47 score[1] += premium-1; // table: 0xd13c40;
48 } else {
49 score[1] -= premium*premium;
51 if ((lua_type(L, 2)==LUA_TSTRING)) {
52 score[1] += premium;
53 } else if (true) {
54 score[1] += premium-1; // table: 0xd137a0;
55 } else {
56 score[1] -= premium*premium;
58 score[2] = 0;
59 if ((lua_type(L, 1)==LUA_TSTRING)) {
60 score[2] += premium;
61 } else if (false) {
62 score[2] += premium-1; // table: 0xd15a30;
63 } else {
64 score[2] -= premium*premium;
66 if ((lua_type(L, 2)==LUA_TSTRING)) {
67 score[2] += premium;
68 } else if (false) {
69 score[2] += premium-1; // table: 0xd15160;
70 } else {
71 score[2] -= premium*premium;
73 if (lua_isnumber(L, 3)) {
74 score[2] += premium;
75 } else if (false) {
76 score[2] += premium-1; // table: 0xd15ec0;
77 } else {
78 score[2] -= premium*premium;
80 int best = 1;
81 for (int i=1;i<=2;i++) {
82 if (score[best] < score[i]) { best = i; }
84 switch (best) {
85 case 1: return __LuaWrapCall__trUtf8__OverloadedVersion__1(L); break;
86 case 2: return __LuaWrapCall__trUtf8__OverloadedVersion__2(L); break;
88 lua_pushstring(L, "no overload of function __LuaWrapCall__trUtf8 matching arguments");
89 lua_error(L);
90 return 0;
92 int LuaBinder< QObject >::__LuaWrapCall__killTimer (lua_State *L) {
93 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
94 if (__lua__obj==0) {
95 lua_pushstring(L, "trying to reference deleted pointer");
96 lua_error(L);
97 return 0;
99 int arg1 = lua_tointeger(L, 2);
100 __lua__obj->QObject::killTimer(arg1);
101 return 0;
103 int LuaBinder< QObject >::__LuaWrapCall__dumpObjectTree (lua_State *L) {
104 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
105 if (__lua__obj==0) {
106 lua_pushstring(L, "trying to reference deleted pointer");
107 lua_error(L);
108 return 0;
110 __lua__obj->QObject::dumpObjectTree();
111 return 0;
113 int LuaBinder< QObject >::__LuaWrapCall__dumpObjectInfo (lua_State *L) {
114 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
115 if (__lua__obj==0) {
116 lua_pushstring(L, "trying to reference deleted pointer");
117 lua_error(L);
118 return 0;
120 __lua__obj->QObject::dumpObjectInfo();
121 return 0;
123 int LuaBinder< QObject >::__LuaWrapCall__event (lua_State *L) {
124 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
125 if (__lua__obj==0) {
126 lua_pushstring(L, "trying to reference deleted pointer");
127 lua_error(L);
128 return 0;
130 QEvent * arg1 = *static_cast<QEvent**>(lqtL_checkudata(L, 2, "QEvent*"));
131 bool ret = __lua__obj->QObject::event(arg1);
132 lua_pushboolean(L, ret);
133 return 1;
135 int LuaBinder< QObject >::__LuaWrapCall__installEventFilter (lua_State *L) {
136 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
137 if (__lua__obj==0) {
138 lua_pushstring(L, "trying to reference deleted pointer");
139 lua_error(L);
140 return 0;
142 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
143 __lua__obj->QObject::installEventFilter(arg1);
144 return 0;
146 int LuaBinder< QObject >::__LuaWrapCall__inherits (lua_State *L) {
147 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
148 if (__lua__obj==0) {
149 lua_pushstring(L, "trying to reference deleted pointer");
150 lua_error(L);
151 return 0;
153 const char * arg1 = lua_tostring(L, 2);
154 bool ret = __lua__obj->QObject::inherits(arg1);
155 lua_pushboolean(L, ret);
156 return 1;
158 int LuaBinder< QObject >::__LuaWrapCall__registerUserData (lua_State *L) {
159 unsigned int ret = QObject::registerUserData();
160 lua_pushinteger(L, ret);
161 return 1;
163 int LuaBinder< QObject >::__LuaWrapCall__dynamicPropertyNames (lua_State *L) {
164 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
165 if (__lua__obj==0) {
166 lua_pushstring(L, "trying to reference deleted pointer");
167 lua_error(L);
168 return 0;
170 QList<QByteArray> ret = __lua__obj->QObject::dynamicPropertyNames();
171 lqtL_passudata(L, new QList<QByteArray>(ret), "QList<QByteArray>*");
172 return 1;
174 int LuaBinder< QObject >::__LuaWrapCall__connect__OverloadedVersion__1 (lua_State *L) {
175 const QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
176 const char * arg2 = lua_tostring(L, 2);
177 const QObject * arg3 = *static_cast<QObject**>(lqtL_checkudata(L, 3, "QObject*"));
178 const char * arg4 = lua_tostring(L, 4);
179 Qt::ConnectionType arg5 = lqtL_isenum(L, 5, "Qt::ConnectionType")?static_cast<Qt::ConnectionType>(lqtL_toenum(L, 5, "Qt::ConnectionType")):Qt::AutoConnection;
180 bool ret = QObject::connect(arg1, arg2, arg3, arg4, arg5);
181 lua_pushboolean(L, ret);
182 return 1;
184 int LuaBinder< QObject >::__LuaWrapCall__connect__OverloadedVersion__2 (lua_State *L) {
185 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
186 if (__lua__obj==0) {
187 lua_pushstring(L, "trying to reference deleted pointer");
188 lua_error(L);
189 return 0;
191 const QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
192 const char * arg2 = lua_tostring(L, 3);
193 const char * arg3 = lua_tostring(L, 4);
194 Qt::ConnectionType arg4 = lqtL_isenum(L, 5, "Qt::ConnectionType")?static_cast<Qt::ConnectionType>(lqtL_toenum(L, 5, "Qt::ConnectionType")):Qt::AutoConnection;
195 bool ret = __lua__obj->QObject::connect(arg1, arg2, arg3, arg4);
196 lua_pushboolean(L, ret);
197 return 1;
199 int LuaBinder< QObject >::__LuaWrapCall__connect (lua_State *L) {
200 int score[3];
201 const int premium = 11+lua_gettop(L);
202 score[1] = 0;
203 if (lqtL_testudata(L, 1, "QObject*")) {
204 score[1] += premium;
205 } else if (false) {
206 score[1] += premium-1; // table: 0xd22980;
207 } else {
208 score[1] -= premium*premium;
210 if ((lua_type(L, 2)==LUA_TSTRING)) {
211 score[1] += premium;
212 } else if (false) {
213 score[1] += premium-1; // table: 0xd22650;
214 } else {
215 score[1] -= premium*premium;
217 if (lqtL_testudata(L, 3, "QObject*")) {
218 score[1] += premium;
219 } else if (false) {
220 score[1] += premium-1; // table: 0xd22e30;
221 } else {
222 score[1] -= premium*premium;
224 if ((lua_type(L, 4)==LUA_TSTRING)) {
225 score[1] += premium;
226 } else if (false) {
227 score[1] += premium-1; // table: 0xd23690;
228 } else {
229 score[1] -= premium*premium;
231 if (lqtL_isenum(L, 5, "Qt::ConnectionType")) {
232 score[1] += premium;
233 } else if (true) {
234 score[1] += premium-1; // table: 0xd23a40;
235 } else {
236 score[1] -= premium*premium;
238 score[2] = 0;
239 score[2] += lqtL_testudata(L, 1, "QObject*")?premium:-premium*premium;
240 if (lqtL_testudata(L, 2, "QObject*")) {
241 score[2] += premium;
242 } else if (false) {
243 score[2] += premium-1; // table: 0xd24460;
244 } else {
245 score[2] -= premium*premium;
247 if ((lua_type(L, 3)==LUA_TSTRING)) {
248 score[2] += premium;
249 } else if (false) {
250 score[2] += premium-1; // table: 0xd23630;
251 } else {
252 score[2] -= premium*premium;
254 if ((lua_type(L, 4)==LUA_TSTRING)) {
255 score[2] += premium;
256 } else if (false) {
257 score[2] += premium-1; // table: 0xd24970;
258 } else {
259 score[2] -= premium*premium;
261 if (lqtL_isenum(L, 5, "Qt::ConnectionType")) {
262 score[2] += premium;
263 } else if (true) {
264 score[2] += premium-1; // table: 0xd25290;
265 } else {
266 score[2] -= premium*premium;
268 int best = 1;
269 for (int i=1;i<=2;i++) {
270 if (score[best] < score[i]) { best = i; }
272 switch (best) {
273 case 1: return __LuaWrapCall__connect__OverloadedVersion__1(L); break;
274 case 2: return __LuaWrapCall__connect__OverloadedVersion__2(L); break;
276 lua_pushstring(L, "no overload of function __LuaWrapCall__connect matching arguments");
277 lua_error(L);
278 return 0;
280 int LuaBinder< QObject >::__LuaWrapCall__setObjectName (lua_State *L) {
281 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
282 if (__lua__obj==0) {
283 lua_pushstring(L, "trying to reference deleted pointer");
284 lua_error(L);
285 return 0;
287 const QString& arg1 = QString::fromAscii(lua_tostring(L, 2), lua_objlen(L, 2));
288 __lua__obj->QObject::setObjectName(arg1);
289 return 0;
291 int LuaBinder< QObject >::__LuaWrapCall__isWidgetType (lua_State *L) {
292 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
293 if (__lua__obj==0) {
294 lua_pushstring(L, "trying to reference deleted pointer");
295 lua_error(L);
296 return 0;
298 bool ret = __lua__obj->QObject::isWidgetType();
299 lua_pushboolean(L, ret);
300 return 1;
302 int LuaBinder< QObject >::__LuaWrapCall__property (lua_State *L) {
303 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
304 if (__lua__obj==0) {
305 lua_pushstring(L, "trying to reference deleted pointer");
306 lua_error(L);
307 return 0;
309 const char * arg1 = lua_tostring(L, 2);
310 QVariant ret = __lua__obj->QObject::property(arg1);
311 lqtL_passudata(L, new QVariant(ret), "QVariant*");
312 return 1;
314 int LuaBinder< QObject >::__LuaWrapCall__children (lua_State *L) {
315 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
316 if (__lua__obj==0) {
317 lua_pushstring(L, "trying to reference deleted pointer");
318 lua_error(L);
319 return 0;
321 const QList<QObject*>& ret = __lua__obj->QObject::children();
322 lqtL_pushudata(L, &(ret), "QList<QObject*>*");
323 return 1;
325 int LuaBinder< QObject >::__LuaWrapCall__new (lua_State *L) {
326 QObject * arg1 = lqtL_testudata(L, 1, "QObject*")?*static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*")):static_cast< QObject * >(0);
327 QObject * ret = new LuaBinder< QObject >(L, arg1);
328 lqtL_passudata(L, ret, "QObject*");
329 return 1;
331 int LuaBinder< QObject >::__LuaWrapCall__delete (lua_State *L) {
332 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
333 if (__lua__obj==0) {
334 lua_pushstring(L, "trying to reference deleted pointer");
335 lua_error(L);
336 return 0;
338 delete __lua__obj;
339 __lua__obj = 0;
340 return 0;
342 int LuaBinder< QObject >::__LuaWrapCall__setUserData (lua_State *L) {
343 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
344 if (__lua__obj==0) {
345 lua_pushstring(L, "trying to reference deleted pointer");
346 lua_error(L);
347 return 0;
349 unsigned int arg1 = lua_tointeger(L, 2);
350 QObjectUserData * arg2 = *static_cast<QObjectUserData**>(lqtL_checkudata(L, 3, "QObjectUserData*"));
351 __lua__obj->QObject::setUserData(arg1, arg2);
352 return 0;
354 int LuaBinder< QObject >::__LuaWrapCall__eventFilter (lua_State *L) {
355 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
356 if (__lua__obj==0) {
357 lua_pushstring(L, "trying to reference deleted pointer");
358 lua_error(L);
359 return 0;
361 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
362 QEvent * arg2 = *static_cast<QEvent**>(lqtL_checkudata(L, 3, "QEvent*"));
363 bool ret = __lua__obj->QObject::eventFilter(arg1, arg2);
364 lua_pushboolean(L, ret);
365 return 1;
367 int LuaBinder< QObject >::__LuaWrapCall__userData (lua_State *L) {
368 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
369 if (__lua__obj==0) {
370 lua_pushstring(L, "trying to reference deleted pointer");
371 lua_error(L);
372 return 0;
374 unsigned int arg1 = lua_tointeger(L, 2);
375 QObjectUserData * ret = __lua__obj->QObject::userData(arg1);
376 lqtL_pushudata(L, ret, "QObjectUserData*");
377 return 1;
379 int LuaBinder< QObject >::__LuaWrapCall__startTimer (lua_State *L) {
380 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
381 if (__lua__obj==0) {
382 lua_pushstring(L, "trying to reference deleted pointer");
383 lua_error(L);
384 return 0;
386 int arg1 = lua_tointeger(L, 2);
387 int ret = __lua__obj->QObject::startTimer(arg1);
388 lua_pushinteger(L, ret);
389 return 1;
391 int LuaBinder< QObject >::__LuaWrapCall__moveToThread (lua_State *L) {
392 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
393 if (__lua__obj==0) {
394 lua_pushstring(L, "trying to reference deleted pointer");
395 lua_error(L);
396 return 0;
398 QThread * arg1 = *static_cast<QThread**>(lqtL_checkudata(L, 2, "QThread*"));
399 __lua__obj->QObject::moveToThread(arg1);
400 return 0;
402 int LuaBinder< QObject >::__LuaWrapCall__thread (lua_State *L) {
403 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
404 if (__lua__obj==0) {
405 lua_pushstring(L, "trying to reference deleted pointer");
406 lua_error(L);
407 return 0;
409 QThread * ret = __lua__obj->QObject::thread();
410 lqtL_pushudata(L, ret, "QThread*");
411 return 1;
413 int LuaBinder< QObject >::__LuaWrapCall__blockSignals (lua_State *L) {
414 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
415 if (__lua__obj==0) {
416 lua_pushstring(L, "trying to reference deleted pointer");
417 lua_error(L);
418 return 0;
420 bool arg1 = (bool)lua_toboolean(L, 2);
421 bool ret = __lua__obj->QObject::blockSignals(arg1);
422 lua_pushboolean(L, ret);
423 return 1;
425 int LuaBinder< QObject >::__LuaWrapCall__tr__OverloadedVersion__1 (lua_State *L) {
426 const char * arg1 = lua_tostring(L, 1);
427 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
428 QString ret = QObject::tr(arg1, arg2);
429 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
430 return 1;
432 int LuaBinder< QObject >::__LuaWrapCall__tr__OverloadedVersion__2 (lua_State *L) {
433 const char * arg1 = lua_tostring(L, 1);
434 const char * arg2 = lua_tostring(L, 2);
435 int arg3 = lua_tointeger(L, 3);
436 QString ret = QObject::tr(arg1, arg2, arg3);
437 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
438 return 1;
440 int LuaBinder< QObject >::__LuaWrapCall__tr (lua_State *L) {
441 int score[3];
442 const int premium = 11+lua_gettop(L);
443 score[1] = 0;
444 if ((lua_type(L, 1)==LUA_TSTRING)) {
445 score[1] += premium;
446 } else if (false) {
447 score[1] += premium-1; // table: 0xd12f00;
448 } else {
449 score[1] -= premium*premium;
451 if ((lua_type(L, 2)==LUA_TSTRING)) {
452 score[1] += premium;
453 } else if (true) {
454 score[1] += premium-1; // table: 0xd12c70;
455 } else {
456 score[1] -= premium*premium;
458 score[2] = 0;
459 if ((lua_type(L, 1)==LUA_TSTRING)) {
460 score[2] += premium;
461 } else if (false) {
462 score[2] += premium-1; // table: 0xd14920;
463 } else {
464 score[2] -= premium*premium;
466 if ((lua_type(L, 2)==LUA_TSTRING)) {
467 score[2] += premium;
468 } else if (false) {
469 score[2] += premium-1; // table: 0xd14e10;
470 } else {
471 score[2] -= premium*premium;
473 if (lua_isnumber(L, 3)) {
474 score[2] += premium;
475 } else if (false) {
476 score[2] += premium-1; // table: 0xd151c0;
477 } else {
478 score[2] -= premium*premium;
480 int best = 1;
481 for (int i=1;i<=2;i++) {
482 if (score[best] < score[i]) { best = i; }
484 switch (best) {
485 case 1: return __LuaWrapCall__tr__OverloadedVersion__1(L); break;
486 case 2: return __LuaWrapCall__tr__OverloadedVersion__2(L); break;
488 lua_pushstring(L, "no overload of function __LuaWrapCall__tr matching arguments");
489 lua_error(L);
490 return 0;
492 int LuaBinder< QObject >::__LuaWrapCall__setParent (lua_State *L) {
493 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
494 if (__lua__obj==0) {
495 lua_pushstring(L, "trying to reference deleted pointer");
496 lua_error(L);
497 return 0;
499 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
500 __lua__obj->QObject::setParent(arg1);
501 return 0;
503 int LuaBinder< QObject >::__LuaWrapCall__disconnect__OverloadedVersion__1 (lua_State *L) {
504 const QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
505 const char * arg2 = lua_tostring(L, 2);
506 const QObject * arg3 = *static_cast<QObject**>(lqtL_checkudata(L, 3, "QObject*"));
507 const char * arg4 = lua_tostring(L, 4);
508 bool ret = QObject::disconnect(arg1, arg2, arg3, arg4);
509 lua_pushboolean(L, ret);
510 return 1;
512 int LuaBinder< QObject >::__LuaWrapCall__disconnect__OverloadedVersion__2 (lua_State *L) {
513 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
514 if (__lua__obj==0) {
515 lua_pushstring(L, "trying to reference deleted pointer");
516 lua_error(L);
517 return 0;
519 const char * arg1 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
520 const QObject * arg2 = lqtL_testudata(L, 3, "QObject*")?*static_cast<QObject**>(lqtL_checkudata(L, 3, "QObject*")):static_cast< const QObject * >(0);
521 const char * arg3 = (lua_type(L, 4)==LUA_TSTRING)?lua_tostring(L, 4):static_cast< const char * >(0);
522 bool ret = __lua__obj->QObject::disconnect(arg1, arg2, arg3);
523 lua_pushboolean(L, ret);
524 return 1;
526 int LuaBinder< QObject >::__LuaWrapCall__disconnect__OverloadedVersion__3 (lua_State *L) {
527 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
528 if (__lua__obj==0) {
529 lua_pushstring(L, "trying to reference deleted pointer");
530 lua_error(L);
531 return 0;
533 const QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
534 const char * arg2 = (lua_type(L, 3)==LUA_TSTRING)?lua_tostring(L, 3):static_cast< const char * >(0);
535 bool ret = __lua__obj->QObject::disconnect(arg1, arg2);
536 lua_pushboolean(L, ret);
537 return 1;
539 int LuaBinder< QObject >::__LuaWrapCall__disconnect (lua_State *L) {
540 int score[4];
541 const int premium = 11+lua_gettop(L);
542 score[1] = 0;
543 if (lqtL_testudata(L, 1, "QObject*")) {
544 score[1] += premium;
545 } else if (false) {
546 score[1] += premium-1; // table: 0xd25bc0;
547 } else {
548 score[1] -= premium*premium;
550 if ((lua_type(L, 2)==LUA_TSTRING)) {
551 score[1] += premium;
552 } else if (false) {
553 score[1] += premium-1; // table: 0xd258f0;
554 } else {
555 score[1] -= premium*premium;
557 if (lqtL_testudata(L, 3, "QObject*")) {
558 score[1] += premium;
559 } else if (false) {
560 score[1] += premium-1; // table: 0xd26080;
561 } else {
562 score[1] -= premium*premium;
564 if ((lua_type(L, 4)==LUA_TSTRING)) {
565 score[1] += premium;
566 } else if (false) {
567 score[1] += premium-1; // table: 0xd268e0;
568 } else {
569 score[1] -= premium*premium;
571 score[2] = 0;
572 score[2] += lqtL_testudata(L, 1, "QObject*")?premium:-premium*premium;
573 if ((lua_type(L, 2)==LUA_TSTRING)) {
574 score[2] += premium;
575 } else if (true) {
576 score[2] += premium-1; // table: 0xd271d0;
577 } else {
578 score[2] -= premium*premium;
580 if (lqtL_testudata(L, 3, "QObject*")) {
581 score[2] += premium;
582 } else if (true) {
583 score[2] += premium-1; // table: 0xd26ed0;
584 } else {
585 score[2] -= premium*premium;
587 if ((lua_type(L, 4)==LUA_TSTRING)) {
588 score[2] += premium;
589 } else if (true) {
590 score[2] += premium-1; // table: 0xd27680;
591 } else {
592 score[2] -= premium*premium;
594 score[3] = 0;
595 score[3] += lqtL_testudata(L, 1, "QObject*")?premium:-premium*premium;
596 if (lqtL_testudata(L, 2, "QObject*")) {
597 score[3] += premium;
598 } else if (false) {
599 score[3] += premium-1; // table: 0xd28440;
600 } else {
601 score[3] -= premium*premium;
603 if ((lua_type(L, 3)==LUA_TSTRING)) {
604 score[3] += premium;
605 } else if (true) {
606 score[3] += premium-1; // table: 0xd27a50;
607 } else {
608 score[3] -= premium*premium;
610 int best = 1;
611 for (int i=1;i<=3;i++) {
612 if (score[best] < score[i]) { best = i; }
614 switch (best) {
615 case 1: return __LuaWrapCall__disconnect__OverloadedVersion__1(L); break;
616 case 2: return __LuaWrapCall__disconnect__OverloadedVersion__2(L); break;
617 case 3: return __LuaWrapCall__disconnect__OverloadedVersion__3(L); break;
619 lua_pushstring(L, "no overload of function __LuaWrapCall__disconnect matching arguments");
620 lua_error(L);
621 return 0;
623 int LuaBinder< QObject >::__LuaWrapCall__removeEventFilter (lua_State *L) {
624 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
625 if (__lua__obj==0) {
626 lua_pushstring(L, "trying to reference deleted pointer");
627 lua_error(L);
628 return 0;
630 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
631 __lua__obj->QObject::removeEventFilter(arg1);
632 return 0;
634 int LuaBinder< QObject >::__LuaWrapCall__deleteLater (lua_State *L) {
635 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
636 if (__lua__obj==0) {
637 lua_pushstring(L, "trying to reference deleted pointer");
638 lua_error(L);
639 return 0;
641 __lua__obj->QObject::deleteLater();
642 return 0;
644 int LuaBinder< QObject >::__LuaWrapCall__metaObject (lua_State *L) {
645 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
646 if (__lua__obj==0) {
647 lua_pushstring(L, "trying to reference deleted pointer");
648 lua_error(L);
649 return 0;
651 const QMetaObject * ret = __lua__obj->QObject::metaObject();
652 lqtL_pushudata(L, ret, "QMetaObject*");
653 return 1;
655 int LuaBinder< QObject >::__LuaWrapCall__setProperty (lua_State *L) {
656 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
657 if (__lua__obj==0) {
658 lua_pushstring(L, "trying to reference deleted pointer");
659 lua_error(L);
660 return 0;
662 const char * arg1 = lua_tostring(L, 2);
663 const QVariant& arg2 = **static_cast<QVariant**>(lqtL_checkudata(L, 3, "QVariant*"));
664 bool ret = __lua__obj->QObject::setProperty(arg1, arg2);
665 lua_pushboolean(L, ret);
666 return 1;
668 int LuaBinder< QObject >::__LuaWrapCall__objectName (lua_State *L) {
669 QObject *& __lua__obj = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
670 if (__lua__obj==0) {
671 lua_pushstring(L, "trying to reference deleted pointer");
672 lua_error(L);
673 return 0;
675 QString ret = __lua__obj->QObject::objectName();
676 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
677 return 1;
679 bool LuaBinder< QObject >::event (QEvent * arg1) {
680 bool absorbed = false;
681 int oldtop = lua_gettop(L);
682 lqtL_pushudata(L, this, "QObject*");
683 if (lua_getmetatable(L, -1)) {
684 lua_getfield(L, -1, "event");
685 lua_remove(L, -2);
686 } else {
687 lua_pushnil(L);
689 lua_insert(L, -2);
690 lqtL_pushudata(L, arg1, "QEvent*");
691 if (lua_isfunction(L, -1-2)) {
692 lua_pcall(L, 1+1, 2, 0);
693 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
694 lua_pop(L, 1);
696 if (!absorbed) {
697 lua_settop(L, oldtop);
698 return this->QObject::event(arg1);
700 bool ret = (bool)lua_toboolean(L, -1);
701 lua_settop(L, oldtop);
702 return ret;
704 void LuaBinder< QObject >::disconnectNotify (const char * arg1) {
705 bool absorbed = false;
706 int oldtop = lua_gettop(L);
707 lqtL_pushudata(L, this, "QObject*");
708 if (lua_getmetatable(L, -1)) {
709 lua_getfield(L, -1, "disconnectNotify");
710 lua_remove(L, -2);
711 } else {
712 lua_pushnil(L);
714 lua_insert(L, -2);
715 lua_pushstring(L, arg1);
716 if (lua_isfunction(L, -1-2)) {
717 lua_pcall(L, 1+1, 2, 0);
718 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
719 lua_pop(L, 1);
721 if (!absorbed) {
722 lua_settop(L, oldtop);
723 this->QObject::disconnectNotify(arg1);
725 lua_settop(L, oldtop);
727 bool LuaBinder< QObject >::eventFilter (QObject * arg1, QEvent * arg2) {
728 bool absorbed = false;
729 int oldtop = lua_gettop(L);
730 lqtL_pushudata(L, this, "QObject*");
731 if (lua_getmetatable(L, -1)) {
732 lua_getfield(L, -1, "eventFilter");
733 lua_remove(L, -2);
734 } else {
735 lua_pushnil(L);
737 lua_insert(L, -2);
738 lqtL_pushudata(L, arg1, "QObject*");
739 lqtL_pushudata(L, arg2, "QEvent*");
740 if (lua_isfunction(L, -2-2)) {
741 lua_pcall(L, 2+1, 2, 0);
742 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
743 lua_pop(L, 1);
745 if (!absorbed) {
746 lua_settop(L, oldtop);
747 return this->QObject::eventFilter(arg1, arg2);
749 bool ret = (bool)lua_toboolean(L, -1);
750 lua_settop(L, oldtop);
751 return ret;
753 void LuaBinder< QObject >::timerEvent (QTimerEvent * arg1) {
754 bool absorbed = false;
755 int oldtop = lua_gettop(L);
756 lqtL_pushudata(L, this, "QObject*");
757 if (lua_getmetatable(L, -1)) {
758 lua_getfield(L, -1, "timerEvent");
759 lua_remove(L, -2);
760 } else {
761 lua_pushnil(L);
763 lua_insert(L, -2);
764 lqtL_pushudata(L, arg1, "QTimerEvent*");
765 if (lua_isfunction(L, -1-2)) {
766 lua_pcall(L, 1+1, 2, 0);
767 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
768 lua_pop(L, 1);
770 if (!absorbed) {
771 lua_settop(L, oldtop);
772 this->QObject::timerEvent(arg1);
774 lua_settop(L, oldtop);
776 void LuaBinder< QObject >::connectNotify (const char * arg1) {
777 bool absorbed = false;
778 int oldtop = lua_gettop(L);
779 lqtL_pushudata(L, this, "QObject*");
780 if (lua_getmetatable(L, -1)) {
781 lua_getfield(L, -1, "connectNotify");
782 lua_remove(L, -2);
783 } else {
784 lua_pushnil(L);
786 lua_insert(L, -2);
787 lua_pushstring(L, arg1);
788 if (lua_isfunction(L, -1-2)) {
789 lua_pcall(L, 1+1, 2, 0);
790 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
791 lua_pop(L, 1);
793 if (!absorbed) {
794 lua_settop(L, oldtop);
795 this->QObject::connectNotify(arg1);
797 lua_settop(L, oldtop);
799 void LuaBinder< QObject >::childEvent (QChildEvent * arg1) {
800 bool absorbed = false;
801 int oldtop = lua_gettop(L);
802 lqtL_pushudata(L, this, "QObject*");
803 if (lua_getmetatable(L, -1)) {
804 lua_getfield(L, -1, "childEvent");
805 lua_remove(L, -2);
806 } else {
807 lua_pushnil(L);
809 lua_insert(L, -2);
810 lqtL_pushudata(L, arg1, "QChildEvent*");
811 if (lua_isfunction(L, -1-2)) {
812 lua_pcall(L, 1+1, 2, 0);
813 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
814 lua_pop(L, 1);
816 if (!absorbed) {
817 lua_settop(L, oldtop);
818 this->QObject::childEvent(arg1);
820 lua_settop(L, oldtop);
822 const QMetaObject * LuaBinder< QObject >::metaObject () const {
823 bool absorbed = false;
824 int oldtop = lua_gettop(L);
825 lqtL_pushudata(L, this, "QObject*");
826 if (lua_getmetatable(L, -1)) {
827 lua_getfield(L, -1, "metaObject");
828 lua_remove(L, -2);
829 } else {
830 lua_pushnil(L);
832 lua_insert(L, -2);
833 if (lua_isfunction(L, -0-2)) {
834 lua_pcall(L, 0+1, 2, 0);
835 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
836 lua_pop(L, 1);
838 if (!absorbed) {
839 lua_settop(L, oldtop);
840 return this->QObject::metaObject();
842 const QMetaObject * ret = *static_cast<QMetaObject**>(lqtL_checkudata(L, -1, "QMetaObject*"));
843 lua_settop(L, oldtop);
844 return ret;
846 void LuaBinder< QObject >::customEvent (QEvent * arg1) {
847 bool absorbed = false;
848 int oldtop = lua_gettop(L);
849 lqtL_pushudata(L, this, "QObject*");
850 if (lua_getmetatable(L, -1)) {
851 lua_getfield(L, -1, "customEvent");
852 lua_remove(L, -2);
853 } else {
854 lua_pushnil(L);
856 lua_insert(L, -2);
857 lqtL_pushudata(L, arg1, "QEvent*");
858 if (lua_isfunction(L, -1-2)) {
859 lua_pcall(L, 1+1, 2, 0);
860 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
861 lua_pop(L, 1);
863 if (!absorbed) {
864 lua_settop(L, oldtop);
865 this->QObject::customEvent(arg1);
867 lua_settop(L, oldtop);
869 LuaBinder< QObject >:: ~LuaBinder< QObject > () {
870 int oldtop = lua_gettop(L);
871 lqtL_pushudata(L, this, "QObject*");
872 lua_getfield(L, -1, "~QObject");
874 if (lua_isfunction(L, -1)) {
875 lua_insert(L, -2);
876 lua_pcall(L, 1, 1, 0);
877 } else {
879 lua_settop(L, oldtop);
881 int luaopen_QObject (lua_State *L) {
882 if (luaL_newmetatable(L, "QObject*")) {
883 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__parent);
884 lua_setfield(L, -2, "parent");
885 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__signalsBlocked);
886 lua_setfield(L, -2, "signalsBlocked");
887 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__trUtf8);
888 lua_setfield(L, -2, "trUtf8");
889 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__killTimer);
890 lua_setfield(L, -2, "killTimer");
891 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__dumpObjectTree);
892 lua_setfield(L, -2, "dumpObjectTree");
893 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__dumpObjectInfo);
894 lua_setfield(L, -2, "dumpObjectInfo");
895 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__event);
896 lua_setfield(L, -2, "event");
897 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__installEventFilter);
898 lua_setfield(L, -2, "installEventFilter");
899 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__inherits);
900 lua_setfield(L, -2, "inherits");
901 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__registerUserData);
902 lua_setfield(L, -2, "registerUserData");
903 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__dynamicPropertyNames);
904 lua_setfield(L, -2, "dynamicPropertyNames");
905 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__connect);
906 lua_setfield(L, -2, "connect");
907 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__setObjectName);
908 lua_setfield(L, -2, "setObjectName");
909 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__isWidgetType);
910 lua_setfield(L, -2, "isWidgetType");
911 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__property);
912 lua_setfield(L, -2, "property");
913 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__children);
914 lua_setfield(L, -2, "children");
915 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__new);
916 lua_setfield(L, -2, "new");
917 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__delete);
918 lua_setfield(L, -2, "delete");
919 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__setUserData);
920 lua_setfield(L, -2, "setUserData");
921 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__eventFilter);
922 lua_setfield(L, -2, "eventFilter");
923 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__userData);
924 lua_setfield(L, -2, "userData");
925 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__startTimer);
926 lua_setfield(L, -2, "startTimer");
927 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__moveToThread);
928 lua_setfield(L, -2, "moveToThread");
929 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__thread);
930 lua_setfield(L, -2, "thread");
931 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__blockSignals);
932 lua_setfield(L, -2, "blockSignals");
933 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__tr);
934 lua_setfield(L, -2, "tr");
935 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__setParent);
936 lua_setfield(L, -2, "setParent");
937 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__disconnect);
938 lua_setfield(L, -2, "disconnect");
939 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__removeEventFilter);
940 lua_setfield(L, -2, "removeEventFilter");
941 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__deleteLater);
942 lua_setfield(L, -2, "deleteLater");
943 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__metaObject);
944 lua_setfield(L, -2, "metaObject");
945 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__setProperty);
946 lua_setfield(L, -2, "setProperty");
947 lua_pushcfunction(L, LuaBinder< QObject >::__LuaWrapCall__objectName);
948 lua_setfield(L, -2, "objectName");
949 lua_newtable(L);
950 lua_setfield(L, -2, "__base");
951 lua_pushcfunction(L, lqtL_newindex);
952 lua_setfield(L, -2, "__newindex");
953 lua_pushcfunction(L, lqtL_index);
954 lua_setfield(L, -2, "__index");
955 lua_pushcfunction(L, lqtL_gc);
956 lua_setfield(L, -2, "__gc");
957 lua_pushstring(L, "QObject");
958 lua_setfield(L, -2, "__qtype");
959 lua_setglobal(L, "QObject");
960 } else {
961 lua_pop(L, 1);
963 return 0;