PythonQtWrapper_QListWidgetItem.cpp
352 lines
| 11.7 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)) { | ||||
|
r73 | static const char* argumentList[] ={"QListWidgetItem*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QListWidgetItem* returnValue; | ||||
|
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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("clone", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QListWidgetItem**)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
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)) { | ||||
|
r73 | static const char* argumentList[] ={"QVariant" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
QVariant returnValue; | ||||
|
r24 | 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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("data", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QVariant*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
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)) { | ||||
|
r73 | static const char* argumentList[] ={"bool" , "const QListWidgetItem&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
|
r24 | 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) { | ||||
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("operator_less", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
|
r24 | } | ||
} | ||||
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)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QDataStream&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | 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)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "const QColor&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | 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)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "int" , "const QVariant&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
|
r24 | 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)) { | ||||
|
r73 | static const char* argumentList[] ={"" , "QDataStream&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
|
r24 | 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 | |||
|
r73 | int PythonQtWrapper_QListWidgetItem::type(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->type()); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QListWidgetItem::setCheckState(QListWidgetItem* theWrappedObject, Qt::CheckState state) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setCheckState(state)); | ||
|
r13 | } | ||
|
r73 | QBrush PythonQtWrapper_QListWidgetItem::foreground(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->foreground()); | ||
|
r13 | } | ||
|
r73 | QIcon PythonQtWrapper_QListWidgetItem::icon(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->icon()); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QListWidgetItem::isHidden(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->isHidden()); | ||
|
r13 | } | ||
|
r73 | QSize PythonQtWrapper_QListWidgetItem::sizeHint(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->sizeHint()); | ||
|
r13 | } | ||
|
r28 | QFont PythonQtWrapper_QListWidgetItem::font(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->font()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setStatusTip(QListWidgetItem* theWrappedObject, const QString& statusTip) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setStatusTip(statusTip)); | ||
|
r13 | } | ||
|
r73 | QString PythonQtWrapper_QListWidgetItem::text(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->text()); | ||
|
r13 | } | ||
|
r73 | QString PythonQtWrapper_QListWidgetItem::toolTip(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->toolTip()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setBackground(QListWidgetItem* theWrappedObject, const QBrush& brush) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setBackground(brush)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setIcon(QListWidgetItem* theWrappedObject, const QIcon& icon) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setIcon(icon)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setHidden(QListWidgetItem* theWrappedObject, bool hide) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setHidden(hide)); | ||
|
r13 | } | ||
|
r73 | QString PythonQtWrapper_QListWidgetItem::statusTip(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->statusTip()); | ||
|
r13 | } | ||
|
r73 | QVariant PythonQtWrapper_QListWidgetItem::data(QListWidgetItem* theWrappedObject, int role) const | ||
|
r13 | { | ||
|
r73 | return ( ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_data(role)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setWhatsThis(QListWidgetItem* theWrappedObject, const QString& whatsThis) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setWhatsThis(whatsThis)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setFont(QListWidgetItem* theWrappedObject, const QFont& font) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setFont(font)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setTextAlignment(QListWidgetItem* theWrappedObject, int alignment) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setTextAlignment(alignment)); | ||
|
r13 | } | ||
|
r73 | QListWidgetItem* PythonQtWrapper_QListWidgetItem::clone(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_clone()); | ||
|
r13 | } | ||
|
r73 | Qt::ItemFlags PythonQtWrapper_QListWidgetItem::flags(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->flags()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::readFrom(QListWidgetItem* theWrappedObject, QDataStream& in) | ||
|
r13 | { | ||
|
r73 | in >> (*theWrappedObject); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::writeTo(QListWidgetItem* theWrappedObject, QDataStream& out) | ||
|
r13 | { | ||
|
r73 | out << (*theWrappedObject); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setSelected(QListWidgetItem* theWrappedObject, bool select) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setSelected(select)); | ||
|
r13 | } | ||
|
r73 | QBrush PythonQtWrapper_QListWidgetItem::background(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->background()); | ||
|
r13 | } | ||
|
r28 | Qt::CheckState PythonQtWrapper_QListWidgetItem::checkState(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->checkState()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setData(QListWidgetItem* theWrappedObject, int role, const QVariant& value) | ||
|
r13 | { | ||
|
r73 | ( ((PythonQtPublicPromoter_QListWidgetItem*)theWrappedObject)->promoted_setData(role, value)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setToolTip(QListWidgetItem* theWrappedObject, const QString& toolTip) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setToolTip(toolTip)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setText(QListWidgetItem* theWrappedObject, const QString& text) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setText(text)); | ||
|
r13 | } | ||
|
r73 | bool PythonQtWrapper_QListWidgetItem::isSelected(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->isSelected()); | ||
|
r13 | } | ||
|
r73 | QListWidget* PythonQtWrapper_QListWidgetItem::listWidget(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->listWidget()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setForeground(QListWidgetItem* theWrappedObject, const QBrush& brush) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setForeground(brush)); | ||
|
r13 | } | ||
|
r73 | QString PythonQtWrapper_QListWidgetItem::whatsThis(QListWidgetItem* theWrappedObject) const | ||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->whatsThis()); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setSizeHint(QListWidgetItem* theWrappedObject, const QSize& size) | ||
|
r13 | { | ||
|
r73 | ( theWrappedObject->setSizeHint(size)); | ||
|
r13 | } | ||
|
r73 | void PythonQtWrapper_QListWidgetItem::setFlags(QListWidgetItem* theWrappedObject, Qt::ItemFlags flags) | ||
{ | ||||
( theWrappedObject->setFlags(flags)); | ||||
} | ||||
int PythonQtWrapper_QListWidgetItem::textAlignment(QListWidgetItem* theWrappedObject) const | ||||
|
r13 | { | ||
|
r73 | return ( theWrappedObject->textAlignment()); | ||
|
r13 | } | ||