1 #include "lqt_bind_QShortcut.hpp"
3 int LuaBinder
< QShortcut
>::__LuaWrapCall__parentWidget (lua_State
*L
) {
4 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
6 lua_pushstring(L
, "trying to reference deleted pointer");
10 QWidget
* ret
= __lua__obj
->QShortcut::parentWidget();
11 lqtL_pushudata(L
, ret
, "QWidget*");
14 int LuaBinder
< QShortcut
>::__LuaWrapCall__setContext (lua_State
*L
) {
15 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
17 lua_pushstring(L
, "trying to reference deleted pointer");
21 Qt::ShortcutContext arg1
= static_cast<Qt::ShortcutContext
>(lqtL_toenum(L
, 2, "Qt::ShortcutContext"));
22 __lua__obj
->QShortcut::setContext(arg1
);
25 int LuaBinder
< QShortcut
>::__LuaWrapCall__key (lua_State
*L
) {
26 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
28 lua_pushstring(L
, "trying to reference deleted pointer");
32 QKeySequence ret
= __lua__obj
->QShortcut::key();
33 lqtL_passudata(L
, new QKeySequence(ret
), "QKeySequence*");
36 int LuaBinder
< QShortcut
>::__LuaWrapCall__trUtf8__OverloadedVersion__1 (lua_State
*L
) {
37 const char * arg1
= lua_tostring(L
, 1);
38 const char * arg2
= (lua_type(L
, 2)==LUA_TSTRING
)?lua_tostring(L
, 2):static_cast< const char * >(0);
39 QString ret
= QShortcut::trUtf8(arg1
, arg2
);
40 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
43 int LuaBinder
< QShortcut
>::__LuaWrapCall__trUtf8__OverloadedVersion__2 (lua_State
*L
) {
44 const char * arg1
= lua_tostring(L
, 1);
45 const char * arg2
= lua_tostring(L
, 2);
46 int arg3
= lua_tointeger(L
, 3);
47 QString ret
= QShortcut::trUtf8(arg1
, arg2
, arg3
);
48 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
51 int LuaBinder
< QShortcut
>::__LuaWrapCall__trUtf8 (lua_State
*L
) {
53 const int premium
= 11+lua_gettop(L
);
55 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
58 score
[1] += premium
-1; // table: 0x10146d0;
60 score
[1] -= premium
*premium
;
62 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
65 score
[1] += premium
-1; // table: 0x1014230;
67 score
[1] -= premium
*premium
;
70 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
73 score
[2] += premium
-1; // table: 0x10164c0;
75 score
[2] -= premium
*premium
;
77 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
80 score
[2] += premium
-1; // table: 0x1015bf0;
82 score
[2] -= premium
*premium
;
84 if (lua_isnumber(L
, 3)) {
87 score
[2] += premium
-1; // table: 0x1016950;
89 score
[2] -= premium
*premium
;
92 for (int i
=1;i
<=2;i
++) {
93 if (score
[best
] < score
[i
]) { best
= i
; }
96 case 1: return __LuaWrapCall__trUtf8__OverloadedVersion__1(L
); break;
97 case 2: return __LuaWrapCall__trUtf8__OverloadedVersion__2(L
); break;
101 int LuaBinder
< QShortcut
>::__LuaWrapCall__context (lua_State
*L
) {
102 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
104 lua_pushstring(L
, "trying to reference deleted pointer");
108 Qt::ShortcutContext ret
= __lua__obj
->QShortcut::context();
109 lqtL_pushenum(L
, ret
, "Qt::ShortcutContext");
112 int LuaBinder
< QShortcut
>::__LuaWrapCall__new__OverloadedVersion__2 (lua_State
*L
) {
113 QWidget
* arg1
= *static_cast<QWidget
**>(lqtL_checkudata(L
, 1, "QWidget*"));
114 QShortcut
* ret
= new LuaBinder
< QShortcut
>(L
, arg1
);
115 lqtL_pushudata(L
, ret
, "QShortcut*");
118 int LuaBinder
< QShortcut
>::__LuaWrapCall__new__OverloadedVersion__3 (lua_State
*L
) {
119 const QKeySequence
& arg1
= **static_cast<QKeySequence
**>(lqtL_checkudata(L
, 1, "QKeySequence*"));
120 QWidget
* arg2
= *static_cast<QWidget
**>(lqtL_checkudata(L
, 2, "QWidget*"));
121 const char * arg3
= (lua_type(L
, 3)==LUA_TSTRING
)?lua_tostring(L
, 3):static_cast< const char * >(0);
122 const char * arg4
= (lua_type(L
, 4)==LUA_TSTRING
)?lua_tostring(L
, 4):static_cast< const char * >(0);
123 Qt::ShortcutContext arg5
= lqtL_isenum(L
, 5, "Qt::ShortcutContext")?static_cast<Qt::ShortcutContext
>(lqtL_toenum(L
, 5, "Qt::ShortcutContext")):Qt::WindowShortcut
;
124 QShortcut
* ret
= new LuaBinder
< QShortcut
>(L
, arg1
, arg2
, arg3
, arg4
, arg5
);
125 lqtL_pushudata(L
, ret
, "QShortcut*");
128 int LuaBinder
< QShortcut
>::__LuaWrapCall__new (lua_State
*L
) {
130 const int premium
= 11+lua_gettop(L
);
132 if (lqtL_testudata(L
, 1, "QWidget*")) {
135 score
[2] += premium
-1; // table: 0x1019390;
137 score
[2] -= premium
*premium
;
140 if (lqtL_testudata(L
, 1, "QKeySequence*")) {
143 score
[3] += premium
-1; // table: 0x1019e20;
145 score
[3] -= premium
*premium
;
147 if (lqtL_testudata(L
, 2, "QWidget*")) {
150 score
[3] += premium
-1; // table: 0x10198b0;
152 score
[3] -= premium
*premium
;
154 if ((lua_type(L
, 3)==LUA_TSTRING
)) {
157 score
[3] += premium
-1; // table: 0x101a320;
159 score
[3] -= premium
*premium
;
161 if ((lua_type(L
, 4)==LUA_TSTRING
)) {
164 score
[3] += premium
-1; // table: 0x101abe0;
166 score
[3] -= premium
*premium
;
168 if (lqtL_isenum(L
, 5, "Qt::ShortcutContext")) {
171 score
[3] += premium
-1; // table: 0x101b020;
173 score
[3] -= premium
*premium
;
176 for (int i
=2;i
<=3;i
++) {
177 if (score
[best
] < score
[i
]) { best
= i
; }
180 case 2: return __LuaWrapCall__new__OverloadedVersion__2(L
); break;
181 case 3: return __LuaWrapCall__new__OverloadedVersion__3(L
); break;
185 int LuaBinder
< QShortcut
>::__LuaWrapCall__tr__OverloadedVersion__1 (lua_State
*L
) {
186 const char * arg1
= lua_tostring(L
, 1);
187 const char * arg2
= (lua_type(L
, 2)==LUA_TSTRING
)?lua_tostring(L
, 2):static_cast< const char * >(0);
188 QString ret
= QShortcut::tr(arg1
, arg2
);
189 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
192 int LuaBinder
< QShortcut
>::__LuaWrapCall__tr__OverloadedVersion__2 (lua_State
*L
) {
193 const char * arg1
= lua_tostring(L
, 1);
194 const char * arg2
= lua_tostring(L
, 2);
195 int arg3
= lua_tointeger(L
, 3);
196 QString ret
= QShortcut::tr(arg1
, arg2
, arg3
);
197 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
200 int LuaBinder
< QShortcut
>::__LuaWrapCall__tr (lua_State
*L
) {
202 const int premium
= 11+lua_gettop(L
);
204 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
207 score
[1] += premium
-1; // table: 0x1013970;
209 score
[1] -= premium
*premium
;
211 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
214 score
[1] += premium
-1; // table: 0x10136d0;
216 score
[1] -= premium
*premium
;
219 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
222 score
[2] += premium
-1; // table: 0x10153b0;
224 score
[2] -= premium
*premium
;
226 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
229 score
[2] += premium
-1; // table: 0x10158a0;
231 score
[2] -= premium
*premium
;
233 if (lua_isnumber(L
, 3)) {
236 score
[2] += premium
-1; // table: 0x1015c50;
238 score
[2] -= premium
*premium
;
241 for (int i
=1;i
<=2;i
++) {
242 if (score
[best
] < score
[i
]) { best
= i
; }
245 case 1: return __LuaWrapCall__tr__OverloadedVersion__1(L
); break;
246 case 2: return __LuaWrapCall__tr__OverloadedVersion__2(L
); break;
250 int LuaBinder
< QShortcut
>::__LuaWrapCall__delete (lua_State
*L
) {
251 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
253 lua_pushstring(L
, "trying to reference deleted pointer");
261 int LuaBinder
< QShortcut
>::__LuaWrapCall__setKey (lua_State
*L
) {
262 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
264 lua_pushstring(L
, "trying to reference deleted pointer");
268 const QKeySequence
& arg1
= **static_cast<QKeySequence
**>(lqtL_checkudata(L
, 2, "QKeySequence*"));
269 __lua__obj
->QShortcut::setKey(arg1
);
272 int LuaBinder
< QShortcut
>::__LuaWrapCall__whatsThis (lua_State
*L
) {
273 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
275 lua_pushstring(L
, "trying to reference deleted pointer");
279 QString ret
= __lua__obj
->QShortcut::whatsThis();
280 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
283 int LuaBinder
< QShortcut
>::__LuaWrapCall__autoRepeat (lua_State
*L
) {
284 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
286 lua_pushstring(L
, "trying to reference deleted pointer");
290 bool ret
= __lua__obj
->QShortcut::autoRepeat();
291 lua_pushboolean(L
, ret
);
294 int LuaBinder
< QShortcut
>::__LuaWrapCall__id (lua_State
*L
) {
295 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
297 lua_pushstring(L
, "trying to reference deleted pointer");
301 int ret
= __lua__obj
->QShortcut::id();
302 lua_pushinteger(L
, ret
);
305 int LuaBinder
< QShortcut
>::__LuaWrapCall__setWhatsThis (lua_State
*L
) {
306 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
308 lua_pushstring(L
, "trying to reference deleted pointer");
312 const QString
& arg1
= QString::fromAscii(lua_tostring(L
, 2), lua_objlen(L
, 2));
313 __lua__obj
->QShortcut::setWhatsThis(arg1
);
316 int LuaBinder
< QShortcut
>::__LuaWrapCall__isEnabled (lua_State
*L
) {
317 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
319 lua_pushstring(L
, "trying to reference deleted pointer");
323 bool ret
= __lua__obj
->QShortcut::isEnabled();
324 lua_pushboolean(L
, ret
);
327 int LuaBinder
< QShortcut
>::__LuaWrapCall__setEnabled (lua_State
*L
) {
328 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
330 lua_pushstring(L
, "trying to reference deleted pointer");
334 bool arg1
= (bool)lua_toboolean(L
, 2);
335 __lua__obj
->QShortcut::setEnabled(arg1
);
338 int LuaBinder
< QShortcut
>::__LuaWrapCall__setAutoRepeat (lua_State
*L
) {
339 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
341 lua_pushstring(L
, "trying to reference deleted pointer");
345 bool arg1
= (bool)lua_toboolean(L
, 2);
346 __lua__obj
->QShortcut::setAutoRepeat(arg1
);
349 int LuaBinder
< QShortcut
>::__LuaWrapCall__metaObject (lua_State
*L
) {
350 QShortcut
*& __lua__obj
= *static_cast<QShortcut
**>(lqtL_checkudata(L
, 1, "QShortcut*"));
352 lua_pushstring(L
, "trying to reference deleted pointer");
356 const QMetaObject
* ret
= __lua__obj
->QShortcut::metaObject();
357 lqtL_pushudata(L
, ret
, "QMetaObject*");
360 bool LuaBinder
< QShortcut
>::event (QEvent
* arg1
) {
361 bool absorbed
= false;
362 int oldtop
= lua_gettop(L
);
363 lqtL_pushudata(L
, this, "QShortcut*");
364 if (lua_getmetatable(L
, -1)) {
365 lua_getfield(L
, -1, "event");
371 lqtL_pushudata(L
, arg1
, "QEvent*");
372 if (lua_isfunction(L
, -1-2)) {
373 lua_pcall(L
, 1+1, 2, 0);
374 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
378 lua_settop(L
, oldtop
);
379 return this->QShortcut::event(arg1
);
381 bool ret
= (bool)lua_toboolean(L
, -1);
382 lua_settop(L
, oldtop
);
385 void LuaBinder
< QShortcut
>::customEvent (QEvent
* arg1
) {
386 bool absorbed
= false;
387 int oldtop
= lua_gettop(L
);
388 lqtL_pushudata(L
, this, "QShortcut*");
389 if (lua_getmetatable(L
, -1)) {
390 lua_getfield(L
, -1, "customEvent");
396 lqtL_pushudata(L
, arg1
, "QEvent*");
397 if (lua_isfunction(L
, -1-2)) {
398 lua_pcall(L
, 1+1, 2, 0);
399 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
403 lua_settop(L
, oldtop
);
404 this->QObject::customEvent(arg1
);
406 lua_settop(L
, oldtop
);
408 bool LuaBinder
< QShortcut
>::eventFilter (QObject
* arg1
, QEvent
* arg2
) {
409 bool absorbed
= false;
410 int oldtop
= lua_gettop(L
);
411 lqtL_pushudata(L
, this, "QShortcut*");
412 if (lua_getmetatable(L
, -1)) {
413 lua_getfield(L
, -1, "eventFilter");
419 lqtL_pushudata(L
, arg1
, "QObject*");
420 lqtL_pushudata(L
, arg2
, "QEvent*");
421 if (lua_isfunction(L
, -2-2)) {
422 lua_pcall(L
, 2+1, 2, 0);
423 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
427 lua_settop(L
, oldtop
);
428 return this->QObject::eventFilter(arg1
, arg2
);
430 bool ret
= (bool)lua_toboolean(L
, -1);
431 lua_settop(L
, oldtop
);
434 void LuaBinder
< QShortcut
>::disconnectNotify (const char * arg1
) {
435 bool absorbed
= false;
436 int oldtop
= lua_gettop(L
);
437 lqtL_pushudata(L
, this, "QShortcut*");
438 if (lua_getmetatable(L
, -1)) {
439 lua_getfield(L
, -1, "disconnectNotify");
445 lua_pushstring(L
, arg1
);
446 if (lua_isfunction(L
, -1-2)) {
447 lua_pcall(L
, 1+1, 2, 0);
448 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
452 lua_settop(L
, oldtop
);
453 this->QObject::disconnectNotify(arg1
);
455 lua_settop(L
, oldtop
);
457 void LuaBinder
< QShortcut
>::childEvent (QChildEvent
* arg1
) {
458 bool absorbed
= false;
459 int oldtop
= lua_gettop(L
);
460 lqtL_pushudata(L
, this, "QShortcut*");
461 if (lua_getmetatable(L
, -1)) {
462 lua_getfield(L
, -1, "childEvent");
468 lqtL_pushudata(L
, arg1
, "QChildEvent*");
469 if (lua_isfunction(L
, -1-2)) {
470 lua_pcall(L
, 1+1, 2, 0);
471 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
475 lua_settop(L
, oldtop
);
476 this->QObject::childEvent(arg1
);
478 lua_settop(L
, oldtop
);
480 void LuaBinder
< QShortcut
>::timerEvent (QTimerEvent
* arg1
) {
481 bool absorbed
= false;
482 int oldtop
= lua_gettop(L
);
483 lqtL_pushudata(L
, this, "QShortcut*");
484 if (lua_getmetatable(L
, -1)) {
485 lua_getfield(L
, -1, "timerEvent");
491 lqtL_pushudata(L
, arg1
, "QTimerEvent*");
492 if (lua_isfunction(L
, -1-2)) {
493 lua_pcall(L
, 1+1, 2, 0);
494 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
498 lua_settop(L
, oldtop
);
499 this->QObject::timerEvent(arg1
);
501 lua_settop(L
, oldtop
);
503 const QMetaObject
* LuaBinder
< QShortcut
>::metaObject () const {
504 bool absorbed
= false;
505 int oldtop
= lua_gettop(L
);
506 lqtL_pushudata(L
, this, "QShortcut*");
507 if (lua_getmetatable(L
, -1)) {
508 lua_getfield(L
, -1, "metaObject");
514 if (lua_isfunction(L
, -0-2)) {
515 lua_pcall(L
, 0+1, 2, 0);
516 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
520 lua_settop(L
, oldtop
);
521 return this->QShortcut::metaObject();
523 const QMetaObject
* ret
= *static_cast<QMetaObject
**>(lqtL_checkudata(L
, -1, "QMetaObject*"));
524 lua_settop(L
, oldtop
);
527 void LuaBinder
< QShortcut
>::connectNotify (const char * arg1
) {
528 bool absorbed
= false;
529 int oldtop
= lua_gettop(L
);
530 lqtL_pushudata(L
, this, "QShortcut*");
531 if (lua_getmetatable(L
, -1)) {
532 lua_getfield(L
, -1, "connectNotify");
538 lua_pushstring(L
, arg1
);
539 if (lua_isfunction(L
, -1-2)) {
540 lua_pcall(L
, 1+1, 2, 0);
541 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
545 lua_settop(L
, oldtop
);
546 this->QObject::connectNotify(arg1
);
548 lua_settop(L
, oldtop
);
550 LuaBinder
< QShortcut
>:: ~LuaBinder
< QShortcut
> () {
551 int oldtop
= lua_gettop(L
);
552 lqtL_pushudata(L
, this, "QShortcut*");
553 lua_getfield(L
, -1, "~QShortcut");
555 if (lua_isfunction(L
, -1)) {
557 lua_pcall(L
, 1, 1, 0);
560 lua_settop(L
, oldtop
);
562 int luaopen_QShortcut (lua_State
*L
) {
563 if (luaL_newmetatable(L
, "QShortcut*")) {
564 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__parentWidget
);
565 lua_setfield(L
, -2, "parentWidget");
566 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__setContext
);
567 lua_setfield(L
, -2, "setContext");
568 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__key
);
569 lua_setfield(L
, -2, "key");
570 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__trUtf8
);
571 lua_setfield(L
, -2, "trUtf8");
572 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__context
);
573 lua_setfield(L
, -2, "context");
574 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__new
);
575 lua_setfield(L
, -2, "new");
576 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__tr
);
577 lua_setfield(L
, -2, "tr");
578 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__delete
);
579 lua_setfield(L
, -2, "delete");
580 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__setKey
);
581 lua_setfield(L
, -2, "setKey");
582 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__whatsThis
);
583 lua_setfield(L
, -2, "whatsThis");
584 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__autoRepeat
);
585 lua_setfield(L
, -2, "autoRepeat");
586 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__id
);
587 lua_setfield(L
, -2, "id");
588 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__setWhatsThis
);
589 lua_setfield(L
, -2, "setWhatsThis");
590 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__isEnabled
);
591 lua_setfield(L
, -2, "isEnabled");
592 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__setEnabled
);
593 lua_setfield(L
, -2, "setEnabled");
594 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__setAutoRepeat
);
595 lua_setfield(L
, -2, "setAutoRepeat");
596 lua_pushcfunction(L
, LuaBinder
< QShortcut
>::__LuaWrapCall__metaObject
);
597 lua_setfield(L
, -2, "metaObject");
599 lua_pushboolean(L
, 1);
600 lua_setfield(L
, -2, "QObject*");
601 lua_setfield(L
, -2, "__base");
602 lua_pushcfunction(L
, lqtL_newindex
);
603 lua_setfield(L
, -2, "__newindex");
604 lua_pushcfunction(L
, lqtL_index
);
605 lua_setfield(L
, -2, "__index");
606 lua_pushcfunction(L
, lqtL_gc
);
607 lua_setfield(L
, -2, "__gc");
608 lua_pushstring(L
, "QShortcut");
609 lua_setfield(L
, -2, "__qtype");