PythonQtWrapper_QListWidgetItem.cpp
347 lines
| 11.4 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QListWidgetItem.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qbrush.h> | ||||
#include <qdatastream.h> | ||||
#include <qfont.h> | ||||
#include <qicon.h> | ||||
#include <qlistwidget.h> | ||||
#include <qsize.h> | ||||
|
r24 | QListWidgetItem* PythonQtShell_QListWidgetItem::clone() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "clone"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"clone(QListWidgetItem*)"); | ||||
QListWidgetItem* 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 = *((QListWidgetItem* *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QListWidgetItem::clone(); | ||||
} | ||||
QVariant PythonQtShell_QListWidgetItem::data(int role) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "data"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"data(QListWidgetItem*,int )"); | ||||
QVariant returnValue; | ||||
void* args[2] = {NULL, (void*)&role}; | ||||
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 = *((QVariant *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QListWidgetItem::data(role); | ||||
} | ||||
bool PythonQtShell_QListWidgetItem::operator_less(const QListWidgetItem& other) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "operator_less"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"operator_less(QListWidgetItem*,const QListWidgetItem& )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&other}; | ||||
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 QListWidgetItem::operator<(other); | ||||
} | ||||
void PythonQtShell_QListWidgetItem::read(QDataStream& in) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "read"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"read(QListWidgetItem*,QDataStream& )"); | ||||
void* args[2] = {NULL, (void*)&in}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QListWidgetItem::read(in); | ||||
} | ||||
void PythonQtShell_QListWidgetItem::setBackgroundColor(const QColor& color) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setBackgroundColor"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"setBackgroundColor(QListWidgetItem*,const QColor& )"); | ||||
void* args[2] = {NULL, (void*)&color}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QListWidgetItem::setBackgroundColor(color); | ||||
} | ||||
void PythonQtShell_QListWidgetItem::setData(int role, const QVariant& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"setData(QListWidgetItem*,int ,const QVariant& )"); | ||||
void* args[3] = {NULL, (void*)&role, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QListWidgetItem::setData(role, value); | ||||
} | ||||
void PythonQtShell_QListWidgetItem::write(QDataStream& out) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "write"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QListWidgetItem::staticMetaObject, | ||||
"write(QListWidgetItem*,QDataStream& )"); | ||||
void* args[2] = {NULL, (void*)&out}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QListWidgetItem::write(out); | ||||
} | ||||
|
r13 | QListWidgetItem* PythonQtWrapper_QListWidgetItem::new_QListWidgetItem(QListWidget* view, int type) | ||
{ | ||||
|
r24 | return new PythonQtShell_QListWidgetItem(view, type); } | ||
|
r13 | |||
QListWidgetItem* PythonQtWrapper_QListWidgetItem::new_QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view, int type) | ||||
{ | ||||
|
r24 | return new PythonQtShell_QListWidgetItem(icon, text, view, type); } | ||
|
r13 | |||
QListWidgetItem* PythonQtWrapper_QListWidgetItem::new_QListWidgetItem(const QString& text, QListWidget* view, int type) | ||||
{ | ||||
|
r24 | return new PythonQtShell_QListWidgetItem(text, view, type); } | ||
|
r13 | |||
|
r28 | Qt::ItemFlags PythonQtWrapper_QListWidgetItem::flags(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->flags(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setToolTip(QListWidgetItem* theWrappedObject, const QString& toolTip) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setToolTip(toolTip); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setCheckState(QListWidgetItem* theWrappedObject, Qt::CheckState state) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setCheckState(state); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setSizeHint(QListWidgetItem* theWrappedObject, const QSize& size) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setSizeHint(size); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setStatusTip(QListWidgetItem* theWrappedObject, const QString& statusTip) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setStatusTip(statusTip); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QListWidgetItem::textAlignment(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->textAlignment(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setSelected(QListWidgetItem* theWrappedObject, bool select) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setSelected(select); | ||
|
r13 | } | ||
|
r28 | QFont PythonQtWrapper_QListWidgetItem::font(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->font(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setIcon(QListWidgetItem* theWrappedObject, const QIcon& icon) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setIcon(icon); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setText(QListWidgetItem* theWrappedObject, const QString& text) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setText(text); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setTextAlignment(QListWidgetItem* theWrappedObject, int alignment) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setTextAlignment(alignment); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QListWidgetItem::text(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->text(); | ||
|
r13 | } | ||
|
r28 | QListWidget* PythonQtWrapper_QListWidgetItem::listWidget(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->listWidget(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setBackground(QListWidgetItem* theWrappedObject, const QBrush& brush) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setBackground(brush); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setWhatsThis(QListWidgetItem* theWrappedObject, const QString& whatsThis) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setWhatsThis(whatsThis); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QListWidgetItem::toolTip(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->toolTip(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setData(QListWidgetItem* theWrappedObject, int role, const QVariant& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_setData(role, value); | ||
|
r13 | } | ||
|
r28 | QBrush PythonQtWrapper_QListWidgetItem::background(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->background(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setFlags(QListWidgetItem* theWrappedObject, Qt::ItemFlags flags) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setFlags(flags); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::readFrom(QListWidgetItem* theWrappedObject, QDataStream& in) | ||
|
r13 | { | ||
|
r28 | in >> (*theWrappedObject); | ||
|
r13 | } | ||
|
r28 | QListWidgetItem* PythonQtWrapper_QListWidgetItem::clone(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_clone(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QListWidgetItem::statusTip(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->statusTip(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setFont(QListWidgetItem* theWrappedObject, const QFont& font) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setFont(font); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QListWidgetItem::type(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->type(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QListWidgetItem::whatsThis(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->whatsThis(); | ||
|
r13 | } | ||
|
r28 | Qt::CheckState PythonQtWrapper_QListWidgetItem::checkState(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->checkState(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QListWidgetItem::isSelected(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->isSelected(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setHidden(QListWidgetItem* theWrappedObject, bool hide) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setHidden(hide); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setForeground(QListWidgetItem* theWrappedObject, const QBrush& brush) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setForeground(brush); | ||
|
r13 | } | ||
|
r28 | QIcon PythonQtWrapper_QListWidgetItem::icon(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->icon(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::writeTo(QListWidgetItem* theWrappedObject, QDataStream& out) | ||
|
r13 | { | ||
|
r28 | out << (*theWrappedObject); | ||
|
r13 | } | ||
|
r28 | QSize PythonQtWrapper_QListWidgetItem::sizeHint(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->sizeHint(); | ||
|
r13 | } | ||
|
r28 | QVariant PythonQtWrapper_QListWidgetItem::data(QListWidgetItem* theWrappedObject, int role) const | ||
|
r13 | { | ||
|
r28 | return ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_data(role); | ||
|
r13 | } | ||
|
r28 | QBrush PythonQtWrapper_QListWidgetItem::foreground(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->foreground(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QListWidgetItem::isHidden(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->isHidden(); | ||
|
r13 | } | ||