PythonQtWrapper_QCompleter.cpp
332 lines
| 11.2 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QChildEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QString" , "const QModelIndex&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
QString returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("pathFromIndex", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QString*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QStringList" , "const QString&"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
QStringList returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("splitPath", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QStringList*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QTimerEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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
|
r73 | void PythonQtWrapper_QCompleter::setCaseSensitivity(QCompleter* theWrappedObject, Qt::CaseSensitivity caseSensitivity) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCaseSensitivity(caseSensitivity)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QCompleter::pathFromIndex(QCompleter* theWrappedObject, const QModelIndex& index) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_pathFromIndex(index)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setCompletionMode(QCompleter* theWrappedObject, QCompleter::CompletionMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCompletionMode(mode)); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setModel(QCompleter* theWrappedObject, QAbstractItemModel* c) | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | ( theWrappedObject->setModel(c)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setCompletionColumn(QCompleter* theWrappedObject, int column) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCompletionColumn(column)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QCompleter::completionCount(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionCount()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QAbstractItemModel* PythonQtWrapper_QCompleter::completionModel(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionModel()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QCompleter::eventFilter(QCompleter* theWrappedObject, QObject* o, QEvent* e) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_eventFilter(o, e)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QCompleter::ModelSorting PythonQtWrapper_QCompleter::modelSorting(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->modelSorting()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QAbstractItemView* PythonQtWrapper_QCompleter::popup(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->popup()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QCompleter::splitPath(QCompleter* theWrappedObject, const QString& path) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_splitPath(path)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | Qt::CaseSensitivity PythonQtWrapper_QCompleter::caseSensitivity(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->caseSensitivity()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setModelSorting(QCompleter* theWrappedObject, QCompleter::ModelSorting sorting) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setModelSorting(sorting)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QCompleter::completionColumn(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionColumn()); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setWidget(QCompleter* theWrappedObject, QWidget* widget) | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | ( theWrappedObject->setWidget(widget)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QCompleter::completionPrefix(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionPrefix()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QCompleter::currentRow(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->currentRow()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QCompleter::completionRole(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionRole()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QCompleter::setCurrentRow(QCompleter* theWrappedObject, int row) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->setCurrentRow(row)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setPopup(QCompleter* theWrappedObject, QAbstractItemView* popup) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPopup(popup)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QCompleter::wrapAround(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->wrapAround()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QAbstractItemModel* PythonQtWrapper_QCompleter::model(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->model()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QWidget* PythonQtWrapper_QCompleter::widget(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->widget()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QCompleter::event(QCompleter* theWrappedObject, QEvent* arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QCompleter*)theWrappedObject)->promoted_event(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QCompleter::CompletionMode PythonQtWrapper_QCompleter::completionMode(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->completionMode()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QModelIndex PythonQtWrapper_QCompleter::currentIndex(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->currentIndex()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QCompleter::setCompletionRole(QCompleter* theWrappedObject, int role) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCompletionRole(role)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QCompleter::currentCompletion(QCompleter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->currentCompletion()); | ||
florianlink
|
r13 | } | ||