1 #include "lqt_bind_QIcon.hpp"
3 int LuaBinder
< QIcon
>::__LuaWrapCall__paint__OverloadedVersion__1 (lua_State
*L
) {
4 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
6 lua_pushstring(L
, "trying to reference deleted pointer");
10 QPainter
* arg1
= *static_cast<QPainter
**>(lqtL_checkudata(L
, 2, "QPainter*"));
11 const QRect
& arg2
= **static_cast<QRect
**>(lqtL_checkudata(L
, 3, "QRect*"));
12 QFlags
<Qt::AlignmentFlag
> arg3
= lqtL_testudata(L
, 4, "QFlags<Qt::AlignmentFlag>*")?**static_cast<QFlags
<Qt::AlignmentFlag
>**>(lqtL_checkudata(L
, 4, "QFlags<Qt::AlignmentFlag>*")):Qt::AlignCenter
;
13 QIcon::Mode arg4
= lqtL_isenum(L
, 5, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 5, "QIcon::Mode")):QIcon::Normal
;
14 QIcon::State arg5
= lqtL_isenum(L
, 6, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 6, "QIcon::State")):QIcon::Off
;
15 __lua__obj
->QIcon::paint(arg1
, arg2
, arg3
, arg4
, arg5
);
18 int LuaBinder
< QIcon
>::__LuaWrapCall__paint__OverloadedVersion__2 (lua_State
*L
) {
19 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
21 lua_pushstring(L
, "trying to reference deleted pointer");
25 QPainter
* arg1
= *static_cast<QPainter
**>(lqtL_checkudata(L
, 2, "QPainter*"));
26 int arg2
= lua_tointeger(L
, 3);
27 int arg3
= lua_tointeger(L
, 4);
28 int arg4
= lua_tointeger(L
, 5);
29 int arg5
= lua_tointeger(L
, 6);
30 QFlags
<Qt::AlignmentFlag
> arg6
= lqtL_testudata(L
, 7, "QFlags<Qt::AlignmentFlag>*")?**static_cast<QFlags
<Qt::AlignmentFlag
>**>(lqtL_checkudata(L
, 7, "QFlags<Qt::AlignmentFlag>*")):Qt::AlignCenter
;
31 QIcon::Mode arg7
= lqtL_isenum(L
, 8, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 8, "QIcon::Mode")):QIcon::Normal
;
32 QIcon::State arg8
= lqtL_isenum(L
, 9, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 9, "QIcon::State")):QIcon::Off
;
33 __lua__obj
->QIcon::paint(arg1
, arg2
, arg3
, arg4
, arg5
, arg6
, arg7
, arg8
);
36 int LuaBinder
< QIcon
>::__LuaWrapCall__paint (lua_State
*L
) {
38 const int premium
= 11+lua_gettop(L
);
40 score
[1] += lqtL_testudata(L
, 1, "QIcon*")?premium
:-premium
*premium
;
41 if (lqtL_testudata(L
, 2, "QPainter*")) {
44 score
[1] += premium
-1; // table: 0x13b2170;
46 score
[1] -= premium
*premium
;
48 if (lqtL_testudata(L
, 3, "QRect*")) {
51 score
[1] += premium
-1; // table: 0x13b1770;
53 score
[1] -= premium
*premium
;
55 if (lqtL_testudata(L
, 4, "QFlags<Qt::AlignmentFlag>*")) {
58 score
[1] += premium
-1; // table: 0x13b2660;
60 score
[1] -= premium
*premium
;
62 if (lqtL_isenum(L
, 5, "QIcon::Mode")) {
65 score
[1] += premium
-1; // table: 0x13b2a20;
67 score
[1] -= premium
*premium
;
69 if (lqtL_isenum(L
, 6, "QIcon::State")) {
72 score
[1] += premium
-1; // table: 0x13b3310;
74 score
[1] -= premium
*premium
;
77 score
[2] += lqtL_testudata(L
, 1, "QIcon*")?premium
:-premium
*premium
;
78 if (lqtL_testudata(L
, 2, "QPainter*")) {
81 score
[2] += premium
-1; // table: 0x13b3c70;
83 score
[2] -= premium
*premium
;
85 if (lua_isnumber(L
, 3)) {
88 score
[2] += premium
-1; // table: 0x13b41c0;
90 score
[2] -= premium
*premium
;
92 if (lua_isnumber(L
, 4)) {
95 score
[2] += premium
-1; // table: 0x13b4570;
97 score
[2] -= premium
*premium
;
99 if (lua_isnumber(L
, 5)) {
102 score
[2] += premium
-1; // table: 0x13b4510;
104 score
[2] -= premium
*premium
;
106 if (lua_isnumber(L
, 6)) {
109 score
[2] += premium
-1; // table: 0x13b4d20;
111 score
[2] -= premium
*premium
;
113 if (lqtL_testudata(L
, 7, "QFlags<Qt::AlignmentFlag>*")) {
116 score
[2] += premium
-1; // table: 0x13b48f0;
118 score
[2] -= premium
*premium
;
120 if (lqtL_isenum(L
, 8, "QIcon::Mode")) {
123 score
[2] += premium
-1; // table: 0x13b5520;
125 score
[2] -= premium
*premium
;
127 if (lqtL_isenum(L
, 9, "QIcon::State")) {
130 score
[2] += premium
-1; // table: 0x13b58d0;
132 score
[2] -= premium
*premium
;
135 for (int i
=1;i
<=2;i
++) {
136 if (score
[best
] < score
[i
]) { best
= i
; }
139 case 1: return __LuaWrapCall__paint__OverloadedVersion__1(L
); break;
140 case 2: return __LuaWrapCall__paint__OverloadedVersion__2(L
); break;
142 lua_pushstring(L
, "no overload of function __LuaWrapCall__paint matching arguments");
146 int LuaBinder
< QIcon
>::__LuaWrapCall__serialNumber (lua_State
*L
) {
147 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
149 lua_pushstring(L
, "trying to reference deleted pointer");
153 int ret
= __lua__obj
->QIcon::serialNumber();
154 lua_pushinteger(L
, ret
);
157 int LuaBinder
< QIcon
>::__LuaWrapCall__addFile (lua_State
*L
) {
158 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
160 lua_pushstring(L
, "trying to reference deleted pointer");
164 const QString
& arg1
= QString::fromAscii(lua_tostring(L
, 2), lua_objlen(L
, 2));
165 const QSize
& arg2
= lqtL_testudata(L
, 3, "QSize*")?**static_cast<QSize
**>(lqtL_checkudata(L
, 3, "QSize*")):QSize();
166 QIcon::Mode arg3
= lqtL_isenum(L
, 4, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 4, "QIcon::Mode")):QIcon::Normal
;
167 QIcon::State arg4
= lqtL_isenum(L
, 5, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 5, "QIcon::State")):QIcon::Off
;
168 __lua__obj
->QIcon::addFile(arg1
, arg2
, arg3
, arg4
);
171 int LuaBinder
< QIcon
>::__LuaWrapCall__detach (lua_State
*L
) {
172 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
174 lua_pushstring(L
, "trying to reference deleted pointer");
178 __lua__obj
->QIcon::detach();
181 int LuaBinder
< QIcon
>::__LuaWrapCall__cacheKey (lua_State
*L
) {
182 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
184 lua_pushstring(L
, "trying to reference deleted pointer");
188 long long int ret
= __lua__obj
->QIcon::cacheKey();
189 lua_pushinteger(L
, ret
);
192 int LuaBinder
< QIcon
>::__LuaWrapCall__actualSize (lua_State
*L
) {
193 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
195 lua_pushstring(L
, "trying to reference deleted pointer");
199 const QSize
& arg1
= **static_cast<QSize
**>(lqtL_checkudata(L
, 2, "QSize*"));
200 QIcon::Mode arg2
= lqtL_isenum(L
, 3, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 3, "QIcon::Mode")):QIcon::Normal
;
201 QIcon::State arg3
= lqtL_isenum(L
, 4, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 4, "QIcon::State")):QIcon::Off
;
202 QSize ret
= __lua__obj
->QIcon::actualSize(arg1
, arg2
, arg3
);
203 lqtL_passudata(L
, new QSize(ret
), "QSize*");
206 int LuaBinder
< QIcon
>::__LuaWrapCall__delete (lua_State
*L
) {
207 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
209 lua_pushstring(L
, "trying to reference deleted pointer");
217 int LuaBinder
< QIcon
>::__LuaWrapCall__isNull (lua_State
*L
) {
218 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
220 lua_pushstring(L
, "trying to reference deleted pointer");
224 bool ret
= __lua__obj
->QIcon::isNull();
225 lua_pushboolean(L
, ret
);
228 int LuaBinder
< QIcon
>::__LuaWrapCall__addPixmap (lua_State
*L
) {
229 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
231 lua_pushstring(L
, "trying to reference deleted pointer");
235 const QPixmap
& arg1
= **static_cast<QPixmap
**>(lqtL_checkudata(L
, 2, "QPixmap*"));
236 QIcon::Mode arg2
= lqtL_isenum(L
, 3, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 3, "QIcon::Mode")):QIcon::Normal
;
237 QIcon::State arg3
= lqtL_isenum(L
, 4, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 4, "QIcon::State")):QIcon::Off
;
238 __lua__obj
->QIcon::addPixmap(arg1
, arg2
, arg3
);
241 int LuaBinder
< QIcon
>::__LuaWrapCall__isDetached (lua_State
*L
) {
242 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
244 lua_pushstring(L
, "trying to reference deleted pointer");
248 bool ret
= __lua__obj
->QIcon::isDetached();
249 lua_pushboolean(L
, ret
);
252 int LuaBinder
< QIcon
>::__LuaWrapCall__pixmap__OverloadedVersion__1 (lua_State
*L
) {
253 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
255 lua_pushstring(L
, "trying to reference deleted pointer");
259 const QSize
& arg1
= **static_cast<QSize
**>(lqtL_checkudata(L
, 2, "QSize*"));
260 QIcon::Mode arg2
= lqtL_isenum(L
, 3, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 3, "QIcon::Mode")):QIcon::Normal
;
261 QIcon::State arg3
= lqtL_isenum(L
, 4, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 4, "QIcon::State")):QIcon::Off
;
262 QPixmap ret
= __lua__obj
->QIcon::pixmap(arg1
, arg2
, arg3
);
263 lqtL_passudata(L
, new QPixmap(ret
), "QPixmap*");
266 int LuaBinder
< QIcon
>::__LuaWrapCall__pixmap__OverloadedVersion__2 (lua_State
*L
) {
267 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
269 lua_pushstring(L
, "trying to reference deleted pointer");
273 int arg1
= lua_tointeger(L
, 2);
274 int arg2
= lua_tointeger(L
, 3);
275 QIcon::Mode arg3
= lqtL_isenum(L
, 4, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 4, "QIcon::Mode")):QIcon::Normal
;
276 QIcon::State arg4
= lqtL_isenum(L
, 5, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 5, "QIcon::State")):QIcon::Off
;
277 QPixmap ret
= __lua__obj
->QIcon::pixmap(arg1
, arg2
, arg3
, arg4
);
278 lqtL_passudata(L
, new QPixmap(ret
), "QPixmap*");
281 int LuaBinder
< QIcon
>::__LuaWrapCall__pixmap__OverloadedVersion__3 (lua_State
*L
) {
282 QIcon
*& __lua__obj
= *static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
284 lua_pushstring(L
, "trying to reference deleted pointer");
288 int arg1
= lua_tointeger(L
, 2);
289 QIcon::Mode arg2
= lqtL_isenum(L
, 3, "QIcon::Mode")?static_cast<QIcon::Mode
>(lqtL_toenum(L
, 3, "QIcon::Mode")):QIcon::Normal
;
290 QIcon::State arg3
= lqtL_isenum(L
, 4, "QIcon::State")?static_cast<QIcon::State
>(lqtL_toenum(L
, 4, "QIcon::State")):QIcon::Off
;
291 QPixmap ret
= __lua__obj
->QIcon::pixmap(arg1
, arg2
, arg3
);
292 lqtL_passudata(L
, new QPixmap(ret
), "QPixmap*");
295 int LuaBinder
< QIcon
>::__LuaWrapCall__pixmap (lua_State
*L
) {
297 const int premium
= 11+lua_gettop(L
);
299 score
[1] += lqtL_testudata(L
, 1, "QIcon*")?premium
:-premium
*premium
;
300 if (lqtL_testudata(L
, 2, "QSize*")) {
303 score
[1] += premium
-1; // table: 0x13ad280;
305 score
[1] -= premium
*premium
;
307 if (lqtL_isenum(L
, 3, "QIcon::Mode")) {
310 score
[1] += premium
-1; // table: 0x13accb0;
312 score
[1] -= premium
*premium
;
314 if (lqtL_isenum(L
, 4, "QIcon::State")) {
317 score
[1] += premium
-1; // table: 0x13ad730;
319 score
[1] -= premium
*premium
;
322 score
[2] += lqtL_testudata(L
, 1, "QIcon*")?premium
:-premium
*premium
;
323 if (lua_isnumber(L
, 2)) {
326 score
[2] += premium
-1; // table: 0x13ae5b0;
328 score
[2] -= premium
*premium
;
330 if (lua_isnumber(L
, 3)) {
333 score
[2] += premium
-1; // table: 0x13aeac0;
335 score
[2] -= premium
*premium
;
337 if (lqtL_isenum(L
, 4, "QIcon::Mode")) {
340 score
[2] += premium
-1; // table: 0x13aea60;
342 score
[2] -= premium
*premium
;
344 if (lqtL_isenum(L
, 5, "QIcon::State")) {
347 score
[2] += premium
-1; // table: 0x13af2c0;
349 score
[2] -= premium
*premium
;
352 score
[3] += lqtL_testudata(L
, 1, "QIcon*")?premium
:-premium
*premium
;
353 if (lua_isnumber(L
, 2)) {
356 score
[3] += premium
-1; // table: 0x13afbc0;
358 score
[3] -= premium
*premium
;
360 if (lqtL_isenum(L
, 3, "QIcon::Mode")) {
363 score
[3] += premium
-1; // table: 0x13af8b0;
365 score
[3] -= premium
*premium
;
367 if (lqtL_isenum(L
, 4, "QIcon::State")) {
370 score
[3] += premium
-1; // table: 0x13b00d0;
372 score
[3] -= premium
*premium
;
375 for (int i
=1;i
<=3;i
++) {
376 if (score
[best
] < score
[i
]) { best
= i
; }
379 case 1: return __LuaWrapCall__pixmap__OverloadedVersion__1(L
); break;
380 case 2: return __LuaWrapCall__pixmap__OverloadedVersion__2(L
); break;
381 case 3: return __LuaWrapCall__pixmap__OverloadedVersion__3(L
); break;
383 lua_pushstring(L
, "no overload of function __LuaWrapCall__pixmap matching arguments");
387 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__1 (lua_State
*L
) {
388 QIcon
* ret
= new LuaBinder
< QIcon
>(L
);
389 lqtL_passudata(L
, ret
, "QIcon*");
392 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__2 (lua_State
*L
) {
393 const QPixmap
& arg1
= **static_cast<QPixmap
**>(lqtL_checkudata(L
, 1, "QPixmap*"));
394 QIcon
* ret
= new LuaBinder
< QIcon
>(L
, arg1
);
395 lqtL_passudata(L
, ret
, "QIcon*");
398 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__3 (lua_State
*L
) {
399 const QIcon
& arg1
= **static_cast<QIcon
**>(lqtL_checkudata(L
, 1, "QIcon*"));
400 QIcon
* ret
= new LuaBinder
< QIcon
>(L
, arg1
);
401 lqtL_passudata(L
, ret
, "QIcon*");
404 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__4 (lua_State
*L
) {
405 const QString
& arg1
= QString::fromAscii(lua_tostring(L
, 1), lua_objlen(L
, 1));
406 QIcon
* ret
= new LuaBinder
< QIcon
>(L
, arg1
);
407 lqtL_passudata(L
, ret
, "QIcon*");
410 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__5 (lua_State
*L
) {
411 QIconEngine
* arg1
= *static_cast<QIconEngine
**>(lqtL_checkudata(L
, 1, "QIconEngine*"));
412 QIcon
* ret
= new LuaBinder
< QIcon
>(L
, arg1
);
413 lqtL_passudata(L
, ret
, "QIcon*");
416 int LuaBinder
< QIcon
>::__LuaWrapCall__new__OverloadedVersion__6 (lua_State
*L
) {
417 QIconEngineV2
* arg1
= *static_cast<QIconEngineV2
**>(lqtL_checkudata(L
, 1, "QIconEngineV2*"));
418 QIcon
* ret
= new LuaBinder
< QIcon
>(L
, arg1
);
419 lqtL_passudata(L
, ret
, "QIcon*");
422 int LuaBinder
< QIcon
>::__LuaWrapCall__new (lua_State
*L
) {
424 const int premium
= 11+lua_gettop(L
);
427 if (lqtL_testudata(L
, 1, "QPixmap*")) {
430 score
[2] += premium
-1; // table: 0x13a8710;
432 score
[2] -= premium
*premium
;
435 if (lqtL_testudata(L
, 1, "QIcon*")) {
438 score
[3] += premium
-1; // table: 0x13a90f0;
440 score
[3] -= premium
*premium
;
443 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
446 score
[4] += premium
-1; // table: 0x13a9b40;
448 score
[4] -= premium
*premium
;
451 if (lqtL_testudata(L
, 1, "QIconEngine*")) {
454 score
[5] += premium
-1; // table: 0x13aa5c0;
456 score
[5] -= premium
*premium
;
459 if (lqtL_testudata(L
, 1, "QIconEngineV2*")) {
462 score
[6] += premium
-1; // table: 0x13ab0c0;
464 score
[6] -= premium
*premium
;
467 for (int i
=1;i
<=6;i
++) {
468 if (score
[best
] < score
[i
]) { best
= i
; }
471 case 1: return __LuaWrapCall__new__OverloadedVersion__1(L
); break;
472 case 2: return __LuaWrapCall__new__OverloadedVersion__2(L
); break;
473 case 3: return __LuaWrapCall__new__OverloadedVersion__3(L
); break;
474 case 4: return __LuaWrapCall__new__OverloadedVersion__4(L
); break;
475 case 5: return __LuaWrapCall__new__OverloadedVersion__5(L
); break;
476 case 6: return __LuaWrapCall__new__OverloadedVersion__6(L
); break;
478 lua_pushstring(L
, "no overload of function __LuaWrapCall__new matching arguments");
482 int LuaBinder
< QIcon
>::lqt_pushenum_Mode (lua_State
*L
) {
484 lua_getfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
485 if (!lua_istable(L
, -1)) {
488 lua_pushvalue(L
, -1);
489 lua_setfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
492 enum_table
= lua_gettop(L
);
493 lua_pushstring(L
, "Normal");
494 lua_rawseti(L
, enum_table
, 0);
495 lua_pushinteger(L
, 0);
496 lua_setfield(L
, enum_table
, "Normal");
497 lua_pushstring(L
, "Disabled");
498 lua_rawseti(L
, enum_table
, 1);
499 lua_pushinteger(L
, 1);
500 lua_setfield(L
, enum_table
, "Disabled");
501 lua_pushstring(L
, "Active");
502 lua_rawseti(L
, enum_table
, 2);
503 lua_pushinteger(L
, 2);
504 lua_setfield(L
, enum_table
, "Active");
505 lua_pushstring(L
, "Selected");
506 lua_rawseti(L
, enum_table
, 3);
507 lua_pushinteger(L
, 3);
508 lua_setfield(L
, enum_table
, "Selected");
509 lua_pushcfunction(L
, LuaBinder
< QIcon
>::lqt_pushenum_Mode_QFLAGS_CREATOR
);
510 lua_setfield(L
, enum_table
, "QFlags");
511 lua_pushvalue(L
, -1);
512 lua_setfield(L
, -3, "QIcon::Mode");
516 int LuaBinder
< QIcon
>::lqt_pushenum_Mode_QFLAGS_CREATOR (lua_State
*L
) {
517 int argn
= lua_gettop(L
);
519 void *p
= lua_newuserdata(L
, sizeof(QFlags
<QIcon::Mode
>*) + sizeof(QFlags
<QIcon::Mode
>));
520 QFlags
<QIcon::Mode
> *fl
= static_cast<QFlags
<QIcon::Mode
>*>( static_cast<void*>(&static_cast<QFlags
<QIcon::Mode
>**>(p
)[1]) );
522 for (i
=1;i
<=argn
;i
++) {
523 *fl
|= static_cast<QIcon::Mode
>(lqtL_toenum(L
, i
, "QIcon::Mode"));
525 if (luaL_newmetatable(L
, "QFlags<QIcon::Mode>*")) {
526 lua_pushstring(L
, "QFlags<QIcon::Mode>*");
527 lua_setfield(L
, -2, "__qtype");
529 lua_setmetatable(L
, -2);
532 int LuaBinder
< QIcon
>::lqt_pushenum_State (lua_State
*L
) {
534 lua_getfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
535 if (!lua_istable(L
, -1)) {
538 lua_pushvalue(L
, -1);
539 lua_setfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
542 enum_table
= lua_gettop(L
);
543 lua_pushstring(L
, "On");
544 lua_rawseti(L
, enum_table
, 0);
545 lua_pushinteger(L
, 0);
546 lua_setfield(L
, enum_table
, "On");
547 lua_pushstring(L
, "Off");
548 lua_rawseti(L
, enum_table
, 1);
549 lua_pushinteger(L
, 1);
550 lua_setfield(L
, enum_table
, "Off");
551 lua_pushcfunction(L
, LuaBinder
< QIcon
>::lqt_pushenum_State_QFLAGS_CREATOR
);
552 lua_setfield(L
, enum_table
, "QFlags");
553 lua_pushvalue(L
, -1);
554 lua_setfield(L
, -3, "QIcon::State");
558 int LuaBinder
< QIcon
>::lqt_pushenum_State_QFLAGS_CREATOR (lua_State
*L
) {
559 int argn
= lua_gettop(L
);
561 void *p
= lua_newuserdata(L
, sizeof(QFlags
<QIcon::State
>*) + sizeof(QFlags
<QIcon::State
>));
562 QFlags
<QIcon::State
> *fl
= static_cast<QFlags
<QIcon::State
>*>( static_cast<void*>(&static_cast<QFlags
<QIcon::State
>**>(p
)[1]) );
564 for (i
=1;i
<=argn
;i
++) {
565 *fl
|= static_cast<QIcon::State
>(lqtL_toenum(L
, i
, "QIcon::State"));
567 if (luaL_newmetatable(L
, "QFlags<QIcon::State>*")) {
568 lua_pushstring(L
, "QFlags<QIcon::State>*");
569 lua_setfield(L
, -2, "__qtype");
571 lua_setmetatable(L
, -2);
574 int luaopen_QIcon (lua_State
*L
) {
575 if (luaL_newmetatable(L
, "QIcon*")) {
576 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__paint
);
577 lua_setfield(L
, -2, "paint");
578 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__serialNumber
);
579 lua_setfield(L
, -2, "serialNumber");
580 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__addFile
);
581 lua_setfield(L
, -2, "addFile");
582 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__detach
);
583 lua_setfield(L
, -2, "detach");
584 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__cacheKey
);
585 lua_setfield(L
, -2, "cacheKey");
586 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__actualSize
);
587 lua_setfield(L
, -2, "actualSize");
588 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__delete
);
589 lua_setfield(L
, -2, "delete");
590 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__isNull
);
591 lua_setfield(L
, -2, "isNull");
592 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__addPixmap
);
593 lua_setfield(L
, -2, "addPixmap");
594 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__isDetached
);
595 lua_setfield(L
, -2, "isDetached");
596 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__pixmap
);
597 lua_setfield(L
, -2, "pixmap");
598 lua_pushcfunction(L
, LuaBinder
< QIcon
>::__LuaWrapCall__new
);
599 lua_setfield(L
, -2, "new");
600 LuaBinder
< QIcon
>::lqt_pushenum_Mode(L
);
601 lua_setfield(L
, -2, "Mode");
602 LuaBinder
< QIcon
>::lqt_pushenum_State(L
);
603 lua_setfield(L
, -2, "State");
605 lua_setfield(L
, -2, "__base");
606 lua_pushcfunction(L
, lqtL_newindex
);
607 lua_setfield(L
, -2, "__newindex");
608 lua_pushcfunction(L
, lqtL_index
);
609 lua_setfield(L
, -2, "__index");
610 lua_pushcfunction(L
, lqtL_gc
);
611 lua_setfield(L
, -2, "__gc");
612 lua_pushstring(L
, "QIcon");
613 lua_setfield(L
, -2, "__qtype");
614 lua_setglobal(L
, "QIcon");