PythonQtWrapper_QGLFramebufferObject.cpp
175 lines
| 6.6 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QGLFramebufferObject.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qglframebufferobject.h> | ||||
#include <qimage.h> | ||||
#include <qpaintdevice.h> | ||||
#include <qpaintengine.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | int PythonQtShell_QGLFramebufferObject::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_QGLFramebufferObject::staticMetaObject, | ||||
"devType(QGLFramebufferObject*)"); | ||||
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 QGLFramebufferObject::devType(); | ||||
} | ||||
int PythonQtShell_QGLFramebufferObject::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_QGLFramebufferObject::staticMetaObject, | ||||
"metric(QGLFramebufferObject*,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 QGLFramebufferObject::metric(metric); | ||||
} | ||||
QPaintEngine* PythonQtShell_QGLFramebufferObject::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_QGLFramebufferObject::staticMetaObject, | ||||
"paintEngine(QGLFramebufferObject*)"); | ||||
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 QGLFramebufferObject::paintEngine(); | ||||
} | ||||
florianlink
|
r13 | QGLFramebufferObject* PythonQtWrapper_QGLFramebufferObject::new_QGLFramebufferObject(const QSize& size, QGLFramebufferObject::Attachment attachment, unsigned int target, unsigned int internal_format) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGLFramebufferObject(size, attachment, target, internal_format); } | ||
florianlink
|
r13 | |||
QGLFramebufferObject* PythonQtWrapper_QGLFramebufferObject::new_QGLFramebufferObject(const QSize& size, unsigned int target) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGLFramebufferObject(size, target); } | ||
florianlink
|
r13 | |||
QGLFramebufferObject* PythonQtWrapper_QGLFramebufferObject::new_QGLFramebufferObject(int width, int height, QGLFramebufferObject::Attachment attachment, unsigned int target, unsigned int internal_format) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGLFramebufferObject(width, height, attachment, target, internal_format); } | ||
florianlink
|
r13 | |||
QGLFramebufferObject* PythonQtWrapper_QGLFramebufferObject::new_QGLFramebufferObject(int width, int height, unsigned int target) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGLFramebufferObject(width, height, target); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | unsigned int PythonQtWrapper_QGLFramebufferObject::texture(QGLFramebufferObject* theWrappedObject) const | ||
{ | ||||
return theWrappedObject->texture(); | ||||
} | ||||
int PythonQtWrapper_QGLFramebufferObject::devType(QGLFramebufferObject* theWrappedObject) const | ||||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QGLFramebufferObject*)theWrappedObject)->promoted_devType(); | ||
florianlink
|
r13 | } | ||
bool PythonQtWrapper_QGLFramebufferObject::bind(QGLFramebufferObject* theWrappedObject) | ||||
{ | ||||
florianlink
|
r28 | return theWrappedObject->bind(); | ||
florianlink
|
r13 | } | ||
void PythonQtWrapper_QGLFramebufferObject::drawTexture(QGLFramebufferObject* theWrappedObject, const QPointF& point, unsigned int textureId, unsigned int textureTarget) | ||||
{ | ||||
florianlink
|
r28 | theWrappedObject->drawTexture(point, textureId, textureTarget); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | bool PythonQtWrapper_QGLFramebufferObject::release(QGLFramebufferObject* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->release(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGLFramebufferObject::isValid(QGLFramebufferObject* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isValid(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSize PythonQtWrapper_QGLFramebufferObject::size(QGLFramebufferObject* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->size(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QImage PythonQtWrapper_QGLFramebufferObject::toImage(QGLFramebufferObject* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->toImage(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | int PythonQtWrapper_QGLFramebufferObject::metric(QGLFramebufferObject* theWrappedObject, QPaintDevice::PaintDeviceMetric metric) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QGLFramebufferObject*)theWrappedObject)->promoted_metric(metric); | ||
florianlink
|
r13 | } | ||
QPaintEngine* PythonQtWrapper_QGLFramebufferObject::paintEngine(QGLFramebufferObject* theWrappedObject) const | ||||
{ | ||||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QGLFramebufferObject*)theWrappedObject)->promoted_paintEngine(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QGLFramebufferObject::Attachment PythonQtWrapper_QGLFramebufferObject::attachment(QGLFramebufferObject* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->attachment(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QGLFramebufferObject::drawTexture(QGLFramebufferObject* theWrappedObject, const QRectF& target, unsigned int textureId, unsigned int textureTarget) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->drawTexture(target, textureId, textureTarget); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | unsigned int PythonQtWrapper_QGLFramebufferObject::handle(QGLFramebufferObject* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->handle(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGLFramebufferObject::static_QGLFramebufferObject_hasOpenGLFramebufferObjects() | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QGLFramebufferObject::hasOpenGLFramebufferObjects(); | ||
florianlink
|
r13 | } | ||