PythonQtWrapper_QTableWidgetItem.cpp
335 lines
| 11.1 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QTableWidgetItem.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbrush.h> | ||||
#include <qdatastream.h> | ||||
#include <qfont.h> | ||||
#include <qicon.h> | ||||
#include <qsize.h> | ||||
#include <qtablewidget.h> | ||||
florianlink
|
r24 | QTableWidgetItem* PythonQtShell_QTableWidgetItem::clone() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "clone"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QTableWidgetItem*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QTableWidgetItem* 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("clone", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QTableWidgetItem**)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTableWidgetItem::clone(); | ||||
} | ||||
QVariant PythonQtShell_QTableWidgetItem::data(int role) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "data"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QVariant" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
QVariant returnValue; | ||||
florianlink
|
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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("data", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QVariant*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTableWidgetItem::data(role); | ||||
} | ||||
bool PythonQtShell_QTableWidgetItem::operator_less(const QTableWidgetItem& other) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "operator_less"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "const QTableWidgetItem&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("operator_less", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QTableWidgetItem::operator<(other); | ||||
} | ||||
void PythonQtShell_QTableWidgetItem::read(QDataStream& in) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "read"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QDataStream&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&in}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QTableWidgetItem::read(in); | ||||
} | ||||
void PythonQtShell_QTableWidgetItem::setData(int role, const QVariant& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "int" , "const QVariant&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
florianlink
|
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; | ||||
} | ||||
} | ||||
QTableWidgetItem::setData(role, value); | ||||
} | ||||
void PythonQtShell_QTableWidgetItem::write(QDataStream& out) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "write"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QDataStream&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&out}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QTableWidgetItem::write(out); | ||||
} | ||||
florianlink
|
r13 | QTableWidgetItem* PythonQtWrapper_QTableWidgetItem::new_QTableWidgetItem(const QIcon& icon, const QString& text, int type) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QTableWidgetItem(icon, text, type); } | ||
florianlink
|
r13 | |||
QTableWidgetItem* PythonQtWrapper_QTableWidgetItem::new_QTableWidgetItem(const QString& text, int type) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QTableWidgetItem(text, type); } | ||
florianlink
|
r13 | |||
QTableWidgetItem* PythonQtWrapper_QTableWidgetItem::new_QTableWidgetItem(int type) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QTableWidgetItem(type); } | ||
florianlink
|
r13 | |||
florianlink
|
r73 | QVariant PythonQtWrapper_QTableWidgetItem::data(QTableWidgetItem* theWrappedObject, int role) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QTableWidgetItem*)theWrappedObject)->promoted_data(role)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setIcon(QTableWidgetItem* theWrappedObject, const QIcon& icon) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setIcon(icon)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QFont PythonQtWrapper_QTableWidgetItem::font(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->font()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setStatusTip(QTableWidgetItem* theWrappedObject, const QString& statusTip) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStatusTip(statusTip)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QIcon PythonQtWrapper_QTableWidgetItem::icon(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->icon()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setBackground(QTableWidgetItem* theWrappedObject, const QBrush& brush) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setBackground(brush)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QTableWidgetItem::isSelected(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isSelected()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setSelected(QTableWidgetItem* theWrappedObject, bool select) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setSelected(select)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QBrush PythonQtWrapper_QTableWidgetItem::background(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->background()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setTextAlignment(QTableWidgetItem* theWrappedObject, int alignment) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setTextAlignment(alignment)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QTableWidgetItem::row(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->row()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setToolTip(QTableWidgetItem* theWrappedObject, const QString& toolTip) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setToolTip(toolTip)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QTableWidgetItem::type(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->type()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QBrush PythonQtWrapper_QTableWidgetItem::foreground(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->foreground()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::writeTo(QTableWidgetItem* theWrappedObject, QDataStream& out) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | out << (*theWrappedObject); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QTableWidgetItem::text(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->text()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setText(QTableWidgetItem* theWrappedObject, const QString& text) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setText(text)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setFlags(QTableWidgetItem* theWrappedObject, Qt::ItemFlags flags) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFlags(flags)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setSizeHint(QTableWidgetItem* theWrappedObject, const QSize& size) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setSizeHint(size)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setWhatsThis(QTableWidgetItem* theWrappedObject, const QString& whatsThis) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setWhatsThis(whatsThis)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | Qt::CheckState PythonQtWrapper_QTableWidgetItem::checkState(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->checkState()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QTableWidgetItem::whatsThis(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->whatsThis()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setFont(QTableWidgetItem* theWrappedObject, const QFont& font) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFont(font)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QTableWidgetItem::toolTip(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->toolTip()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | Qt::ItemFlags PythonQtWrapper_QTableWidgetItem::flags(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->flags()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setCheckState(QTableWidgetItem* theWrappedObject, Qt::CheckState state) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCheckState(state)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QTableWidget* PythonQtWrapper_QTableWidgetItem::tableWidget(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->tableWidget()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setForeground(QTableWidgetItem* theWrappedObject, const QBrush& brush) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setForeground(brush)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QTableWidgetItem::statusTip(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->statusTip()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QTableWidgetItem* PythonQtWrapper_QTableWidgetItem::clone(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QTableWidgetItem*)theWrappedObject)->promoted_clone()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QTableWidgetItem::textAlignment(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->textAlignment()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSize PythonQtWrapper_QTableWidgetItem::sizeHint(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->sizeHint()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QTableWidgetItem::column(QTableWidgetItem* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->column()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::readFrom(QTableWidgetItem* theWrappedObject, QDataStream& in) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | in >> (*theWrappedObject); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QTableWidgetItem::setData(QTableWidgetItem* theWrappedObject, int role, const QVariant& value) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( ((PythonQtPublicPromoter_QTableWidgetItem*)theWrappedObject)->promoted_setData(role, value)); | ||
florianlink
|
r13 | } | ||