PythonQtWrapper_QBitmap.cpp
145 lines
| 4.7 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QBitmap.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbitmap.h> | ||||
#include <qbytearray.h> | ||||
#include <qcolor.h> | ||||
#include <qimage.h> | ||||
#include <qimagewriter.h> | ||||
#include <qiodevice.h> | ||||
#include <qmatrix.h> | ||||
#include <qpaintengine.h> | ||||
#include <qpixmap.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
#include <qtransform.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | int PythonQtShell_QBitmap::devType() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("devType", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QBitmap::devType(); | ||||
} | ||||
int PythonQtShell_QBitmap::metric(QPaintDevice::PaintDeviceMetric arg__1) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int" , "QPaintDevice::PaintDeviceMetric"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
int 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("metric", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QBitmap::metric(arg__1); | ||||
} | ||||
QPaintEngine* PythonQtShell_QBitmap::paintEngine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QPaintEngine*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QPaintEngine* returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("paintEngine", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QPaintEngine**)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QBitmap::paintEngine(); | ||||
} | ||||
florianlink
|
r13 | QBitmap* PythonQtWrapper_QBitmap::new_QBitmap() | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QBitmap(); } | ||
florianlink
|
r13 | |||
QBitmap* PythonQtWrapper_QBitmap::new_QBitmap(const QPixmap& arg__1) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QBitmap(arg__1); } | ||
florianlink
|
r13 | |||
QBitmap* PythonQtWrapper_QBitmap::new_QBitmap(const QSize& arg__1) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QBitmap(arg__1); } | ||
florianlink
|
r13 | |||
QBitmap* PythonQtWrapper_QBitmap::new_QBitmap(const QString& fileName, const char* format) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QBitmap(fileName, format); } | ||
florianlink
|
r13 | |||
QBitmap* PythonQtWrapper_QBitmap::new_QBitmap(int w, int h) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QBitmap(w, h); } | ||
florianlink
|
r13 | |||
florianlink
|
r24 | void PythonQtWrapper_QBitmap::clear(QBitmap* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->clear()); | ||
florianlink
|
r13 | } | ||
QBitmap PythonQtWrapper_QBitmap::transformed(QBitmap* theWrappedObject, const QMatrix& arg__1) const | ||||
{ | ||||
florianlink
|
r73 | return ( theWrappedObject->transformed(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QBitmap PythonQtWrapper_QBitmap::static_QBitmap_fromImage(const QImage& image, Qt::ImageConversionFlags flags) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QBitmap::fromImage(image, flags)); | ||
florianlink
|
r28 | } | ||
florianlink
|
r73 | QBitmap PythonQtWrapper_QBitmap::transformed(QBitmap* theWrappedObject, const QTransform& matrix) const | ||
florianlink
|
r28 | { | ||
florianlink
|
r73 | return ( theWrappedObject->transformed(matrix)); | ||
florianlink
|
r13 | } | ||