PythonQtWrapper_QSvgGenerator.cpp
140 lines
| 4.6 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QSvgGenerator.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qiodevice.h> | ||||
#include <qpaintdevice.h> | ||||
#include <qpaintengine.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | int PythonQtShell_QSvgGenerator::devType() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSvgGenerator::staticMetaObject, | ||||
"devType(QSvgGenerator*)"); | ||||
int returnValue; | ||||
void* args[1] = {NULL}; | ||||
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) { | ||||
returnValue = *((int *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QSvgGenerator::devType(); | ||||
} | ||||
int PythonQtShell_QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSvgGenerator::staticMetaObject, | ||||
"metric(QSvgGenerator*,QPaintDevice::PaintDeviceMetric )"); | ||||
int returnValue; | ||||
void* args[2] = {NULL, (void*)&metric}; | ||||
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) { | ||||
returnValue = *((int *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QSvgGenerator::metric(metric); | ||||
} | ||||
QPaintEngine* PythonQtShell_QSvgGenerator::paintEngine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSvgGenerator::staticMetaObject, | ||||
"paintEngine(QSvgGenerator*)"); | ||||
QPaintEngine* returnValue; | ||||
void* args[1] = {NULL}; | ||||
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) { | ||||
returnValue = *((QPaintEngine* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QSvgGenerator::paintEngine(); | ||||
} | ||||
florianlink
|
r13 | QSvgGenerator* PythonQtWrapper_QSvgGenerator::new_QSvgGenerator() | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSvgGenerator(); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | QIODevice* PythonQtWrapper_QSvgGenerator::outputDevice(QSvgGenerator* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->outputDevice(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSvgGenerator::setOutputDevice(QSvgGenerator* theWrappedObject, QIODevice* outputDevice) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setOutputDevice(outputDevice); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSvgGenerator::setSize(QSvgGenerator* theWrappedObject, const QSize& size) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setSize(size); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSvgGenerator::setFileName(QSvgGenerator* theWrappedObject, const QString& fileName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setFileName(fileName); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QSvgGenerator::metric(QSvgGenerator* theWrappedObject, QPaintDevice::PaintDeviceMetric metric) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QSvgGenerator*)theWrappedObject)->promoted_metric(metric); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QPaintEngine* PythonQtWrapper_QSvgGenerator::paintEngine(QSvgGenerator* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QSvgGenerator*)theWrappedObject)->promoted_paintEngine(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QSvgGenerator::resolution(QSvgGenerator* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->resolution(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QSvgGenerator::setResolution(QSvgGenerator* theWrappedObject, int dpi) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setResolution(dpi); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSize PythonQtWrapper_QSvgGenerator::size(QSvgGenerator* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->size(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QSvgGenerator::fileName(QSvgGenerator* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->fileName(); | ||
florianlink
|
r13 | } | ||