PythonQtWrapper_QTextTable.cpp
214 lines
| 7.0 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QTextTable.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
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> | ||||
#include <qtexttable.h> | ||||
florianlink
|
r24 | void PythonQtShell_QTextTable::childEvent(QChildEvent* arg__1) | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QChildEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
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; | ||||
} | ||||
} | ||||
QTextTable::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QTextTable::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
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; | ||||
} | ||||
} | ||||
QTextTable::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QTextTable::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTextTable::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QTextTable::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTextTable::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QTextTable::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QTimerEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
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; | ||||
} | ||||
} | ||||
QTextTable::timerEvent(arg__1); | ||||
} | ||||
florianlink
|
r13 | QTextTable* PythonQtWrapper_QTextTable::new_QTextTable(QTextDocument* doc) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QTextTable(doc); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | QTextTableCell PythonQtWrapper_QTextTable::cellAt(QTextTable* theWrappedObject, const QTextCursor& c) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->cellAt(c)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QTextTable::rows(QTextTable* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->rows()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::insertRows(QTextTable* theWrappedObject, int pos, int num) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->insertRows(pos, num)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::mergeCells(QTextTable* theWrappedObject, int row, int col, int numRows, int numCols) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->mergeCells(row, col, numRows, numCols)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QTextTable::columns(QTextTable* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->columns()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QTextCursor PythonQtWrapper_QTextTable::rowStart(QTextTable* theWrappedObject, const QTextCursor& c) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->rowStart(c)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QTextTableFormat PythonQtWrapper_QTextTable::format(QTextTable* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->format()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::insertColumns(QTextTable* theWrappedObject, int pos, int num) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->insertColumns(pos, num)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QTextCursor PythonQtWrapper_QTextTable::rowEnd(QTextTable* theWrappedObject, const QTextCursor& c) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->rowEnd(c)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::setFormat(QTextTable* theWrappedObject, const QTextTableFormat& format) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFormat(format)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::splitCell(QTextTable* theWrappedObject, int row, int col, int numRows, int numCols) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->splitCell(row, col, numRows, numCols)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QTextTableCell PythonQtWrapper_QTextTable::cellAt(QTextTable* theWrappedObject, int position) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->cellAt(position)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::removeColumns(QTextTable* theWrappedObject, int pos, int num) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->removeColumns(pos, num)); | ||
} | ||||
void PythonQtWrapper_QTextTable::removeRows(QTextTable* theWrappedObject, int pos, int num) | ||||
{ | ||||
( theWrappedObject->removeRows(pos, num)); | ||||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QTextTable::resize(QTextTable* theWrappedObject, int rows, int cols) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->resize(rows, cols)); | ||
} | ||||
QTextTableCell PythonQtWrapper_QTextTable::cellAt(QTextTable* theWrappedObject, int row, int col) const | ||||
{ | ||||
return ( theWrappedObject->cellAt(row, col)); | ||||
} | ||||
void PythonQtWrapper_QTextTable::mergeCells(QTextTable* theWrappedObject, const QTextCursor& cursor) | ||||
{ | ||||
( theWrappedObject->mergeCells(cursor)); | ||||
florianlink
|
r13 | } | ||