PythonQtWrapper_QGraphicsSimpleTextItem.cpp
131 lines
| 4.7 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QGraphicsSimpleTextItem.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbrush.h> | ||||
#include <qfont.h> | ||||
#include <qgraphicsitem.h> | ||||
#include <qgraphicsscene.h> | ||||
#include <qpainter.h> | ||||
#include <qpainterpath.h> | ||||
#include <qpen.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
#include <qstyleoption.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | bool PythonQtShell_QGraphicsSimpleTextItem::isObscuredBy(const QGraphicsItem* item) const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isObscuredBy"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsSimpleTextItem::staticMetaObject, | ||||
"isObscuredBy(QGraphicsSimpleTextItem*,const QGraphicsItem* )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&item}; | ||||
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 = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsSimpleTextItem::isObscuredBy(item); | ||||
} | ||||
QPainterPath PythonQtShell_QGraphicsSimpleTextItem::opaqueArea() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "opaqueArea"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QGraphicsSimpleTextItem::staticMetaObject, | ||||
"opaqueArea(QGraphicsSimpleTextItem*)"); | ||||
QPainterPath 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 = *((QPainterPath *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QGraphicsSimpleTextItem::opaqueArea(); | ||||
} | ||||
florianlink
|
r13 | QGraphicsSimpleTextItem* PythonQtWrapper_QGraphicsSimpleTextItem::new_QGraphicsSimpleTextItem(QGraphicsItem* parent, QGraphicsScene* scene) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsSimpleTextItem(parent, scene); } | ||
florianlink
|
r13 | |||
QGraphicsSimpleTextItem* PythonQtWrapper_QGraphicsSimpleTextItem::new_QGraphicsSimpleTextItem(const QString& text, QGraphicsItem* parent, QGraphicsScene* scene) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QGraphicsSimpleTextItem(text, parent, scene); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | QPainterPath PythonQtWrapper_QGraphicsSimpleTextItem::shape(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->shape(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QFont PythonQtWrapper_QGraphicsSimpleTextItem::font(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->font(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGraphicsSimpleTextItem::isObscuredBy(QGraphicsSimpleTextItem* theWrappedObject, const QGraphicsItem* item) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QGraphicsSimpleTextItem*)theWrappedObject)->promoted_isObscuredBy(item); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsSimpleTextItem::paint(QGraphicsSimpleTextItem* theWrappedObject, QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->paint(painter, option, widget); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsSimpleTextItem::setText(QGraphicsSimpleTextItem* theWrappedObject, const QString& text) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setText(text); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QGraphicsSimpleTextItem::type(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->type(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QGraphicsSimpleTextItem::setFont(QGraphicsSimpleTextItem* theWrappedObject, const QFont& font) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setFont(font); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QGraphicsSimpleTextItem::text(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->text(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QGraphicsSimpleTextItem::contains(QGraphicsSimpleTextItem* theWrappedObject, const QPointF& point) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->contains(point); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QRectF PythonQtWrapper_QGraphicsSimpleTextItem::boundingRect(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->boundingRect(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QPainterPath PythonQtWrapper_QGraphicsSimpleTextItem::opaqueArea(QGraphicsSimpleTextItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QGraphicsSimpleTextItem*)theWrappedObject)->promoted_opaqueArea(); | ||
florianlink
|
r13 | } | ||