com_trolltech_qt_core_init.cpp
160 lines
| 12.9 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include <PythonQt.h> | ||
florianlink
|
r28 | #include "PythonQtWrapper_QByteArrayMatcher.h" | ||
#include "PythonQtWrapper_QTextDecoder.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QCryptographicHash.h" | ||
#include "PythonQtWrapper_QMutex.h" | ||||
florianlink
|
r28 | #include "PythonQtWrapper_QTextBoundaryFinder.h" | ||
#include "PythonQtWrapper_QXmlStreamReader.h" | ||||
#include "PythonQtWrapper_QFileInfo.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QDate.h" | ||
#include "PythonQtWrapper_QDateTime.h" | ||||
florianlink
|
r28 | #include "PythonQtWrapper_QTextStream.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QEvent.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QXmlStreamAttribute.h" | ||
#include "PythonQtWrapper_QModelIndex.h" | ||||
#include "PythonQtWrapper_QUrl.h" | ||||
#include "PythonQtWrapper_Qt.h" | ||||
#include "PythonQtWrapper_QStringMatcher.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QSizeF.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QXmlStreamNotationDeclaration.h" | ||
#include "PythonQtWrapper_QPoint.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QXmlStreamEntityResolver.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QLibraryInfo.h" | ||
#include "PythonQtWrapper_QRegExp.h" | ||||
#include "PythonQtWrapper_QtConcurrent.h" | ||||
#include "PythonQtWrapper_QPointF.h" | ||||
#include "PythonQtWrapper_QWaitCondition.h" | ||||
#include "PythonQtWrapper_QRectF.h" | ||||
#include "PythonQtWrapper_QPersistentModelIndex.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QUuid.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QTextCodec.h" | ||
#include "PythonQtWrapper_QBitArray.h" | ||||
#include "PythonQtWrapper_QByteArray.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QLocale.h" | ||
#include "PythonQtWrapper_QXmlStreamWriter.h" | ||||
florianlink
|
r28 | #include "PythonQtWrapper_QLineF.h" | ||
#include "PythonQtWrapper_QSemaphore.h" | ||||
#include "PythonQtWrapper_QTextEncoder.h" | ||||
#include "PythonQtWrapper_QBasicTimer.h" | ||||
#include "PythonQtWrapper_QTime.h" | ||||
#include "PythonQtWrapper_QSize.h" | ||||
#include "PythonQtWrapper_QObject.h" | ||||
#include "PythonQtWrapper_QDataStream.h" | ||||
#include "PythonQtWrapper_QDirIterator.h" | ||||
#include "PythonQtWrapper_QRunnable.h" | ||||
#include "PythonQtWrapper_QRect.h" | ||||
#include "PythonQtWrapper_QLine.h" | ||||
#include "PythonQtWrapper_QXmlStreamNamespaceDeclaration.h" | ||||
#include "PythonQtWrapper_QSystemSemaphore.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QXmlStreamEntityDeclaration.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QXmlStreamAttributes.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QDir.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QSettings.h" | ||
#include "PythonQtWrapper_QCoreApplication.h" | ||||
#include "PythonQtWrapper_QThreadPool.h" | ||||
#include "PythonQtWrapper_QMimeData.h" | ||||
#include "PythonQtWrapper_QTimeLine.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QSignalMapper.h" | ||
#include "PythonQtWrapper_QEventLoop.h" | ||||
florianlink
|
r28 | #include "PythonQtWrapper_QTimerEvent.h" | ||
#include "PythonQtWrapper_QAbstractItemModel.h" | ||||
#include "PythonQtWrapper_QFileSystemWatcher.h" | ||||
#include "PythonQtWrapper_QTranslator.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QChildEvent.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QIODevice.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QDynamicPropertyChangeEvent.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QTimer.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QSocketNotifier.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QTextCodecPlugin.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QAbstractTableModel.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QProcess.h" | ||
#include "PythonQtWrapper_QFile.h" | ||||
florianlink
|
r13 | #include "PythonQtWrapper_QAbstractListModel.h" | ||
florianlink
|
r28 | #include "PythonQtWrapper_QBuffer.h" | ||
florianlink
|
r13 | #include "PythonQtWrapper_QTemporaryFile.h" | ||
florianlink
|
r28 | static void* polymorphichandler_QEvent(const void *ptr, char **class_name) | ||
{ | ||||
Q_ASSERT(ptr != 0); | ||||
QEvent *object = (QEvent *)ptr; | ||||
if (object->type() == QEvent::None) { | ||||
*class_name = "QEvent"; | ||||
return (QEvent*)object; | ||||
} | ||||
if (object->type() == QEvent::Timer) { | ||||
*class_name = "QTimerEvent"; | ||||
return (QTimerEvent*)object; | ||||
} | ||||
if (object->type() == QEvent::ChildAdded || object->type() == QEvent::ChildPolished || object->type() == QEvent::ChildRemoved) { | ||||
*class_name = "QChildEvent"; | ||||
return (QChildEvent*)object; | ||||
} | ||||
if (object->type() == QEvent::DynamicPropertyChange) { | ||||
*class_name = "QDynamicPropertyChangeEvent"; | ||||
return (QDynamicPropertyChangeEvent*)object; | ||||
} | ||||
return NULL; | ||||
} | ||||
florianlink
|
r13 | void PythonQt_init_QtCore() { | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QByteArrayMatcher", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QByteArrayMatcher>); | ||
PythonQt::self()->registerCPPClass("QTextDecoder", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextDecoder>); | ||||
florianlink
|
r13 | PythonQt::self()->registerCPPClass("QCryptographicHash", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QCryptographicHash>); | ||
PythonQt::self()->registerCPPClass("QMutex", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QMutex>); | ||||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QTextBoundaryFinder", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextBoundaryFinder>); | ||
PythonQt::self()->registerCPPClass("QXmlStreamReader", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamReader>); | ||||
PythonQt::self()->registerCPPClass("QFileInfo", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QFileInfo>); | ||||
PythonQt::self()->registerCPPClass("QTextStream", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextStream>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTextStream>); | ||||
florianlink
|
r24 | PythonQt::self()->registerCPPClass("QEvent", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QEvent>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QEvent>); | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QXmlStreamAttribute", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamAttribute>); | ||
PythonQt::self()->registerCPPClass("QModelIndex", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QModelIndex>); | ||||
PythonQt::self()->registerCPPClass("QStringMatcher", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QStringMatcher>); | ||||
PythonQt::self()->registerCPPClass("QXmlStreamNotationDeclaration", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamNotationDeclaration>); | ||||
florianlink
|
r24 | PythonQt::self()->registerCPPClass("QXmlStreamEntityResolver", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamEntityResolver>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QXmlStreamEntityResolver>); | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QLibraryInfo", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QLibraryInfo>); | ||
PythonQt::self()->registerCPPClass("QtConcurrent", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QtConcurrent>); | ||||
PythonQt::self()->registerCPPClass("QWaitCondition", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QWaitCondition>); | ||||
PythonQt::self()->registerCPPClass("QPersistentModelIndex", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QPersistentModelIndex>); | ||||
florianlink
|
r24 | PythonQt::self()->registerCPPClass("QUuid", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QUuid>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QUuid>); | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QTextCodec", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextCodec>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTextCodec>); | ||
PythonQt::self()->registerCPPClass("QBitArray", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QBitArray>); | ||||
PythonQt::self()->registerCPPClass("QByteArray", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QByteArray>); | ||||
florianlink
|
r13 | PythonQt::self()->registerCPPClass("QXmlStreamWriter", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamWriter>); | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QSemaphore", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QSemaphore>); | ||
PythonQt::self()->registerCPPClass("QTextEncoder", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextEncoder>); | ||||
PythonQt::self()->registerCPPClass("QBasicTimer", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QBasicTimer>); | ||||
PythonQt::self()->registerClass(&QObject::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QObject>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QObject>); | ||||
PythonQt::self()->registerCPPClass("QDataStream", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QDataStream>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QDataStream>); | ||||
PythonQt::self()->registerCPPClass("QDirIterator", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QDirIterator>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QDirIterator>); | ||||
PythonQt::self()->registerCPPClass("QRunnable", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QRunnable>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QRunnable>); | ||||
PythonQt::self()->registerCPPClass("QXmlStreamNamespaceDeclaration", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamNamespaceDeclaration>); | ||||
PythonQt::self()->registerCPPClass("QSystemSemaphore", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QSystemSemaphore>); | ||||
florianlink
|
r13 | PythonQt::self()->registerCPPClass("QXmlStreamEntityDeclaration", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamEntityDeclaration>); | ||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QXmlStreamAttributes", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QXmlStreamAttributes>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QXmlStreamAttributes>); | ||
florianlink
|
r13 | PythonQt::self()->registerCPPClass("QDir", "", "QtCore", PythonQtCreateObject<PythonQtWrapper_QDir>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QSettings::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QSettings>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QSettings>); | ||
PythonQt::self()->registerClass(&QCoreApplication::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QCoreApplication>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QCoreApplication>); | ||||
PythonQt::self()->registerClass(&QThreadPool::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QThreadPool>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QThreadPool>); | ||||
PythonQt::self()->registerClass(&QMimeData::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QMimeData>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QMimeData>); | ||||
PythonQt::self()->registerClass(&QTimeLine::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QTimeLine>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTimeLine>); | ||||
florianlink
|
r24 | PythonQt::self()->registerClass(&QSignalMapper::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QSignalMapper>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QSignalMapper>); | ||
PythonQt::self()->registerClass(&QEventLoop::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QEventLoop>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QEventLoop>); | ||||
florianlink
|
r28 | PythonQt::self()->registerCPPClass("QTimerEvent", "QEvent", "QtCore", PythonQtCreateObject<PythonQtWrapper_QTimerEvent>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTimerEvent>); | ||
PythonQt::self()->registerClass(&QAbstractItemModel::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QAbstractItemModel>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QAbstractItemModel>); | ||||
PythonQt::self()->registerClass(&QFileSystemWatcher::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QFileSystemWatcher>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QFileSystemWatcher>); | ||||
PythonQt::self()->registerClass(&QTranslator::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QTranslator>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTranslator>); | ||||
florianlink
|
r24 | PythonQt::self()->registerCPPClass("QChildEvent", "QEvent", "QtCore", PythonQtCreateObject<PythonQtWrapper_QChildEvent>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QChildEvent>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QIODevice::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QIODevice>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QIODevice>); | ||
florianlink
|
r13 | PythonQt::self()->registerCPPClass("QDynamicPropertyChangeEvent", "QEvent", "QtCore", PythonQtCreateObject<PythonQtWrapper_QDynamicPropertyChangeEvent>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QTimer::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QTimer>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTimer>); | ||
florianlink
|
r24 | PythonQt::self()->registerClass(&QSocketNotifier::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QSocketNotifier>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QSocketNotifier>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QTextCodecPlugin::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QTextCodecPlugin>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTextCodecPlugin>); | ||
florianlink
|
r24 | PythonQt::self()->registerClass(&QAbstractTableModel::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QAbstractTableModel>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QAbstractTableModel>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QProcess::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QProcess>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QProcess>); | ||
PythonQt::self()->registerClass(&QFile::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QFile>); | ||||
florianlink
|
r24 | PythonQt::self()->registerClass(&QAbstractListModel::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QAbstractListModel>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QAbstractListModel>); | ||
florianlink
|
r28 | PythonQt::self()->registerClass(&QBuffer::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QBuffer>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QBuffer>); | ||
florianlink
|
r24 | PythonQt::self()->registerClass(&QTemporaryFile::staticMetaObject, "QtCore", PythonQtCreateObject<PythonQtWrapper_QTemporaryFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QTemporaryFile>); | ||
florianlink
|
r13 | |||
florianlink
|
r28 | PythonQt::self()->addPolymorphicHandler("QEvent", polymorphichandler_QEvent); | ||
florianlink
|
r13 | } | ||