|
|
#include "PythonQtWrapper_QPicture.h"
|
|
|
|
|
|
#include <PythonQtSignalReceiver.h>
|
|
|
#include <PythonQtMethodInfo.h>
|
|
|
#include <PythonQtConversion.h>
|
|
|
#include <QVariant>
|
|
|
#include <qdatastream.h>
|
|
|
#include <qiodevice.h>
|
|
|
#include <qpaintdevice.h>
|
|
|
#include <qpaintengine.h>
|
|
|
#include <qpainter.h>
|
|
|
#include <qpicture.h>
|
|
|
#include <qrect.h>
|
|
|
|
|
|
int PythonQtShell_QPicture::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_QPicture::staticMetaObject,
|
|
|
"devType(QPicture*)");
|
|
|
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 QPicture::devType();
|
|
|
}
|
|
|
int PythonQtShell_QPicture::metric(QPaintDevice::PaintDeviceMetric m) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QPicture::staticMetaObject,
|
|
|
"metric(QPicture*,QPaintDevice::PaintDeviceMetric )");
|
|
|
int returnValue;
|
|
|
void* args[2] = {NULL, (void*)&m};
|
|
|
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 QPicture::metric(m);
|
|
|
}
|
|
|
QPaintEngine* PythonQtShell_QPicture::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_QPicture::staticMetaObject,
|
|
|
"paintEngine(QPicture*)");
|
|
|
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 QPicture::paintEngine();
|
|
|
}
|
|
|
void PythonQtShell_QPicture::setData(const char* data, uint size)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QPicture::staticMetaObject,
|
|
|
"setData(QPicture*,const char* ,uint )");
|
|
|
void* args[3] = {NULL, (void*)&data, (void*)&size};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QPicture::setData(data, size);
|
|
|
}
|
|
|
QPicture* PythonQtWrapper_QPicture::new_QPicture(const QPicture& arg__1)
|
|
|
{
|
|
|
return new PythonQtShell_QPicture(arg__1); }
|
|
|
|
|
|
QPicture* PythonQtWrapper_QPicture::new_QPicture(int formatVersion)
|
|
|
{
|
|
|
return new PythonQtShell_QPicture(formatVersion); }
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::load(QPicture* theWrappedObject, const QString& fileName, const char* format)
|
|
|
{
|
|
|
return theWrappedObject->load(fileName, format);
|
|
|
}
|
|
|
|
|
|
int PythonQtWrapper_QPicture::devType(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QPicture*)theWrappedObject)->promoted_devType();
|
|
|
}
|
|
|
|
|
|
uint PythonQtWrapper_QPicture::size(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->size();
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::play(QPicture* theWrappedObject, QPainter* p)
|
|
|
{
|
|
|
return theWrappedObject->play(p);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QPicture::setBoundingRect(QPicture* theWrappedObject, const QRect& r)
|
|
|
{
|
|
|
theWrappedObject->setBoundingRect(r);
|
|
|
}
|
|
|
|
|
|
QRect PythonQtWrapper_QPicture::boundingRect(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->boundingRect();
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QPicture::writeTo(QPicture* theWrappedObject, QDataStream& arg__1)
|
|
|
{
|
|
|
arg__1 << (*theWrappedObject);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QPicture::readFrom(QPicture* theWrappedObject, QDataStream& arg__1)
|
|
|
{
|
|
|
arg__1 >> (*theWrappedObject);
|
|
|
}
|
|
|
|
|
|
QPaintEngine* PythonQtWrapper_QPicture::paintEngine(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QPicture*)theWrappedObject)->promoted_paintEngine();
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::save(QPicture* theWrappedObject, QIODevice* dev, const char* format)
|
|
|
{
|
|
|
return theWrappedObject->save(dev, format);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::isNull(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->isNull();
|
|
|
}
|
|
|
|
|
|
const char* PythonQtWrapper_QPicture::data(QPicture* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->data();
|
|
|
}
|
|
|
|
|
|
int PythonQtWrapper_QPicture::metric(QPicture* theWrappedObject, QPaintDevice::PaintDeviceMetric m) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QPicture*)theWrappedObject)->promoted_metric(m);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::load(QPicture* theWrappedObject, QIODevice* dev, const char* format)
|
|
|
{
|
|
|
return theWrappedObject->load(dev, format);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QPicture::save(QPicture* theWrappedObject, const QString& fileName, const char* format)
|
|
|
{
|
|
|
return theWrappedObject->save(fileName, format);
|
|
|
}
|
|
|
|
|
|
|