##// END OF EJS Templates
added methods to qt namespace...
added methods to qt namespace git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@71 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r35:b8dce620ba5c
Show More
PythonQtWrapper_QStyledItemDelegate.cpp
379 lines | 16.4 KiB | text/x-c | CppLexer
/ generated_cpp / com_trolltech_qt_gui / PythonQtWrapper_QStyledItemDelegate.cpp
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include "PythonQtWrapper_QStyledItemDelegate.h"
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 #include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include <QVariant>
#include <qabstractitemmodel.h>
#include <qabstractitemview.h>
#include <qbytearray.h>
#include <qcoreevent.h>
#include <qevent.h>
#include <qitemeditorfactory.h>
#include <qlist.h>
#include <qlocale.h>
#include <qobject.h>
#include <qpainter.h>
#include <qsize.h>
#include <qstyleditemdelegate.h>
#include <qstyleoption.h>
#include <qwidget.h>
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 void PythonQtShell_QStyledItemDelegate::childEvent(QChildEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"childEvent(QStyledItemDelegate*,QChildEvent* )");
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::childEvent(arg__1);
}
QWidget* PythonQtShell_QStyledItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "createEditor");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"createEditor(QStyledItemDelegate*,QWidget* ,const QStyleOptionViewItem& ,const QModelIndex& )");
QWidget* returnValue;
void* args[4] = {NULL, (void*)&parent, (void*)&option, (void*)&index};
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 = *((QWidget* *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QStyledItemDelegate::createEditor(parent, option, index);
}
void PythonQtShell_QStyledItemDelegate::customEvent(QEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"customEvent(QStyledItemDelegate*,QEvent* )");
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::customEvent(arg__1);
}
QString PythonQtShell_QStyledItemDelegate::displayText(const QVariant& value, const QLocale& locale) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "displayText");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"displayText(QStyledItemDelegate*,const QVariant& ,const QLocale& )");
QString returnValue;
void* args[3] = {NULL, (void*)&value, (void*)&locale};
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 = *((QString *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QStyledItemDelegate::displayText(value, locale);
}
bool PythonQtShell_QStyledItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "editorEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"editorEvent(QStyledItemDelegate*,QEvent* ,QAbstractItemModel* ,const QStyleOptionViewItem& ,const QModelIndex& )");
bool returnValue;
void* args[5] = {NULL, (void*)&event, (void*)&model, (void*)&option, (void*)&index};
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 QStyledItemDelegate::editorEvent(event, model, option, index);
}
bool PythonQtShell_QStyledItemDelegate::event(QEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"event(QStyledItemDelegate*,QEvent* )");
bool returnValue;
void* args[2] = {NULL, (void*)&arg__1};
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 QStyledItemDelegate::event(arg__1);
}
bool PythonQtShell_QStyledItemDelegate::eventFilter(QObject* object, QEvent* event)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"eventFilter(QStyledItemDelegate*,QObject* ,QEvent* )");
bool returnValue;
void* args[3] = {NULL, (void*)&object, (void*)&event};
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 QStyledItemDelegate::eventFilter(object, event);
}
void PythonQtShell_QStyledItemDelegate::initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "initStyleOption");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"initStyleOption(QStyledItemDelegate*,QStyleOptionViewItem* ,const QModelIndex& )");
void* args[3] = {NULL, (void*)&option, (void*)&index};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::initStyleOption(option, index);
}
void PythonQtShell_QStyledItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paint");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"paint(QStyledItemDelegate*,QPainter* ,const QStyleOptionViewItem& ,const QModelIndex& )");
void* args[4] = {NULL, (void*)&painter, (void*)&option, (void*)&index};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::paint(painter, option, index);
}
void PythonQtShell_QStyledItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setEditorData");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"setEditorData(QStyledItemDelegate*,QWidget* ,const QModelIndex& )");
void* args[3] = {NULL, (void*)&editor, (void*)&index};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::setEditorData(editor, index);
}
void PythonQtShell_QStyledItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setModelData");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"setModelData(QStyledItemDelegate*,QWidget* ,QAbstractItemModel* ,const QModelIndex& )");
void* args[4] = {NULL, (void*)&editor, (void*)&model, (void*)&index};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::setModelData(editor, model, index);
}
QSize PythonQtShell_QStyledItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sizeHint");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"sizeHint(QStyledItemDelegate*,const QStyleOptionViewItem& ,const QModelIndex& )");
QSize returnValue;
void* args[3] = {NULL, (void*)&option, (void*)&index};
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 = *((QSize *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QStyledItemDelegate::sizeHint(option, index);
}
void PythonQtShell_QStyledItemDelegate::timerEvent(QTimerEvent* arg__1)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"timerEvent(QStyledItemDelegate*,QTimerEvent* )");
void* args[2] = {NULL, (void*)&arg__1};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::timerEvent(arg__1);
}
void PythonQtShell_QStyledItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "updateEditorGeometry");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QStyledItemDelegate::staticMetaObject,
"updateEditorGeometry(QStyledItemDelegate*,QWidget* ,const QStyleOptionViewItem& ,const QModelIndex& )");
void* args[4] = {NULL, (void*)&editor, (void*)&option, (void*)&index};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QStyledItemDelegate::updateEditorGeometry(editor, option, index);
}
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 QStyledItemDelegate* PythonQtWrapper_QStyledItemDelegate::new_QStyledItemDelegate(QObject* parent)
{
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 return new PythonQtShell_QStyledItemDelegate(parent); }
florianlink
added initial generated wrappers for Qt 4.4.3...
r13
florianlink
upgraded wrappers to current generator version...
r28 bool PythonQtWrapper_QStyledItemDelegate::editorEvent(QStyledItemDelegate* theWrappedObject, QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_editorEvent(event, model, option, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QItemEditorFactory* PythonQtWrapper_QStyledItemDelegate::itemEditorFactory(QStyledItemDelegate* theWrappedObject) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return theWrappedObject->itemEditorFactory();
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::setModelData(QStyledItemDelegate* theWrappedObject, QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_setModelData(editor, model, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::paint(QStyledItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_paint(painter, option, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::initStyleOption(QStyledItemDelegate* theWrappedObject, QStyleOptionViewItem* option, const QModelIndex& index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_initStyleOption(option, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 bool PythonQtWrapper_QStyledItemDelegate::eventFilter(QStyledItemDelegate* theWrappedObject, QObject* object, QEvent* event)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_eventFilter(object, event);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QWidget* PythonQtWrapper_QStyledItemDelegate::createEditor(QStyledItemDelegate* theWrappedObject, QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_createEditor(parent, option, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QString PythonQtWrapper_QStyledItemDelegate::displayText(QStyledItemDelegate* theWrappedObject, const QVariant& value, const QLocale& locale) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_displayText(value, locale);
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::setItemEditorFactory(QStyledItemDelegate* theWrappedObject, QItemEditorFactory* factory)
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 {
florianlink
upgraded wrappers to current generator version...
r28 theWrappedObject->setItemEditorFactory(factory);
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::setEditorData(QStyledItemDelegate* theWrappedObject, QWidget* editor, const QModelIndex& index) const
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_setEditorData(editor, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QSize PythonQtWrapper_QStyledItemDelegate::sizeHint(QStyledItemDelegate* theWrappedObject, const QStyleOptionViewItem& option, const QModelIndex& index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_sizeHint(option, index);
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QStyledItemDelegate::updateEditorGeometry(QStyledItemDelegate* theWrappedObject, QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QStyledItemDelegate*)theWrappedObject)->promoted_updateEditorGeometry(editor, option, index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }