added "install" instruction
[Leditor.git] / src / lqt_bind_QIcon.cpp
blob85b88fb25858788b8e53bce146be359c9a50c18d
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*"));
5 if (__lua__obj==0) {
6 lua_pushstring(L, "trying to reference deleted pointer");
7 lua_error(L);
8 return 0;
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);
16 return 0;
18 int LuaBinder< QIcon >::__LuaWrapCall__paint__OverloadedVersion__2 (lua_State *L) {
19 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
20 if (__lua__obj==0) {
21 lua_pushstring(L, "trying to reference deleted pointer");
22 lua_error(L);
23 return 0;
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);
34 return 0;
36 int LuaBinder< QIcon >::__LuaWrapCall__paint (lua_State *L) {
37 int score[3];
38 const int premium = 11+lua_gettop(L);
39 score[1] = 0;
40 score[1] += lqtL_testudata(L, 1, "QIcon*")?premium:-premium*premium;
41 if (lqtL_testudata(L, 2, "QPainter*")) {
42 score[1] += premium;
43 } else if (false) {
44 score[1] += premium-1; // table: 0x13b2170;
45 } else {
46 score[1] -= premium*premium;
48 if (lqtL_testudata(L, 3, "QRect*")) {
49 score[1] += premium;
50 } else if (false) {
51 score[1] += premium-1; // table: 0x13b1770;
52 } else {
53 score[1] -= premium*premium;
55 if (lqtL_testudata(L, 4, "QFlags<Qt::AlignmentFlag>*")) {
56 score[1] += premium;
57 } else if (true) {
58 score[1] += premium-1; // table: 0x13b2660;
59 } else {
60 score[1] -= premium*premium;
62 if (lqtL_isenum(L, 5, "QIcon::Mode")) {
63 score[1] += premium;
64 } else if (true) {
65 score[1] += premium-1; // table: 0x13b2a20;
66 } else {
67 score[1] -= premium*premium;
69 if (lqtL_isenum(L, 6, "QIcon::State")) {
70 score[1] += premium;
71 } else if (true) {
72 score[1] += premium-1; // table: 0x13b3310;
73 } else {
74 score[1] -= premium*premium;
76 score[2] = 0;
77 score[2] += lqtL_testudata(L, 1, "QIcon*")?premium:-premium*premium;
78 if (lqtL_testudata(L, 2, "QPainter*")) {
79 score[2] += premium;
80 } else if (false) {
81 score[2] += premium-1; // table: 0x13b3c70;
82 } else {
83 score[2] -= premium*premium;
85 if (lua_isnumber(L, 3)) {
86 score[2] += premium;
87 } else if (false) {
88 score[2] += premium-1; // table: 0x13b41c0;
89 } else {
90 score[2] -= premium*premium;
92 if (lua_isnumber(L, 4)) {
93 score[2] += premium;
94 } else if (false) {
95 score[2] += premium-1; // table: 0x13b4570;
96 } else {
97 score[2] -= premium*premium;
99 if (lua_isnumber(L, 5)) {
100 score[2] += premium;
101 } else if (false) {
102 score[2] += premium-1; // table: 0x13b4510;
103 } else {
104 score[2] -= premium*premium;
106 if (lua_isnumber(L, 6)) {
107 score[2] += premium;
108 } else if (false) {
109 score[2] += premium-1; // table: 0x13b4d20;
110 } else {
111 score[2] -= premium*premium;
113 if (lqtL_testudata(L, 7, "QFlags<Qt::AlignmentFlag>*")) {
114 score[2] += premium;
115 } else if (true) {
116 score[2] += premium-1; // table: 0x13b48f0;
117 } else {
118 score[2] -= premium*premium;
120 if (lqtL_isenum(L, 8, "QIcon::Mode")) {
121 score[2] += premium;
122 } else if (true) {
123 score[2] += premium-1; // table: 0x13b5520;
124 } else {
125 score[2] -= premium*premium;
127 if (lqtL_isenum(L, 9, "QIcon::State")) {
128 score[2] += premium;
129 } else if (true) {
130 score[2] += premium-1; // table: 0x13b58d0;
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__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");
143 lua_error(L);
144 return 0;
146 int LuaBinder< QIcon >::__LuaWrapCall__serialNumber (lua_State *L) {
147 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
148 if (__lua__obj==0) {
149 lua_pushstring(L, "trying to reference deleted pointer");
150 lua_error(L);
151 return 0;
153 int ret = __lua__obj->QIcon::serialNumber();
154 lua_pushinteger(L, ret);
155 return 1;
157 int LuaBinder< QIcon >::__LuaWrapCall__addFile (lua_State *L) {
158 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
159 if (__lua__obj==0) {
160 lua_pushstring(L, "trying to reference deleted pointer");
161 lua_error(L);
162 return 0;
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);
169 return 0;
171 int LuaBinder< QIcon >::__LuaWrapCall__detach (lua_State *L) {
172 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
173 if (__lua__obj==0) {
174 lua_pushstring(L, "trying to reference deleted pointer");
175 lua_error(L);
176 return 0;
178 __lua__obj->QIcon::detach();
179 return 0;
181 int LuaBinder< QIcon >::__LuaWrapCall__cacheKey (lua_State *L) {
182 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
183 if (__lua__obj==0) {
184 lua_pushstring(L, "trying to reference deleted pointer");
185 lua_error(L);
186 return 0;
188 long long int ret = __lua__obj->QIcon::cacheKey();
189 lua_pushinteger(L, ret);
190 return 1;
192 int LuaBinder< QIcon >::__LuaWrapCall__actualSize (lua_State *L) {
193 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
194 if (__lua__obj==0) {
195 lua_pushstring(L, "trying to reference deleted pointer");
196 lua_error(L);
197 return 0;
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*");
204 return 1;
206 int LuaBinder< QIcon >::__LuaWrapCall__delete (lua_State *L) {
207 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
208 if (__lua__obj==0) {
209 lua_pushstring(L, "trying to reference deleted pointer");
210 lua_error(L);
211 return 0;
213 delete __lua__obj;
214 __lua__obj = 0;
215 return 0;
217 int LuaBinder< QIcon >::__LuaWrapCall__isNull (lua_State *L) {
218 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
219 if (__lua__obj==0) {
220 lua_pushstring(L, "trying to reference deleted pointer");
221 lua_error(L);
222 return 0;
224 bool ret = __lua__obj->QIcon::isNull();
225 lua_pushboolean(L, ret);
226 return 1;
228 int LuaBinder< QIcon >::__LuaWrapCall__addPixmap (lua_State *L) {
229 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
230 if (__lua__obj==0) {
231 lua_pushstring(L, "trying to reference deleted pointer");
232 lua_error(L);
233 return 0;
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);
239 return 0;
241 int LuaBinder< QIcon >::__LuaWrapCall__isDetached (lua_State *L) {
242 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
243 if (__lua__obj==0) {
244 lua_pushstring(L, "trying to reference deleted pointer");
245 lua_error(L);
246 return 0;
248 bool ret = __lua__obj->QIcon::isDetached();
249 lua_pushboolean(L, ret);
250 return 1;
252 int LuaBinder< QIcon >::__LuaWrapCall__pixmap__OverloadedVersion__1 (lua_State *L) {
253 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
254 if (__lua__obj==0) {
255 lua_pushstring(L, "trying to reference deleted pointer");
256 lua_error(L);
257 return 0;
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*");
264 return 1;
266 int LuaBinder< QIcon >::__LuaWrapCall__pixmap__OverloadedVersion__2 (lua_State *L) {
267 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
268 if (__lua__obj==0) {
269 lua_pushstring(L, "trying to reference deleted pointer");
270 lua_error(L);
271 return 0;
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*");
279 return 1;
281 int LuaBinder< QIcon >::__LuaWrapCall__pixmap__OverloadedVersion__3 (lua_State *L) {
282 QIcon *& __lua__obj = *static_cast<QIcon**>(lqtL_checkudata(L, 1, "QIcon*"));
283 if (__lua__obj==0) {
284 lua_pushstring(L, "trying to reference deleted pointer");
285 lua_error(L);
286 return 0;
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*");
293 return 1;
295 int LuaBinder< QIcon >::__LuaWrapCall__pixmap (lua_State *L) {
296 int score[4];
297 const int premium = 11+lua_gettop(L);
298 score[1] = 0;
299 score[1] += lqtL_testudata(L, 1, "QIcon*")?premium:-premium*premium;
300 if (lqtL_testudata(L, 2, "QSize*")) {
301 score[1] += premium;
302 } else if (false) {
303 score[1] += premium-1; // table: 0x13ad280;
304 } else {
305 score[1] -= premium*premium;
307 if (lqtL_isenum(L, 3, "QIcon::Mode")) {
308 score[1] += premium;
309 } else if (true) {
310 score[1] += premium-1; // table: 0x13accb0;
311 } else {
312 score[1] -= premium*premium;
314 if (lqtL_isenum(L, 4, "QIcon::State")) {
315 score[1] += premium;
316 } else if (true) {
317 score[1] += premium-1; // table: 0x13ad730;
318 } else {
319 score[1] -= premium*premium;
321 score[2] = 0;
322 score[2] += lqtL_testudata(L, 1, "QIcon*")?premium:-premium*premium;
323 if (lua_isnumber(L, 2)) {
324 score[2] += premium;
325 } else if (false) {
326 score[2] += premium-1; // table: 0x13ae5b0;
327 } else {
328 score[2] -= premium*premium;
330 if (lua_isnumber(L, 3)) {
331 score[2] += premium;
332 } else if (false) {
333 score[2] += premium-1; // table: 0x13aeac0;
334 } else {
335 score[2] -= premium*premium;
337 if (lqtL_isenum(L, 4, "QIcon::Mode")) {
338 score[2] += premium;
339 } else if (true) {
340 score[2] += premium-1; // table: 0x13aea60;
341 } else {
342 score[2] -= premium*premium;
344 if (lqtL_isenum(L, 5, "QIcon::State")) {
345 score[2] += premium;
346 } else if (true) {
347 score[2] += premium-1; // table: 0x13af2c0;
348 } else {
349 score[2] -= premium*premium;
351 score[3] = 0;
352 score[3] += lqtL_testudata(L, 1, "QIcon*")?premium:-premium*premium;
353 if (lua_isnumber(L, 2)) {
354 score[3] += premium;
355 } else if (false) {
356 score[3] += premium-1; // table: 0x13afbc0;
357 } else {
358 score[3] -= premium*premium;
360 if (lqtL_isenum(L, 3, "QIcon::Mode")) {
361 score[3] += premium;
362 } else if (true) {
363 score[3] += premium-1; // table: 0x13af8b0;
364 } else {
365 score[3] -= premium*premium;
367 if (lqtL_isenum(L, 4, "QIcon::State")) {
368 score[3] += premium;
369 } else if (true) {
370 score[3] += premium-1; // table: 0x13b00d0;
371 } else {
372 score[3] -= premium*premium;
374 int best = 1;
375 for (int i=1;i<=3;i++) {
376 if (score[best] < score[i]) { best = i; }
378 switch (best) {
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");
384 lua_error(L);
385 return 0;
387 int LuaBinder< QIcon >::__LuaWrapCall__new__OverloadedVersion__1 (lua_State *L) {
388 QIcon * ret = new LuaBinder< QIcon >(L);
389 lqtL_passudata(L, ret, "QIcon*");
390 return 1;
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*");
396 return 1;
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*");
402 return 1;
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*");
408 return 1;
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*");
414 return 1;
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*");
420 return 1;
422 int LuaBinder< QIcon >::__LuaWrapCall__new (lua_State *L) {
423 int score[7];
424 const int premium = 11+lua_gettop(L);
425 score[1] = 0;
426 score[2] = 0;
427 if (lqtL_testudata(L, 1, "QPixmap*")) {
428 score[2] += premium;
429 } else if (false) {
430 score[2] += premium-1; // table: 0x13a8710;
431 } else {
432 score[2] -= premium*premium;
434 score[3] = 0;
435 if (lqtL_testudata(L, 1, "QIcon*")) {
436 score[3] += premium;
437 } else if (false) {
438 score[3] += premium-1; // table: 0x13a90f0;
439 } else {
440 score[3] -= premium*premium;
442 score[4] = 0;
443 if ((lua_type(L, 1)==LUA_TSTRING)) {
444 score[4] += premium;
445 } else if (false) {
446 score[4] += premium-1; // table: 0x13a9b40;
447 } else {
448 score[4] -= premium*premium;
450 score[5] = 0;
451 if (lqtL_testudata(L, 1, "QIconEngine*")) {
452 score[5] += premium;
453 } else if (false) {
454 score[5] += premium-1; // table: 0x13aa5c0;
455 } else {
456 score[5] -= premium*premium;
458 score[6] = 0;
459 if (lqtL_testudata(L, 1, "QIconEngineV2*")) {
460 score[6] += premium;
461 } else if (false) {
462 score[6] += premium-1; // table: 0x13ab0c0;
463 } else {
464 score[6] -= premium*premium;
466 int best = 1;
467 for (int i=1;i<=6;i++) {
468 if (score[best] < score[i]) { best = i; }
470 switch (best) {
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");
479 lua_error(L);
480 return 0;
482 int LuaBinder< QIcon >::lqt_pushenum_Mode (lua_State *L) {
483 int enum_table = 0;
484 lua_getfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
485 if (!lua_istable(L, -1)) {
486 lua_pop(L, 1);
487 lua_newtable(L);
488 lua_pushvalue(L, -1);
489 lua_setfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
491 lua_newtable(L);
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");
513 lua_remove(L, -2);
514 return 1;
516 int LuaBinder< QIcon >::lqt_pushenum_Mode_QFLAGS_CREATOR (lua_State *L) {
517 int argn = lua_gettop(L);
518 int i = 0;
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]) );
521 *(void**)p = fl;
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);
530 return 1;
532 int LuaBinder< QIcon >::lqt_pushenum_State (lua_State *L) {
533 int enum_table = 0;
534 lua_getfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
535 if (!lua_istable(L, -1)) {
536 lua_pop(L, 1);
537 lua_newtable(L);
538 lua_pushvalue(L, -1);
539 lua_setfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
541 lua_newtable(L);
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");
555 lua_remove(L, -2);
556 return 1;
558 int LuaBinder< QIcon >::lqt_pushenum_State_QFLAGS_CREATOR (lua_State *L) {
559 int argn = lua_gettop(L);
560 int i = 0;
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]) );
563 *(void**)p = fl;
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);
572 return 1;
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");
604 lua_newtable(L);
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");
615 } else {
616 lua_pop(L, 1);
618 return 0;