Mercurial > projects > qtd
annotate cpp/qt_core/QMetaObject_shell.cpp @ 302:55ee4603365d signals
string arguments for signals
author | eldar_ins@eldar-laptop |
---|---|
date | Sat, 12 Dec 2009 03:22:54 +0500 |
parents | 463563fc9e17 |
children | 9784459f0750 |
rev | line source |
---|---|
251 | 1 #include "qtd_core.h" |
2 #include <qobjectdefs.h> | |
3 | |
292 | 4 |
5 #include <QList> | |
6 | |
251 | 7 extern "C" DLL_PUBLIC void* qtd_QMetaObject_superClass(void *nativeId) |
8 { | |
9 return (void*)((QMetaObject*)nativeId)->superClass(); | |
270 | 10 } |
11 | |
12 extern "C" DLL_PUBLIC void qtd_QMetaObject_activate(QObject *sender, int signal_index, void **argv) | |
13 { | |
14 QMetaObject::activate(sender, signal_index, argv); | |
15 } | |
288 | 16 |
17 extern "C" DLL_PUBLIC void qtd_QMetaObject_activate_3(QObject *sender, const QMetaObject *m, int local_signal_index, void **argv) | |
18 { | |
19 QMetaObject::activate(sender, m, local_signal_index, argv); | |
20 } | |
21 | |
22 extern "C" DLL_PUBLIC void qtd_QMetaObject_activate_4(QObject *sender, const QMetaObject *m, int from_local_signal_index, int to_local_signal_index, void **argv) | |
23 { | |
24 QMetaObject::activate(sender, m, from_local_signal_index, to_local_signal_index, argv); | |
25 } | |
26 | |
27 extern "C" DLL_PUBLIC bool qtd_QMetaObject_connect(const QObject *sender, int signal_index, | |
28 const QObject *receiver, int method_index, | |
29 int type, int *types) | |
30 { | |
31 return QMetaObject::connect(sender, signal_index, receiver, method_index, type, types); | |
32 } | |
33 | |
34 extern "C" DLL_PUBLIC int qtd_QMetaObject_indexOfMethod(void *nativeId, const char *method) | |
35 { | |
36 return ((QMetaObject*)nativeId)->indexOfMethod(method); | |
37 } | |
38 | |
39 extern "C" DLL_PUBLIC int qtd_QMetaObject_methodCount(void *nativeId) | |
40 { | |
41 return ((QMetaObject*)nativeId)->methodCount(); | |
42 } | |
292 | 43 |
44 extern "C" DLL_PUBLIC void qtd_create_QList(void *nativeId) | |
45 { | |
46 QList<int> & list = (*(QList<int> *)nativeId); | |
47 list.append(54); | |
48 list.append(45); | |
49 } | |
50 | |
295
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
51 extern "C" DLL_PUBLIC void qtd_create_QList_double(void *nativeId) |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
52 { |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
53 QList<double> & list = (*(QList<double> *)nativeId); |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
54 list.append(54.44); |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
55 list.append(45.55); |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
56 } |
463563fc9e17
more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents:
292
diff
changeset
|
57 |
292 | 58 extern "C" DLL_PUBLIC void qtd_create_QList_QObject(void *nativeId) |
59 { | |
60 QList<QObject*> & list2 = (*(QList<QObject*> *)nativeId); | |
61 | |
62 QList<QObject*> list; | |
63 QObject* a1 = new QObject(); | |
64 a1->setObjectName("a1"); | |
65 list.append(a1); | |
66 QObject* a2 = new QObject(); | |
67 a2->setObjectName("a2"); | |
68 list.append(a2); | |
69 list2 = list; | |
70 } |