PythonQtWrapper_QPaintDevice.cpp
154 lines
| 4.8 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QPaintDevice.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qpaintdevice.h> | ||||
#include <qpaintengine.h> | ||||
|
r24 | int PythonQtShell_QPaintDevice::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_QPaintDevice::staticMetaObject, | ||||
"devType(QPaintDevice*)"); | ||||
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 QPaintDevice::devType(); | ||||
} | ||||
int PythonQtShell_QPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const | ||||
|
r13 | { | ||
|
r24 | if (_wrapper) { | ||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QPaintDevice::staticMetaObject, | ||||
"metric(QPaintDevice*,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 QPaintDevice::metric(metric); | ||||
} | ||||
QPaintEngine* PythonQtShell_QPaintDevice::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_QPaintDevice::staticMetaObject, | ||||
"paintEngine(QPaintDevice*)"); | ||||
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; | ||||
} | ||||
} | ||||
QPaintEngine* result; | ||||
return result; | ||||
|
r13 | } | ||
|
r24 | QPaintDevice* PythonQtWrapper_QPaintDevice::new_QPaintDevice() | ||
{ | ||||
return new PythonQtShell_QPaintDevice(); } | ||||
|
r13 | |||
|
r24 | bool PythonQtWrapper_QPaintDevice::paintingActive(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->paintingActive(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::numColors(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->numColors(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::depth(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->depth(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::logicalDpiX(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->logicalDpiX(); | ||
|
r24 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::physicalDpiY(QPaintDevice* theWrappedObject) const | ||
|
r24 | { | ||
|
r28 | return theWrappedObject->physicalDpiY(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::width(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->width(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::widthMM(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->widthMM(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::logicalDpiY(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->logicalDpiY(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::heightMM(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->heightMM(); | ||
|
r13 | } | ||
|
r24 | int PythonQtWrapper_QPaintDevice::devType(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QPaintDevice*)theWrappedObject)->promoted_devType(); | ||
|
r13 | } | ||
|
r24 | int PythonQtWrapper_QPaintDevice::height(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->height(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::metric(QPaintDevice* theWrappedObject, QPaintDevice::PaintDeviceMetric metric) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QPaintDevice*)theWrappedObject)->promoted_metric(metric); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QPaintDevice::physicalDpiX(QPaintDevice* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->physicalDpiX(); | ||
|
r13 | } | ||