##// END OF EJS Templates
added builtin support for variants etc., this will replace the direct includes in PythonQt...
added builtin support for variants etc., this will replace the direct includes in PythonQt git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@129 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r73:40dc86970256
r93:7b53f64eae84
Show More
PythonQtWrapper_QTextObjectInterface.cpp
62 lines | 2.4 KiB | text/x-c | CppLexer
/ generated_cpp / com_trolltech_qt_gui / PythonQtWrapper_QTextObjectInterface.cpp
#include "PythonQtWrapper_QTextObjectInterface.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
#include <qpainter.h>
#include <qrect.h>
#include <qsize.h>
#include <qtextdocument.h>
#include <qtextformat.h>
void PythonQtShell_QTextObjectInterface::drawObject(QPainter* painter, const QRectF& rect, QTextDocument* doc, int posInDocument, const QTextFormat& format)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "drawObject");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"" , "QPainter*" , "const QRectF&" , "QTextDocument*" , "int" , "const QTextFormat&"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(6, argumentList);
void* args[6] = {NULL, (void*)&painter, (void*)&rect, (void*)&doc, (void*)&posInDocument, (void*)&format};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
}
QSizeF PythonQtShell_QTextObjectInterface::intrinsicSize(QTextDocument* doc, int posInDocument, const QTextFormat& format)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "intrinsicSize");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QSizeF" , "QTextDocument*" , "int" , "const QTextFormat&"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList);
QSizeF returnValue;
void* args[4] = {NULL, (void*)&doc, (void*)&posInDocument, (void*)&format};
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) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("intrinsicSize", methodInfo, result);
} else {
returnValue = *((QSizeF*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
QSizeF result;
return result;
}
QTextObjectInterface* PythonQtWrapper_QTextObjectInterface::new_QTextObjectInterface()
{
return new PythonQtShell_QTextObjectInterface(); }