view cpp/qt_core/QMetaObject_shell.cpp @ 292:19498f420252 signals

more QList goodness
author eldar
date Tue, 10 Nov 2009 19:29:42 +0000
parents f9559a957be9
children 463563fc9e17
line wrap: on
line source
#include "qtd_core.h"
#include <qobjectdefs.h>


#include <QList>

extern "C" DLL_PUBLIC void* qtd_QMetaObject_superClass(void *nativeId)
{
    return (void*)((QMetaObject*)nativeId)->superClass();
}

extern "C" DLL_PUBLIC void qtd_QMetaObject_activate(QObject *sender, int signal_index, void **argv)
{
    QMetaObject::activate(sender, signal_index, argv);
}

extern "C" DLL_PUBLIC void qtd_QMetaObject_activate_3(QObject *sender, const QMetaObject *m, int local_signal_index, void **argv)
{
    QMetaObject::activate(sender, m, local_signal_index, argv);
}

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)
{
    QMetaObject::activate(sender, m, from_local_signal_index, to_local_signal_index, argv);
}

extern "C" DLL_PUBLIC bool qtd_QMetaObject_connect(const QObject *sender, int signal_index,
                                                   const QObject *receiver, int method_index,
                                                   int type, int *types)
{
    return QMetaObject::connect(sender, signal_index, receiver, method_index, type, types);
}

extern "C" DLL_PUBLIC int qtd_QMetaObject_indexOfMethod(void *nativeId, const char *method)
{
    return ((QMetaObject*)nativeId)->indexOfMethod(method);
}

extern "C" DLL_PUBLIC int qtd_QMetaObject_methodCount(void *nativeId)
{
    return ((QMetaObject*)nativeId)->methodCount();
}

extern "C" DLL_PUBLIC void qtd_create_QList(void *nativeId)
{
    QList<int> & list = (*(QList<int> *)nativeId);
    list.append(54);
    list.append(45);
}

extern "C" DLL_PUBLIC void qtd_create_QList_QObject(void *nativeId)
{
    QList<QObject*> & list2 = (*(QList<QObject*> *)nativeId);
    
    QList<QObject*> list;
    QObject* a1 = new QObject();
    a1->setObjectName("a1");
    list.append(a1);
    QObject* a2 = new QObject();
    a2->setObjectName("a2");
    list.append(a2);
    list2 = list;
}