Initial commit
[Leditor.git] / src / lqt_bind_QVBoxLayout.cpp
bloba238d2cb50f0263472c704487c2fc0a9ffa23f76
1 #include "lqt_bind_QVBoxLayout.hpp"
3 int LuaBinder< QVBoxLayout >::__LuaWrapCall__tr__OverloadedVersion__1 (lua_State *L) {
4 const char * arg1 = lua_tostring(L, 1);
5 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
6 QString ret = QVBoxLayout::tr(arg1, arg2);
7 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
8 return 1;
10 int LuaBinder< QVBoxLayout >::__LuaWrapCall__tr__OverloadedVersion__2 (lua_State *L) {
11 const char * arg1 = lua_tostring(L, 1);
12 const char * arg2 = lua_tostring(L, 2);
13 int arg3 = lua_tointeger(L, 3);
14 QString ret = QVBoxLayout::tr(arg1, arg2, arg3);
15 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
16 return 1;
18 int LuaBinder< QVBoxLayout >::__LuaWrapCall__tr (lua_State *L) {
19 int score[2];
20 const int premium = 11+lua_gettop(L);
21 score[1] = 0;
22 if ((lua_type(L, 1)==LUA_TSTRING)) {
23 score[1] += premium;
24 } else if (false) {
25 score[1] += premium-1; // table: 0xbc5c40;
26 } else {
27 score[1] -= premium*premium;
29 if ((lua_type(L, 2)==LUA_TSTRING)) {
30 score[1] += premium;
31 } else if (true) {
32 score[1] += premium-1; // table: 0x64f0e0;
33 } else {
34 score[1] -= premium*premium;
36 score[2] = 0;
37 if ((lua_type(L, 1)==LUA_TSTRING)) {
38 score[2] += premium;
39 } else if (false) {
40 score[2] += premium-1; // table: 0x63b8c0;
41 } else {
42 score[2] -= premium*premium;
44 if ((lua_type(L, 2)==LUA_TSTRING)) {
45 score[2] += premium;
46 } else if (false) {
47 score[2] += premium-1; // table: 0x5ff1f0;
48 } else {
49 score[2] -= premium*premium;
51 if (lua_isnumber(L, 3)) {
52 score[2] += premium;
53 } else if (false) {
54 score[2] += premium-1; // table: 0x61dff0;
55 } else {
56 score[2] -= premium*premium;
58 int best = 1;
59 for (int i=1;i<=2;i++) {
60 if (score[best] < score[i]) { best = i; }
62 switch (best) {
63 case 1: return __LuaWrapCall__tr__OverloadedVersion__1(L); break;
64 case 2: return __LuaWrapCall__tr__OverloadedVersion__2(L); break;
66 return -1;
68 int LuaBinder< QVBoxLayout >::__LuaWrapCall__delete (lua_State *L) {
69 QVBoxLayout *& __lua__obj = *static_cast<QVBoxLayout**>(lqtL_checkudata(L, 1, "QVBoxLayout*"));
70 if (__lua__obj==0) {
71 lua_pushstring(L, "trying to reference deleted pointer");
72 lua_error(L);
73 return 0;
75 delete __lua__obj;
76 __lua__obj = 0;
77 return 0;
79 int LuaBinder< QVBoxLayout >::__LuaWrapCall__trUtf8__OverloadedVersion__1 (lua_State *L) {
80 const char * arg1 = lua_tostring(L, 1);
81 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
82 QString ret = QVBoxLayout::trUtf8(arg1, arg2);
83 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
84 return 1;
86 int LuaBinder< QVBoxLayout >::__LuaWrapCall__trUtf8__OverloadedVersion__2 (lua_State *L) {
87 const char * arg1 = lua_tostring(L, 1);
88 const char * arg2 = lua_tostring(L, 2);
89 int arg3 = lua_tointeger(L, 3);
90 QString ret = QVBoxLayout::trUtf8(arg1, arg2, arg3);
91 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
92 return 1;
94 int LuaBinder< QVBoxLayout >::__LuaWrapCall__trUtf8 (lua_State *L) {
95 int score[2];
96 const int premium = 11+lua_gettop(L);
97 score[1] = 0;
98 if ((lua_type(L, 1)==LUA_TSTRING)) {
99 score[1] += premium;
100 } else if (false) {
101 score[1] += premium-1; // table: 0x61ede0;
102 } else {
103 score[1] -= premium*premium;
105 if ((lua_type(L, 2)==LUA_TSTRING)) {
106 score[1] += premium;
107 } else if (true) {
108 score[1] += premium-1; // table: 0x6287b0;
109 } else {
110 score[1] -= premium*premium;
112 score[2] = 0;
113 if ((lua_type(L, 1)==LUA_TSTRING)) {
114 score[2] += premium;
115 } else if (false) {
116 score[2] += premium-1; // table: 0x5e5640;
117 } else {
118 score[2] -= premium*premium;
120 if ((lua_type(L, 2)==LUA_TSTRING)) {
121 score[2] += premium;
122 } else if (false) {
123 score[2] += premium-1; // table: 0x5ea230;
124 } else {
125 score[2] -= premium*premium;
127 if (lua_isnumber(L, 3)) {
128 score[2] += premium;
129 } else if (false) {
130 score[2] += premium-1; // table: 0x5f0380;
131 } else {
132 score[2] -= premium*premium;
134 int best = 1;
135 for (int i=1;i<=2;i++) {
136 if (score[best] < score[i]) { best = i; }
138 switch (best) {
139 case 1: return __LuaWrapCall__trUtf8__OverloadedVersion__1(L); break;
140 case 2: return __LuaWrapCall__trUtf8__OverloadedVersion__2(L); break;
142 return -1;
144 int LuaBinder< QVBoxLayout >::__LuaWrapCall__metaObject (lua_State *L) {
145 QVBoxLayout *& __lua__obj = *static_cast<QVBoxLayout**>(lqtL_checkudata(L, 1, "QVBoxLayout*"));
146 if (__lua__obj==0) {
147 lua_pushstring(L, "trying to reference deleted pointer");
148 lua_error(L);
149 return 0;
151 const QMetaObject * ret = __lua__obj->QVBoxLayout::metaObject();
152 lqtL_pushudata(L, ret, "QMetaObject*");
153 return 1;
155 int LuaBinder< QVBoxLayout >::__LuaWrapCall__new__OverloadedVersion__1 (lua_State *L) {
156 QVBoxLayout * ret = new LuaBinder< QVBoxLayout >(L);
157 lqtL_pushudata(L, ret, "QVBoxLayout*");
158 return 1;
160 int LuaBinder< QVBoxLayout >::__LuaWrapCall__new__OverloadedVersion__2 (lua_State *L) {
161 QWidget * arg1 = *static_cast<QWidget**>(lqtL_checkudata(L, 1, "QWidget*"));
162 QVBoxLayout * ret = new LuaBinder< QVBoxLayout >(L, arg1);
163 lqtL_pushudata(L, ret, "QVBoxLayout*");
164 return 1;
166 int LuaBinder< QVBoxLayout >::__LuaWrapCall__new (lua_State *L) {
167 int score[2];
168 const int premium = 11+lua_gettop(L);
169 score[1] = 0;
170 score[2] = 0;
171 if (lqtL_testudata(L, 1, "QWidget*")) {
172 score[2] += premium;
173 } else if (false) {
174 score[2] += premium-1; // table: 0x577b60;
175 } else {
176 score[2] -= premium*premium;
178 int best = 1;
179 for (int i=1;i<=2;i++) {
180 if (score[best] < score[i]) { best = i; }
182 switch (best) {
183 case 1: return __LuaWrapCall__new__OverloadedVersion__1(L); break;
184 case 2: return __LuaWrapCall__new__OverloadedVersion__2(L); break;
186 return -1;
188 QLayout * LuaBinder< QVBoxLayout >::layout () {
189 bool absorbed = false;
190 int oldtop = lua_gettop(L);
191 lqtL_pushudata(L, this, "QVBoxLayout*");
192 if (lua_getmetatable(L, -1)) {
193 lua_getfield(L, -1, "layout");
194 lua_remove(L, -2);
195 } else {
196 lua_pushnil(L);
198 lua_insert(L, -2);
199 if (lua_isfunction(L, -0-2)) {
200 lua_pcall(L, 0+1, 2, 0);
201 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
202 lua_pop(L, 1);
204 if (!absorbed) {
205 lua_settop(L, oldtop);
206 return this->QLayout::layout();
208 QLayout * ret = *static_cast<QLayout**>(lqtL_checkudata(L, -1, "QLayout*"));
209 lua_settop(L, oldtop);
210 return ret;
212 QLayoutItem * LuaBinder< QVBoxLayout >::takeAt (int arg1) {
213 bool absorbed = false;
214 int oldtop = lua_gettop(L);
215 lqtL_pushudata(L, this, "QVBoxLayout*");
216 if (lua_getmetatable(L, -1)) {
217 lua_getfield(L, -1, "takeAt");
218 lua_remove(L, -2);
219 } else {
220 lua_pushnil(L);
222 lua_insert(L, -2);
223 lua_pushinteger(L, arg1);
224 if (lua_isfunction(L, -1-2)) {
225 lua_pcall(L, 1+1, 2, 0);
226 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
227 lua_pop(L, 1);
229 if (!absorbed) {
230 lua_settop(L, oldtop);
231 return this->QBoxLayout::takeAt(arg1);
233 QLayoutItem * ret = *static_cast<QLayoutItem**>(lqtL_checkudata(L, -1, "QLayoutItem*"));
234 lua_settop(L, oldtop);
235 return ret;
237 void LuaBinder< QVBoxLayout >::setGeometry (const QRect& arg1) {
238 bool absorbed = false;
239 int oldtop = lua_gettop(L);
240 lqtL_pushudata(L, this, "QVBoxLayout*");
241 if (lua_getmetatable(L, -1)) {
242 lua_getfield(L, -1, "setGeometry");
243 lua_remove(L, -2);
244 } else {
245 lua_pushnil(L);
247 lua_insert(L, -2);
248 lqtL_pushudata(L, &(arg1), "QRect*");
249 if (lua_isfunction(L, -1-2)) {
250 lua_pcall(L, 1+1, 2, 0);
251 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
252 lua_pop(L, 1);
254 if (!absorbed) {
255 lua_settop(L, oldtop);
256 this->QBoxLayout::setGeometry(arg1);
258 lua_settop(L, oldtop);
260 QSize LuaBinder< QVBoxLayout >::minimumSize () const {
261 bool absorbed = false;
262 int oldtop = lua_gettop(L);
263 lqtL_pushudata(L, this, "QVBoxLayout*");
264 if (lua_getmetatable(L, -1)) {
265 lua_getfield(L, -1, "minimumSize");
266 lua_remove(L, -2);
267 } else {
268 lua_pushnil(L);
270 lua_insert(L, -2);
271 if (lua_isfunction(L, -0-2)) {
272 lua_pcall(L, 0+1, 2, 0);
273 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
274 lua_pop(L, 1);
276 if (!absorbed) {
277 lua_settop(L, oldtop);
278 return this->QBoxLayout::minimumSize();
280 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
281 lua_settop(L, oldtop);
282 return ret;
284 int LuaBinder< QVBoxLayout >::heightForWidth (int arg1) const {
285 bool absorbed = false;
286 int oldtop = lua_gettop(L);
287 lqtL_pushudata(L, this, "QVBoxLayout*");
288 if (lua_getmetatable(L, -1)) {
289 lua_getfield(L, -1, "heightForWidth");
290 lua_remove(L, -2);
291 } else {
292 lua_pushnil(L);
294 lua_insert(L, -2);
295 lua_pushinteger(L, arg1);
296 if (lua_isfunction(L, -1-2)) {
297 lua_pcall(L, 1+1, 2, 0);
298 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
299 lua_pop(L, 1);
301 if (!absorbed) {
302 lua_settop(L, oldtop);
303 return this->QBoxLayout::heightForWidth(arg1);
305 int ret = lua_tointeger(L, -1);
306 lua_settop(L, oldtop);
307 return ret;
309 int LuaBinder< QVBoxLayout >::minimumHeightForWidth (int arg1) const {
310 bool absorbed = false;
311 int oldtop = lua_gettop(L);
312 lqtL_pushudata(L, this, "QVBoxLayout*");
313 if (lua_getmetatable(L, -1)) {
314 lua_getfield(L, -1, "minimumHeightForWidth");
315 lua_remove(L, -2);
316 } else {
317 lua_pushnil(L);
319 lua_insert(L, -2);
320 lua_pushinteger(L, arg1);
321 if (lua_isfunction(L, -1-2)) {
322 lua_pcall(L, 1+1, 2, 0);
323 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
324 lua_pop(L, 1);
326 if (!absorbed) {
327 lua_settop(L, oldtop);
328 return this->QBoxLayout::minimumHeightForWidth(arg1);
330 int ret = lua_tointeger(L, -1);
331 lua_settop(L, oldtop);
332 return ret;
334 void LuaBinder< QVBoxLayout >::timerEvent (QTimerEvent * arg1) {
335 bool absorbed = false;
336 int oldtop = lua_gettop(L);
337 lqtL_pushudata(L, this, "QVBoxLayout*");
338 if (lua_getmetatable(L, -1)) {
339 lua_getfield(L, -1, "timerEvent");
340 lua_remove(L, -2);
341 } else {
342 lua_pushnil(L);
344 lua_insert(L, -2);
345 lqtL_pushudata(L, arg1, "QTimerEvent*");
346 if (lua_isfunction(L, -1-2)) {
347 lua_pcall(L, 1+1, 2, 0);
348 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
349 lua_pop(L, 1);
351 if (!absorbed) {
352 lua_settop(L, oldtop);
353 this->QObject::timerEvent(arg1);
355 lua_settop(L, oldtop);
357 QSize LuaBinder< QVBoxLayout >::maximumSize () const {
358 bool absorbed = false;
359 int oldtop = lua_gettop(L);
360 lqtL_pushudata(L, this, "QVBoxLayout*");
361 if (lua_getmetatable(L, -1)) {
362 lua_getfield(L, -1, "maximumSize");
363 lua_remove(L, -2);
364 } else {
365 lua_pushnil(L);
367 lua_insert(L, -2);
368 if (lua_isfunction(L, -0-2)) {
369 lua_pcall(L, 0+1, 2, 0);
370 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
371 lua_pop(L, 1);
373 if (!absorbed) {
374 lua_settop(L, oldtop);
375 return this->QBoxLayout::maximumSize();
377 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
378 lua_settop(L, oldtop);
379 return ret;
381 QLayoutItem * LuaBinder< QVBoxLayout >::itemAt (int arg1) const {
382 bool absorbed = false;
383 int oldtop = lua_gettop(L);
384 lqtL_pushudata(L, this, "QVBoxLayout*");
385 if (lua_getmetatable(L, -1)) {
386 lua_getfield(L, -1, "itemAt");
387 lua_remove(L, -2);
388 } else {
389 lua_pushnil(L);
391 lua_insert(L, -2);
392 lua_pushinteger(L, arg1);
393 if (lua_isfunction(L, -1-2)) {
394 lua_pcall(L, 1+1, 2, 0);
395 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
396 lua_pop(L, 1);
398 if (!absorbed) {
399 lua_settop(L, oldtop);
400 return this->QBoxLayout::itemAt(arg1);
402 QLayoutItem * ret = *static_cast<QLayoutItem**>(lqtL_checkudata(L, -1, "QLayoutItem*"));
403 lua_settop(L, oldtop);
404 return ret;
406 void LuaBinder< QVBoxLayout >::childEvent (QChildEvent * arg1) {
407 bool absorbed = false;
408 int oldtop = lua_gettop(L);
409 lqtL_pushudata(L, this, "QVBoxLayout*");
410 if (lua_getmetatable(L, -1)) {
411 lua_getfield(L, -1, "childEvent");
412 lua_remove(L, -2);
413 } else {
414 lua_pushnil(L);
416 lua_insert(L, -2);
417 lqtL_pushudata(L, arg1, "QChildEvent*");
418 if (lua_isfunction(L, -1-2)) {
419 lua_pcall(L, 1+1, 2, 0);
420 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
421 lua_pop(L, 1);
423 if (!absorbed) {
424 lua_settop(L, oldtop);
425 this->QLayout::childEvent(arg1);
427 lua_settop(L, oldtop);
429 void LuaBinder< QVBoxLayout >::connectNotify (const char * arg1) {
430 bool absorbed = false;
431 int oldtop = lua_gettop(L);
432 lqtL_pushudata(L, this, "QVBoxLayout*");
433 if (lua_getmetatable(L, -1)) {
434 lua_getfield(L, -1, "connectNotify");
435 lua_remove(L, -2);
436 } else {
437 lua_pushnil(L);
439 lua_insert(L, -2);
440 lua_pushstring(L, arg1);
441 if (lua_isfunction(L, -1-2)) {
442 lua_pcall(L, 1+1, 2, 0);
443 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
444 lua_pop(L, 1);
446 if (!absorbed) {
447 lua_settop(L, oldtop);
448 this->QObject::connectNotify(arg1);
450 lua_settop(L, oldtop);
452 bool LuaBinder< QVBoxLayout >::hasHeightForWidth () const {
453 bool absorbed = false;
454 int oldtop = lua_gettop(L);
455 lqtL_pushudata(L, this, "QVBoxLayout*");
456 if (lua_getmetatable(L, -1)) {
457 lua_getfield(L, -1, "hasHeightForWidth");
458 lua_remove(L, -2);
459 } else {
460 lua_pushnil(L);
462 lua_insert(L, -2);
463 if (lua_isfunction(L, -0-2)) {
464 lua_pcall(L, 0+1, 2, 0);
465 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
466 lua_pop(L, 1);
468 if (!absorbed) {
469 lua_settop(L, oldtop);
470 return this->QBoxLayout::hasHeightForWidth();
472 bool ret = (bool)lua_toboolean(L, -1);
473 lua_settop(L, oldtop);
474 return ret;
476 void LuaBinder< QVBoxLayout >::addItem (QLayoutItem * arg1) {
477 bool absorbed = false;
478 int oldtop = lua_gettop(L);
479 lqtL_pushudata(L, this, "QVBoxLayout*");
480 if (lua_getmetatable(L, -1)) {
481 lua_getfield(L, -1, "addItem");
482 lua_remove(L, -2);
483 } else {
484 lua_pushnil(L);
486 lua_insert(L, -2);
487 lqtL_pushudata(L, arg1, "QLayoutItem*");
488 if (lua_isfunction(L, -1-2)) {
489 lua_pcall(L, 1+1, 2, 0);
490 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
491 lua_pop(L, 1);
493 if (!absorbed) {
494 lua_settop(L, oldtop);
495 this->QBoxLayout::addItem(arg1);
497 lua_settop(L, oldtop);
499 bool LuaBinder< QVBoxLayout >::eventFilter (QObject * arg1, QEvent * arg2) {
500 bool absorbed = false;
501 int oldtop = lua_gettop(L);
502 lqtL_pushudata(L, this, "QVBoxLayout*");
503 if (lua_getmetatable(L, -1)) {
504 lua_getfield(L, -1, "eventFilter");
505 lua_remove(L, -2);
506 } else {
507 lua_pushnil(L);
509 lua_insert(L, -2);
510 lqtL_pushudata(L, arg1, "QObject*");
511 lqtL_pushudata(L, arg2, "QEvent*");
512 if (lua_isfunction(L, -2-2)) {
513 lua_pcall(L, 2+1, 2, 0);
514 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
515 lua_pop(L, 1);
517 if (!absorbed) {
518 lua_settop(L, oldtop);
519 return this->QObject::eventFilter(arg1, arg2);
521 bool ret = (bool)lua_toboolean(L, -1);
522 lua_settop(L, oldtop);
523 return ret;
525 QSpacerItem * LuaBinder< QVBoxLayout >::spacerItem () {
526 bool absorbed = false;
527 int oldtop = lua_gettop(L);
528 lqtL_pushudata(L, this, "QVBoxLayout*");
529 if (lua_getmetatable(L, -1)) {
530 lua_getfield(L, -1, "spacerItem");
531 lua_remove(L, -2);
532 } else {
533 lua_pushnil(L);
535 lua_insert(L, -2);
536 if (lua_isfunction(L, -0-2)) {
537 lua_pcall(L, 0+1, 2, 0);
538 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
539 lua_pop(L, 1);
541 if (!absorbed) {
542 lua_settop(L, oldtop);
543 return this->QLayoutItem::spacerItem();
545 QSpacerItem * ret = *static_cast<QSpacerItem**>(lqtL_checkudata(L, -1, "QSpacerItem*"));
546 lua_settop(L, oldtop);
547 return ret;
549 QSize LuaBinder< QVBoxLayout >::sizeHint () const {
550 bool absorbed = false;
551 int oldtop = lua_gettop(L);
552 lqtL_pushudata(L, this, "QVBoxLayout*");
553 if (lua_getmetatable(L, -1)) {
554 lua_getfield(L, -1, "sizeHint");
555 lua_remove(L, -2);
556 } else {
557 lua_pushnil(L);
559 lua_insert(L, -2);
560 if (lua_isfunction(L, -0-2)) {
561 lua_pcall(L, 0+1, 2, 0);
562 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
563 lua_pop(L, 1);
565 if (!absorbed) {
566 lua_settop(L, oldtop);
567 return this->QBoxLayout::sizeHint();
569 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
570 lua_settop(L, oldtop);
571 return ret;
573 int LuaBinder< QVBoxLayout >::indexOf (QWidget * arg1) const {
574 bool absorbed = false;
575 int oldtop = lua_gettop(L);
576 lqtL_pushudata(L, this, "QVBoxLayout*");
577 if (lua_getmetatable(L, -1)) {
578 lua_getfield(L, -1, "indexOf");
579 lua_remove(L, -2);
580 } else {
581 lua_pushnil(L);
583 lua_insert(L, -2);
584 lqtL_pushudata(L, arg1, "QWidget*");
585 if (lua_isfunction(L, -1-2)) {
586 lua_pcall(L, 1+1, 2, 0);
587 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
588 lua_pop(L, 1);
590 if (!absorbed) {
591 lua_settop(L, oldtop);
592 return this->QLayout::indexOf(arg1);
594 int ret = lua_tointeger(L, -1);
595 lua_settop(L, oldtop);
596 return ret;
598 bool LuaBinder< QVBoxLayout >::isEmpty () const {
599 bool absorbed = false;
600 int oldtop = lua_gettop(L);
601 lqtL_pushudata(L, this, "QVBoxLayout*");
602 if (lua_getmetatable(L, -1)) {
603 lua_getfield(L, -1, "isEmpty");
604 lua_remove(L, -2);
605 } else {
606 lua_pushnil(L);
608 lua_insert(L, -2);
609 if (lua_isfunction(L, -0-2)) {
610 lua_pcall(L, 0+1, 2, 0);
611 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
612 lua_pop(L, 1);
614 if (!absorbed) {
615 lua_settop(L, oldtop);
616 return this->QLayout::isEmpty();
618 bool ret = (bool)lua_toboolean(L, -1);
619 lua_settop(L, oldtop);
620 return ret;
622 void LuaBinder< QVBoxLayout >::disconnectNotify (const char * arg1) {
623 bool absorbed = false;
624 int oldtop = lua_gettop(L);
625 lqtL_pushudata(L, this, "QVBoxLayout*");
626 if (lua_getmetatable(L, -1)) {
627 lua_getfield(L, -1, "disconnectNotify");
628 lua_remove(L, -2);
629 } else {
630 lua_pushnil(L);
632 lua_insert(L, -2);
633 lua_pushstring(L, arg1);
634 if (lua_isfunction(L, -1-2)) {
635 lua_pcall(L, 1+1, 2, 0);
636 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
637 lua_pop(L, 1);
639 if (!absorbed) {
640 lua_settop(L, oldtop);
641 this->QObject::disconnectNotify(arg1);
643 lua_settop(L, oldtop);
645 bool LuaBinder< QVBoxLayout >::event (QEvent * arg1) {
646 bool absorbed = false;
647 int oldtop = lua_gettop(L);
648 lqtL_pushudata(L, this, "QVBoxLayout*");
649 if (lua_getmetatable(L, -1)) {
650 lua_getfield(L, -1, "event");
651 lua_remove(L, -2);
652 } else {
653 lua_pushnil(L);
655 lua_insert(L, -2);
656 lqtL_pushudata(L, arg1, "QEvent*");
657 if (lua_isfunction(L, -1-2)) {
658 lua_pcall(L, 1+1, 2, 0);
659 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
660 lua_pop(L, 1);
662 if (!absorbed) {
663 lua_settop(L, oldtop);
664 return this->QObject::event(arg1);
666 bool ret = (bool)lua_toboolean(L, -1);
667 lua_settop(L, oldtop);
668 return ret;
670 QWidget * LuaBinder< QVBoxLayout >::widget () {
671 bool absorbed = false;
672 int oldtop = lua_gettop(L);
673 lqtL_pushudata(L, this, "QVBoxLayout*");
674 if (lua_getmetatable(L, -1)) {
675 lua_getfield(L, -1, "widget");
676 lua_remove(L, -2);
677 } else {
678 lua_pushnil(L);
680 lua_insert(L, -2);
681 if (lua_isfunction(L, -0-2)) {
682 lua_pcall(L, 0+1, 2, 0);
683 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
684 lua_pop(L, 1);
686 if (!absorbed) {
687 lua_settop(L, oldtop);
688 return this->QLayoutItem::widget();
690 QWidget * ret = *static_cast<QWidget**>(lqtL_checkudata(L, -1, "QWidget*"));
691 lua_settop(L, oldtop);
692 return ret;
694 int LuaBinder< QVBoxLayout >::count () const {
695 bool absorbed = false;
696 int oldtop = lua_gettop(L);
697 lqtL_pushudata(L, this, "QVBoxLayout*");
698 if (lua_getmetatable(L, -1)) {
699 lua_getfield(L, -1, "count");
700 lua_remove(L, -2);
701 } else {
702 lua_pushnil(L);
704 lua_insert(L, -2);
705 if (lua_isfunction(L, -0-2)) {
706 lua_pcall(L, 0+1, 2, 0);
707 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
708 lua_pop(L, 1);
710 if (!absorbed) {
711 lua_settop(L, oldtop);
712 return this->QBoxLayout::count();
714 int ret = lua_tointeger(L, -1);
715 lua_settop(L, oldtop);
716 return ret;
718 QRect LuaBinder< QVBoxLayout >::geometry () const {
719 bool absorbed = false;
720 int oldtop = lua_gettop(L);
721 lqtL_pushudata(L, this, "QVBoxLayout*");
722 if (lua_getmetatable(L, -1)) {
723 lua_getfield(L, -1, "geometry");
724 lua_remove(L, -2);
725 } else {
726 lua_pushnil(L);
728 lua_insert(L, -2);
729 if (lua_isfunction(L, -0-2)) {
730 lua_pcall(L, 0+1, 2, 0);
731 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
732 lua_pop(L, 1);
734 if (!absorbed) {
735 lua_settop(L, oldtop);
736 return this->QLayout::geometry();
738 QRect ret = **static_cast<QRect**>(lqtL_checkudata(L, -1, "QRect*"));
739 lua_settop(L, oldtop);
740 return ret;
742 QFlags<Qt::Orientation> LuaBinder< QVBoxLayout >::expandingDirections () const {
743 bool absorbed = false;
744 int oldtop = lua_gettop(L);
745 lqtL_pushudata(L, this, "QVBoxLayout*");
746 if (lua_getmetatable(L, -1)) {
747 lua_getfield(L, -1, "expandingDirections");
748 lua_remove(L, -2);
749 } else {
750 lua_pushnil(L);
752 lua_insert(L, -2);
753 if (lua_isfunction(L, -0-2)) {
754 lua_pcall(L, 0+1, 2, 0);
755 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
756 lua_pop(L, 1);
758 if (!absorbed) {
759 lua_settop(L, oldtop);
760 return this->QBoxLayout::expandingDirections();
762 QFlags<Qt::Orientation> ret = **static_cast<QFlags<Qt::Orientation>**>(lqtL_checkudata(L, -1, "QFlags<Qt::Orientation>*"));
763 lua_settop(L, oldtop);
764 return ret;
766 const QMetaObject * LuaBinder< QVBoxLayout >::metaObject () const {
767 bool absorbed = false;
768 int oldtop = lua_gettop(L);
769 lqtL_pushudata(L, this, "QVBoxLayout*");
770 if (lua_getmetatable(L, -1)) {
771 lua_getfield(L, -1, "metaObject");
772 lua_remove(L, -2);
773 } else {
774 lua_pushnil(L);
776 lua_insert(L, -2);
777 if (lua_isfunction(L, -0-2)) {
778 lua_pcall(L, 0+1, 2, 0);
779 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
780 lua_pop(L, 1);
782 if (!absorbed) {
783 lua_settop(L, oldtop);
784 return this->QVBoxLayout::metaObject();
786 const QMetaObject * ret = *static_cast<QMetaObject**>(lqtL_checkudata(L, -1, "QMetaObject*"));
787 lua_settop(L, oldtop);
788 return ret;
790 void LuaBinder< QVBoxLayout >::invalidate () {
791 bool absorbed = false;
792 int oldtop = lua_gettop(L);
793 lqtL_pushudata(L, this, "QVBoxLayout*");
794 if (lua_getmetatable(L, -1)) {
795 lua_getfield(L, -1, "invalidate");
796 lua_remove(L, -2);
797 } else {
798 lua_pushnil(L);
800 lua_insert(L, -2);
801 if (lua_isfunction(L, -0-2)) {
802 lua_pcall(L, 0+1, 2, 0);
803 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
804 lua_pop(L, 1);
806 if (!absorbed) {
807 lua_settop(L, oldtop);
808 this->QBoxLayout::invalidate();
810 lua_settop(L, oldtop);
812 void LuaBinder< QVBoxLayout >::customEvent (QEvent * arg1) {
813 bool absorbed = false;
814 int oldtop = lua_gettop(L);
815 lqtL_pushudata(L, this, "QVBoxLayout*");
816 if (lua_getmetatable(L, -1)) {
817 lua_getfield(L, -1, "customEvent");
818 lua_remove(L, -2);
819 } else {
820 lua_pushnil(L);
822 lua_insert(L, -2);
823 lqtL_pushudata(L, arg1, "QEvent*");
824 if (lua_isfunction(L, -1-2)) {
825 lua_pcall(L, 1+1, 2, 0);
826 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
827 lua_pop(L, 1);
829 if (!absorbed) {
830 lua_settop(L, oldtop);
831 this->QObject::customEvent(arg1);
833 lua_settop(L, oldtop);
835 LuaBinder< QVBoxLayout >:: ~LuaBinder< QVBoxLayout > () {
836 int oldtop = lua_gettop(L);
837 lqtL_pushudata(L, this, "QVBoxLayout*");
838 lua_getfield(L, -1, "~QVBoxLayout");
840 if (lua_isfunction(L, -1)) {
841 lua_insert(L, -2);
842 lua_pcall(L, 1, 1, 0);
843 } else {
845 lua_settop(L, oldtop);
847 int luaopen_QVBoxLayout (lua_State *L) {
848 if (luaL_newmetatable(L, "QVBoxLayout*")) {
849 lua_pushcfunction(L, LuaBinder< QVBoxLayout >::__LuaWrapCall__tr);
850 lua_setfield(L, -2, "tr");
851 lua_pushcfunction(L, LuaBinder< QVBoxLayout >::__LuaWrapCall__delete);
852 lua_setfield(L, -2, "delete");
853 lua_pushcfunction(L, LuaBinder< QVBoxLayout >::__LuaWrapCall__trUtf8);
854 lua_setfield(L, -2, "trUtf8");
855 lua_pushcfunction(L, LuaBinder< QVBoxLayout >::__LuaWrapCall__metaObject);
856 lua_setfield(L, -2, "metaObject");
857 lua_pushcfunction(L, LuaBinder< QVBoxLayout >::__LuaWrapCall__new);
858 lua_setfield(L, -2, "new");
859 lua_newtable(L);
860 lua_pushboolean(L, 1);
861 lua_setfield(L, -2, "QBoxLayout*");
862 lua_setfield(L, -2, "__base");
863 lua_pushcfunction(L, lqtL_newindex);
864 lua_setfield(L, -2, "__newindex");
865 lua_pushcfunction(L, lqtL_index);
866 lua_setfield(L, -2, "__index");
867 lua_pushcfunction(L, lqtL_gc);
868 lua_setfield(L, -2, "__gc");
869 lua_pushstring(L, "QVBoxLayout");
870 lua_setfield(L, -2, "__qtype");
872 lua_pop(L, 1);
873 return 0;