PythonQtWrapper_QItemSelectionModel.cpp
257 lines
| 9.7 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QItemSelectionModel.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractitemmodel.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qitemselectionmodel.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
florianlink
|
r24 | void PythonQtShell_QItemSelectionModel::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_QItemSelectionModel::staticMetaObject, | ||||
"childEvent(QItemSelectionModel*,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; | ||||
} | ||||
} | ||||
QItemSelectionModel::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::clear() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "clear"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QItemSelectionModel::staticMetaObject, | ||||
"clear(QItemSelectionModel*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QItemSelectionModel::clear(); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::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_QItemSelectionModel::staticMetaObject, | ||||
"customEvent(QItemSelectionModel*,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; | ||||
} | ||||
} | ||||
QItemSelectionModel::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QItemSelectionModel::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_QItemSelectionModel::staticMetaObject, | ||||
"event(QItemSelectionModel*,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 QItemSelectionModel::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QItemSelectionModel::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QItemSelectionModel::staticMetaObject, | ||||
"eventFilter(QItemSelectionModel*,QObject* ,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; | ||||
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 QItemSelectionModel::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QItemSelectionModel::staticMetaObject, | ||||
"reset(QItemSelectionModel*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QItemSelectionModel::reset(); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "select"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QItemSelectionModel::staticMetaObject, | ||||
"select(QItemSelectionModel*,const QItemSelection& ,QItemSelectionModel::SelectionFlags )"); | ||||
void* args[3] = {NULL, (void*)&selection, (void*)&command}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QItemSelectionModel::select(selection, command); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "select"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QItemSelectionModel::staticMetaObject, | ||||
"select(QItemSelectionModel*,const QModelIndex& ,QItemSelectionModel::SelectionFlags )"); | ||||
void* args[3] = {NULL, (void*)&index, (void*)&command}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QItemSelectionModel::select(index, command); | ||||
} | ||||
void PythonQtShell_QItemSelectionModel::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_QItemSelectionModel::staticMetaObject, | ||||
"timerEvent(QItemSelectionModel*,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; | ||||
} | ||||
} | ||||
QItemSelectionModel::timerEvent(arg__1); | ||||
} | ||||
florianlink
|
r13 | QItemSelectionModel* PythonQtWrapper_QItemSelectionModel::new_QItemSelectionModel(QAbstractItemModel* model) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QItemSelectionModel(model); } | ||
florianlink
|
r13 | |||
QItemSelectionModel* PythonQtWrapper_QItemSelectionModel::new_QItemSelectionModel(QAbstractItemModel* model, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QItemSelectionModel(model, parent); } | ||
florianlink
|
r28 | QList<QModelIndex > PythonQtWrapper_QItemSelectionModel::selectedIndexes(QItemSelectionModel* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return theWrappedObject->selectedIndexes(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | const QAbstractItemModel* PythonQtWrapper_QItemSelectionModel::model(QItemSelectionModel* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->model(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QModelIndex PythonQtWrapper_QItemSelectionModel::currentIndex(QItemSelectionModel* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->currentIndex(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::rowIntersectsSelection(QItemSelectionModel* theWrappedObject, int row, const QModelIndex& parent) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->rowIntersectsSelection(row, parent); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QList<QModelIndex > PythonQtWrapper_QItemSelectionModel::selectedRows(QItemSelectionModel* theWrappedObject, int column) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->selectedRows(column); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | const QItemSelection PythonQtWrapper_QItemSelectionModel::selection(QItemSelectionModel* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->selection(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::isSelected(QItemSelectionModel* theWrappedObject, const QModelIndex& index) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isSelected(index); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::columnIntersectsSelection(QItemSelectionModel* theWrappedObject, int column, const QModelIndex& parent) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->columnIntersectsSelection(column, parent); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QList<QModelIndex > PythonQtWrapper_QItemSelectionModel::selectedColumns(QItemSelectionModel* theWrappedObject, int row) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->selectedColumns(row); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::isColumnSelected(QItemSelectionModel* theWrappedObject, int column, const QModelIndex& parent) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isColumnSelected(column, parent); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::isRowSelected(QItemSelectionModel* theWrappedObject, int row, const QModelIndex& parent) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isRowSelected(row, parent); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QItemSelectionModel::hasSelection(QItemSelectionModel* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->hasSelection(); | ||
florianlink
|
r13 | } | ||