PythonQtWrapper_QCompleter.cpp
323 lines
| 10.7 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QCompleter.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractitemmodel.h> | ||||
#include <qabstractitemview.h> | ||||
#include <qbytearray.h> | ||||
#include <qcompleter.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qrect.h> | ||||
#include <qstringlist.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | void PythonQtShell_QCompleter::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_QCompleter::staticMetaObject, | ||||
"childEvent(QCompleter*,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; | ||||
} | ||||
} | ||||
QCompleter::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QCompleter::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_QCompleter::staticMetaObject, | ||||
"customEvent(QCompleter*,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; | ||||
} | ||||
} | ||||
QCompleter::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QCompleter::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_QCompleter::staticMetaObject, | ||||
"event(QCompleter*,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 QCompleter::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QCompleter::eventFilter(QObject* o, QEvent* e) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QCompleter::staticMetaObject, | ||||
"eventFilter(QCompleter*,QObject* ,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[3] = {NULL, (void*)&o, (void*)&e}; | ||||
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 QCompleter::eventFilter(o, e); | ||||
} | ||||
QString PythonQtShell_QCompleter::pathFromIndex(const QModelIndex& index) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "pathFromIndex"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QCompleter::staticMetaObject, | ||||
"pathFromIndex(QCompleter*,const QModelIndex& )"); | ||||
QString returnValue; | ||||
void* args[2] = {NULL, (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 = *((QString *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QCompleter::pathFromIndex(index); | ||||
} | ||||
QStringList PythonQtShell_QCompleter::splitPath(const QString& path) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "splitPath"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QCompleter::staticMetaObject, | ||||
"splitPath(QCompleter*,const QString& )"); | ||||
QStringList returnValue; | ||||
void* args[2] = {NULL, (void*)&path}; | ||||
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 = *((QStringList *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QCompleter::splitPath(path); | ||||
} | ||||
void PythonQtShell_QCompleter::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_QCompleter::staticMetaObject, | ||||
"timerEvent(QCompleter*,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; | ||||
} | ||||
} | ||||
QCompleter::timerEvent(arg__1); | ||||
} | ||||
florianlink
|
r13 | QCompleter* PythonQtWrapper_QCompleter::new_QCompleter(QAbstractItemModel* model, QObject* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QCompleter(model, parent); } | ||
florianlink
|
r13 | |||
QCompleter* PythonQtWrapper_QCompleter::new_QCompleter(QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QCompleter(parent); } | ||
florianlink
|
r13 | |||
QCompleter* PythonQtWrapper_QCompleter::new_QCompleter(const QStringList& completions, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QCompleter(completions, parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | QAbstractItemView* PythonQtWrapper_QCompleter::popup(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->popup(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QStringList PythonQtWrapper_QCompleter::splitPath(QCompleter* theWrappedObject, const QString& path) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_splitPath(path); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | Qt::CaseSensitivity PythonQtWrapper_QCompleter::caseSensitivity(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->caseSensitivity(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setModelSorting(QCompleter* theWrappedObject, QCompleter::ModelSorting sorting) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | theWrappedObject->setModelSorting(sorting); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QCompleter::completionColumn(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionColumn(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setWidget(QCompleter* theWrappedObject, QWidget* widget) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setWidget(widget); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QCompleter::completionPrefix(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionPrefix(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QCompleter::currentRow(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->currentRow(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QCompleter::completionRole(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionRole(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QCompleter::setCurrentRow(QCompleter* theWrappedObject, int row) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->setCurrentRow(row); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setPopup(QCompleter* theWrappedObject, QAbstractItemView* popup) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setPopup(popup); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QCompleter::wrapAround(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->wrapAround(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QAbstractItemModel* PythonQtWrapper_QCompleter::model(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->model(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QWidget* PythonQtWrapper_QCompleter::widget(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->widget(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QCompleter::event(QCompleter* theWrappedObject, QEvent* arg__1) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_event(arg__1); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QCompleter::CompletionMode PythonQtWrapper_QCompleter::completionMode(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionMode(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QModelIndex PythonQtWrapper_QCompleter::currentIndex(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->currentIndex(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setCompletionRole(QCompleter* theWrappedObject, int role) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setCompletionRole(role); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QCompleter::currentCompletion(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->currentCompletion(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setCaseSensitivity(QCompleter* theWrappedObject, Qt::CaseSensitivity caseSensitivity) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setCaseSensitivity(caseSensitivity); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QCompleter::pathFromIndex(QCompleter* theWrappedObject, const QModelIndex& index) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_pathFromIndex(index); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setCompletionMode(QCompleter* theWrappedObject, QCompleter::CompletionMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setCompletionMode(mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setModel(QCompleter* theWrappedObject, QAbstractItemModel* c) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setModel(c); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QCompleter::setCompletionColumn(QCompleter* theWrappedObject, int column) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setCompletionColumn(column); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | int PythonQtWrapper_QCompleter::completionCount(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionCount(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QAbstractItemModel* PythonQtWrapper_QCompleter::completionModel(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->completionModel(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QCompleter::eventFilter(QCompleter* theWrappedObject, QObject* o, QEvent* e) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_eventFilter(o, e); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QCompleter::ModelSorting PythonQtWrapper_QCompleter::modelSorting(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->modelSorting(); | ||
florianlink
|
r13 | } | ||