PythonQtWrapper_QTextFrame.cpp
178 lines
| 5.9 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QTextFrame.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QTextCursor> | ||
#include <QTextFrame> | ||||
#include <QVariant> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qtextcursor.h> | ||||
#include <qtextdocument.h> | ||||
#include <qtextformat.h> | ||||
#include <qtextobject.h> | ||||
|
r24 | void PythonQtShell_QTextFrame::childEvent(QChildEvent* arg__1) | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QChildEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | void* args[2] = {NULL, (void*)&arg__1}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QTextFrame::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QTextFrame::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | void* args[2] = {NULL, (void*)&arg__1}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QTextFrame::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QTextFrame::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
|
r24 | void* args[2] = {NULL, (void*)&arg__1}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTextFrame::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QTextFrame::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
|
r24 | void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTextFrame::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QTextFrame::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QTimerEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | void* args[2] = {NULL, (void*)&arg__1}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QTextFrame::timerEvent(arg__1); | ||||
} | ||||
|
r13 | QTextFrame* PythonQtWrapper_QTextFrame::new_QTextFrame(QTextDocument* doc) | ||
{ | ||||
|
r24 | return new PythonQtShell_QTextFrame(doc); } | ||
|
r13 | |||
|
r73 | void PythonQtWrapper_QTextFrame::setFrameFormat(QTextFrame* theWrappedObject, const QTextFrameFormat& format) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setFrameFormat(format)); | ||
|
r13 | } | ||
|
r73 | QTextFrame::iterator PythonQtWrapper_QTextFrame::begin(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->begin()); | ||
|
r13 | } | ||
|
r73 | QTextFrameFormat PythonQtWrapper_QTextFrame::frameFormat(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->frameFormat()); | ||
|
r13 | } | ||
|
r73 | int PythonQtWrapper_QTextFrame::lastPosition(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->lastPosition()); | ||
|
r13 | } | ||
|
r28 | QTextCursor PythonQtWrapper_QTextFrame::lastCursorPosition(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->lastCursorPosition()); | ||
|
r13 | } | ||
|
r73 | QTextFrame* PythonQtWrapper_QTextFrame::parentFrame(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->parentFrame()); | ||
|
r13 | } | ||
|
r24 | QTextFrame::iterator PythonQtWrapper_QTextFrame::end(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->end()); | ||
|
r13 | } | ||
|
r73 | QTextCursor PythonQtWrapper_QTextFrame::firstCursorPosition(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->firstCursorPosition()); | ||
|
r13 | } | ||
|
r73 | int PythonQtWrapper_QTextFrame::firstPosition(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->firstPosition()); | ||
|
r13 | } | ||
|
r73 | QList<QTextFrame* > PythonQtWrapper_QTextFrame::childFrames(QTextFrame* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->childFrames()); | ||
|
r13 | } | ||