added "install" instruction
[Leditor.git] / src / lqt_bind_QLayoutItem.cpp
blob274bcc54938cd9b4b7b8d6f7466ddd383c19120d
1 #include "lqt_bind_QLayoutItem.hpp"
3 int LuaBinder< QLayoutItem >::__LuaWrapCall__invalidate (lua_State *L) {
4 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
5 if (__lua__obj==0) {
6 lua_pushstring(L, "trying to reference deleted pointer");
7 lua_error(L);
8 return 0;
10 __lua__obj->QLayoutItem::invalidate();
11 return 0;
13 int LuaBinder< QLayoutItem >::__LuaWrapCall__controlTypes (lua_State *L) {
14 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
15 if (__lua__obj==0) {
16 lua_pushstring(L, "trying to reference deleted pointer");
17 lua_error(L);
18 return 0;
20 QFlags<QSizePolicy::ControlType> ret = __lua__obj->QLayoutItem::controlTypes();
21 lqtL_passudata(L, new QFlags<QSizePolicy::ControlType>(ret), "QFlags<QSizePolicy::ControlType>*");
22 return 1;
24 int LuaBinder< QLayoutItem >::__LuaWrapCall__heightForWidth (lua_State *L) {
25 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
26 if (__lua__obj==0) {
27 lua_pushstring(L, "trying to reference deleted pointer");
28 lua_error(L);
29 return 0;
31 int arg1 = lua_tointeger(L, 2);
32 int ret = __lua__obj->QLayoutItem::heightForWidth(arg1);
33 lua_pushinteger(L, ret);
34 return 1;
36 int LuaBinder< QLayoutItem >::__LuaWrapCall__spacerItem (lua_State *L) {
37 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
38 if (__lua__obj==0) {
39 lua_pushstring(L, "trying to reference deleted pointer");
40 lua_error(L);
41 return 0;
43 QSpacerItem * ret = __lua__obj->QLayoutItem::spacerItem();
44 lqtL_pushudata(L, ret, "QSpacerItem*");
45 return 1;
47 int LuaBinder< QLayoutItem >::__LuaWrapCall__delete (lua_State *L) {
48 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
49 if (__lua__obj==0) {
50 lua_pushstring(L, "trying to reference deleted pointer");
51 lua_error(L);
52 return 0;
54 delete __lua__obj;
55 __lua__obj = 0;
56 return 0;
58 int LuaBinder< QLayoutItem >::__LuaWrapCall__layout (lua_State *L) {
59 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
60 if (__lua__obj==0) {
61 lua_pushstring(L, "trying to reference deleted pointer");
62 lua_error(L);
63 return 0;
65 QLayout * ret = __lua__obj->QLayoutItem::layout();
66 lqtL_pushudata(L, ret, "QLayout*");
67 return 1;
69 int LuaBinder< QLayoutItem >::__LuaWrapCall__setAlignment (lua_State *L) {
70 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
71 if (__lua__obj==0) {
72 lua_pushstring(L, "trying to reference deleted pointer");
73 lua_error(L);
74 return 0;
76 QFlags<Qt::AlignmentFlag> arg1 = **static_cast<QFlags<Qt::AlignmentFlag>**>(lqtL_checkudata(L, 2, "QFlags<Qt::AlignmentFlag>*"));
77 __lua__obj->QLayoutItem::setAlignment(arg1);
78 return 0;
80 int LuaBinder< QLayoutItem >::__LuaWrapCall__minimumHeightForWidth (lua_State *L) {
81 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
82 if (__lua__obj==0) {
83 lua_pushstring(L, "trying to reference deleted pointer");
84 lua_error(L);
85 return 0;
87 int arg1 = lua_tointeger(L, 2);
88 int ret = __lua__obj->QLayoutItem::minimumHeightForWidth(arg1);
89 lua_pushinteger(L, ret);
90 return 1;
92 int LuaBinder< QLayoutItem >::__LuaWrapCall__alignment (lua_State *L) {
93 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
94 if (__lua__obj==0) {
95 lua_pushstring(L, "trying to reference deleted pointer");
96 lua_error(L);
97 return 0;
99 QFlags<Qt::AlignmentFlag> ret = __lua__obj->QLayoutItem::alignment();
100 lqtL_passudata(L, new QFlags<Qt::AlignmentFlag>(ret), "QFlags<Qt::AlignmentFlag>*");
101 return 1;
103 int LuaBinder< QLayoutItem >::__LuaWrapCall__widget (lua_State *L) {
104 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
105 if (__lua__obj==0) {
106 lua_pushstring(L, "trying to reference deleted pointer");
107 lua_error(L);
108 return 0;
110 QWidget * ret = __lua__obj->QLayoutItem::widget();
111 lqtL_pushudata(L, ret, "QWidget*");
112 return 1;
114 int LuaBinder< QLayoutItem >::__LuaWrapCall__hasHeightForWidth (lua_State *L) {
115 QLayoutItem *& __lua__obj = *static_cast<QLayoutItem**>(lqtL_checkudata(L, 1, "QLayoutItem*"));
116 if (__lua__obj==0) {
117 lua_pushstring(L, "trying to reference deleted pointer");
118 lua_error(L);
119 return 0;
121 bool ret = __lua__obj->QLayoutItem::hasHeightForWidth();
122 lua_pushboolean(L, ret);
123 return 1;
125 bool LuaBinder< QLayoutItem >::hasHeightForWidth () const {
126 bool absorbed = false;
127 int oldtop = lua_gettop(L);
128 lqtL_pushudata(L, this, "QLayoutItem*");
129 if (lua_getmetatable(L, -1)) {
130 lua_getfield(L, -1, "hasHeightForWidth");
131 lua_remove(L, -2);
132 } else {
133 lua_pushnil(L);
135 lua_insert(L, -2);
136 if (lua_isfunction(L, -0-2)) {
137 lua_pcall(L, 0+1, 2, 0);
138 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
139 lua_pop(L, 1);
141 if (!absorbed) {
142 lua_settop(L, oldtop);
143 return this->QLayoutItem::hasHeightForWidth();
145 bool ret = (bool)lua_toboolean(L, -1);
146 lua_settop(L, oldtop);
147 return ret;
149 QLayout * LuaBinder< QLayoutItem >::layout () {
150 bool absorbed = false;
151 int oldtop = lua_gettop(L);
152 lqtL_pushudata(L, this, "QLayoutItem*");
153 if (lua_getmetatable(L, -1)) {
154 lua_getfield(L, -1, "layout");
155 lua_remove(L, -2);
156 } else {
157 lua_pushnil(L);
159 lua_insert(L, -2);
160 if (lua_isfunction(L, -0-2)) {
161 lua_pcall(L, 0+1, 2, 0);
162 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
163 lua_pop(L, 1);
165 if (!absorbed) {
166 lua_settop(L, oldtop);
167 return this->QLayoutItem::layout();
169 QLayout * ret = *static_cast<QLayout**>(lqtL_checkudata(L, -1, "QLayout*"));
170 lua_settop(L, oldtop);
171 return ret;
173 QSpacerItem * LuaBinder< QLayoutItem >::spacerItem () {
174 bool absorbed = false;
175 int oldtop = lua_gettop(L);
176 lqtL_pushudata(L, this, "QLayoutItem*");
177 if (lua_getmetatable(L, -1)) {
178 lua_getfield(L, -1, "spacerItem");
179 lua_remove(L, -2);
180 } else {
181 lua_pushnil(L);
183 lua_insert(L, -2);
184 if (lua_isfunction(L, -0-2)) {
185 lua_pcall(L, 0+1, 2, 0);
186 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
187 lua_pop(L, 1);
189 if (!absorbed) {
190 lua_settop(L, oldtop);
191 return this->QLayoutItem::spacerItem();
193 QSpacerItem * ret = *static_cast<QSpacerItem**>(lqtL_checkudata(L, -1, "QSpacerItem*"));
194 lua_settop(L, oldtop);
195 return ret;
197 QSize LuaBinder< QLayoutItem >::sizeHint () const {
198 bool absorbed = false;
199 int oldtop = lua_gettop(L);
200 lqtL_pushudata(L, this, "QLayoutItem*");
201 if (lua_getmetatable(L, -1)) {
202 lua_getfield(L, -1, "sizeHint");
203 lua_remove(L, -2);
204 } else {
205 lua_pushnil(L);
207 lua_insert(L, -2);
208 if (lua_isfunction(L, -0-2)) {
209 lua_pcall(L, 0+1, 2, 0);
210 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
211 lua_pop(L, 1);
213 if (!absorbed) {
214 lua_settop(L, oldtop);
216 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
217 lua_settop(L, oldtop);
218 return ret;
220 void LuaBinder< QLayoutItem >::setGeometry (const QRect& arg1) {
221 bool absorbed = false;
222 int oldtop = lua_gettop(L);
223 lqtL_pushudata(L, this, "QLayoutItem*");
224 if (lua_getmetatable(L, -1)) {
225 lua_getfield(L, -1, "setGeometry");
226 lua_remove(L, -2);
227 } else {
228 lua_pushnil(L);
230 lua_insert(L, -2);
231 lqtL_pushudata(L, &(arg1), "QRect*");
232 if (lua_isfunction(L, -1-2)) {
233 lua_pcall(L, 1+1, 2, 0);
234 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
235 lua_pop(L, 1);
237 if (!absorbed) {
238 lua_settop(L, oldtop);
240 lua_settop(L, oldtop);
242 QSize LuaBinder< QLayoutItem >::minimumSize () const {
243 bool absorbed = false;
244 int oldtop = lua_gettop(L);
245 lqtL_pushudata(L, this, "QLayoutItem*");
246 if (lua_getmetatable(L, -1)) {
247 lua_getfield(L, -1, "minimumSize");
248 lua_remove(L, -2);
249 } else {
250 lua_pushnil(L);
252 lua_insert(L, -2);
253 if (lua_isfunction(L, -0-2)) {
254 lua_pcall(L, 0+1, 2, 0);
255 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
256 lua_pop(L, 1);
258 if (!absorbed) {
259 lua_settop(L, oldtop);
261 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
262 lua_settop(L, oldtop);
263 return ret;
265 int LuaBinder< QLayoutItem >::heightForWidth (int arg1) const {
266 bool absorbed = false;
267 int oldtop = lua_gettop(L);
268 lqtL_pushudata(L, this, "QLayoutItem*");
269 if (lua_getmetatable(L, -1)) {
270 lua_getfield(L, -1, "heightForWidth");
271 lua_remove(L, -2);
272 } else {
273 lua_pushnil(L);
275 lua_insert(L, -2);
276 lua_pushinteger(L, arg1);
277 if (lua_isfunction(L, -1-2)) {
278 lua_pcall(L, 1+1, 2, 0);
279 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
280 lua_pop(L, 1);
282 if (!absorbed) {
283 lua_settop(L, oldtop);
284 return this->QLayoutItem::heightForWidth(arg1);
286 int ret = lua_tointeger(L, -1);
287 lua_settop(L, oldtop);
288 return ret;
290 QWidget * LuaBinder< QLayoutItem >::widget () {
291 bool absorbed = false;
292 int oldtop = lua_gettop(L);
293 lqtL_pushudata(L, this, "QLayoutItem*");
294 if (lua_getmetatable(L, -1)) {
295 lua_getfield(L, -1, "widget");
296 lua_remove(L, -2);
297 } else {
298 lua_pushnil(L);
300 lua_insert(L, -2);
301 if (lua_isfunction(L, -0-2)) {
302 lua_pcall(L, 0+1, 2, 0);
303 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
304 lua_pop(L, 1);
306 if (!absorbed) {
307 lua_settop(L, oldtop);
308 return this->QLayoutItem::widget();
310 QWidget * ret = *static_cast<QWidget**>(lqtL_checkudata(L, -1, "QWidget*"));
311 lua_settop(L, oldtop);
312 return ret;
314 bool LuaBinder< QLayoutItem >::isEmpty () const {
315 bool absorbed = false;
316 int oldtop = lua_gettop(L);
317 lqtL_pushudata(L, this, "QLayoutItem*");
318 if (lua_getmetatable(L, -1)) {
319 lua_getfield(L, -1, "isEmpty");
320 lua_remove(L, -2);
321 } else {
322 lua_pushnil(L);
324 lua_insert(L, -2);
325 if (lua_isfunction(L, -0-2)) {
326 lua_pcall(L, 0+1, 2, 0);
327 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
328 lua_pop(L, 1);
330 if (!absorbed) {
331 lua_settop(L, oldtop);
333 bool ret = (bool)lua_toboolean(L, -1);
334 lua_settop(L, oldtop);
335 return ret;
337 void LuaBinder< QLayoutItem >::invalidate () {
338 bool absorbed = false;
339 int oldtop = lua_gettop(L);
340 lqtL_pushudata(L, this, "QLayoutItem*");
341 if (lua_getmetatable(L, -1)) {
342 lua_getfield(L, -1, "invalidate");
343 lua_remove(L, -2);
344 } else {
345 lua_pushnil(L);
347 lua_insert(L, -2);
348 if (lua_isfunction(L, -0-2)) {
349 lua_pcall(L, 0+1, 2, 0);
350 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
351 lua_pop(L, 1);
353 if (!absorbed) {
354 lua_settop(L, oldtop);
355 this->QLayoutItem::invalidate();
357 lua_settop(L, oldtop);
359 QFlags<Qt::Orientation> LuaBinder< QLayoutItem >::expandingDirections () const {
360 bool absorbed = false;
361 int oldtop = lua_gettop(L);
362 lqtL_pushudata(L, this, "QLayoutItem*");
363 if (lua_getmetatable(L, -1)) {
364 lua_getfield(L, -1, "expandingDirections");
365 lua_remove(L, -2);
366 } else {
367 lua_pushnil(L);
369 lua_insert(L, -2);
370 if (lua_isfunction(L, -0-2)) {
371 lua_pcall(L, 0+1, 2, 0);
372 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
373 lua_pop(L, 1);
375 if (!absorbed) {
376 lua_settop(L, oldtop);
378 QFlags<Qt::Orientation> ret = **static_cast<QFlags<Qt::Orientation>**>(lqtL_checkudata(L, -1, "QFlags<Qt::Orientation>*"));
379 lua_settop(L, oldtop);
380 return ret;
382 QRect LuaBinder< QLayoutItem >::geometry () const {
383 bool absorbed = false;
384 int oldtop = lua_gettop(L);
385 lqtL_pushudata(L, this, "QLayoutItem*");
386 if (lua_getmetatable(L, -1)) {
387 lua_getfield(L, -1, "geometry");
388 lua_remove(L, -2);
389 } else {
390 lua_pushnil(L);
392 lua_insert(L, -2);
393 if (lua_isfunction(L, -0-2)) {
394 lua_pcall(L, 0+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);
401 QRect ret = **static_cast<QRect**>(lqtL_checkudata(L, -1, "QRect*"));
402 lua_settop(L, oldtop);
403 return ret;
405 int LuaBinder< QLayoutItem >::minimumHeightForWidth (int arg1) const {
406 bool absorbed = false;
407 int oldtop = lua_gettop(L);
408 lqtL_pushudata(L, this, "QLayoutItem*");
409 if (lua_getmetatable(L, -1)) {
410 lua_getfield(L, -1, "minimumHeightForWidth");
411 lua_remove(L, -2);
412 } else {
413 lua_pushnil(L);
415 lua_insert(L, -2);
416 lua_pushinteger(L, arg1);
417 if (lua_isfunction(L, -1-2)) {
418 lua_pcall(L, 1+1, 2, 0);
419 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
420 lua_pop(L, 1);
422 if (!absorbed) {
423 lua_settop(L, oldtop);
424 return this->QLayoutItem::minimumHeightForWidth(arg1);
426 int ret = lua_tointeger(L, -1);
427 lua_settop(L, oldtop);
428 return ret;
430 QSize LuaBinder< QLayoutItem >::maximumSize () const {
431 bool absorbed = false;
432 int oldtop = lua_gettop(L);
433 lqtL_pushudata(L, this, "QLayoutItem*");
434 if (lua_getmetatable(L, -1)) {
435 lua_getfield(L, -1, "maximumSize");
436 lua_remove(L, -2);
437 } else {
438 lua_pushnil(L);
440 lua_insert(L, -2);
441 if (lua_isfunction(L, -0-2)) {
442 lua_pcall(L, 0+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);
449 QSize ret = **static_cast<QSize**>(lqtL_checkudata(L, -1, "QSize*"));
450 lua_settop(L, oldtop);
451 return ret;
453 LuaBinder< QLayoutItem >:: ~LuaBinder< QLayoutItem > () {
454 int oldtop = lua_gettop(L);
455 lqtL_pushudata(L, this, "QLayoutItem*");
456 lua_getfield(L, -1, "~QLayoutItem");
458 if (lua_isfunction(L, -1)) {
459 lua_insert(L, -2);
460 lua_pcall(L, 1, 1, 0);
461 } else {
463 lua_settop(L, oldtop);
465 int luaopen_QLayoutItem (lua_State *L) {
466 if (luaL_newmetatable(L, "QLayoutItem*")) {
467 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__invalidate);
468 lua_setfield(L, -2, "invalidate");
469 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__controlTypes);
470 lua_setfield(L, -2, "controlTypes");
471 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__heightForWidth);
472 lua_setfield(L, -2, "heightForWidth");
473 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__spacerItem);
474 lua_setfield(L, -2, "spacerItem");
475 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__delete);
476 lua_setfield(L, -2, "delete");
477 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__layout);
478 lua_setfield(L, -2, "layout");
479 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__setAlignment);
480 lua_setfield(L, -2, "setAlignment");
481 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__minimumHeightForWidth);
482 lua_setfield(L, -2, "minimumHeightForWidth");
483 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__alignment);
484 lua_setfield(L, -2, "alignment");
485 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__widget);
486 lua_setfield(L, -2, "widget");
487 lua_pushcfunction(L, LuaBinder< QLayoutItem >::__LuaWrapCall__hasHeightForWidth);
488 lua_setfield(L, -2, "hasHeightForWidth");
489 lua_newtable(L);
490 lua_setfield(L, -2, "__base");
491 lua_pushcfunction(L, lqtL_newindex);
492 lua_setfield(L, -2, "__newindex");
493 lua_pushcfunction(L, lqtL_index);
494 lua_setfield(L, -2, "__index");
495 lua_pushcfunction(L, lqtL_gc);
496 lua_setfield(L, -2, "__gc");
497 lua_pushstring(L, "QLayoutItem");
498 lua_setfield(L, -2, "__qtype");
499 lua_setglobal(L, "QLayoutItem");
500 } else {
501 lua_pop(L, 1);
503 return 0;