PythonQtWrapper_QSettings.cpp
286 lines
| 9.2 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QSettings.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QStringList> | ||
#include <QVariant> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qsettings.h> | ||||
#include <qstringlist.h> | ||||
florianlink
|
r24 | void PythonQtShell_QSettings::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; | ||||
} | ||||
} | ||||
QSettings::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QSettings::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; | ||||
} | ||||
} | ||||
QSettings::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QSettings::event(QEvent* event) | ||||
{ | ||||
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*)&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) { | ||||
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 QSettings::event(event); | ||||
} | ||||
bool PythonQtShell_QSettings::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
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*)&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) { | ||||
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 QSettings::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QSettings::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; | ||||
} | ||||
} | ||||
QSettings::timerEvent(arg__1); | ||||
} | ||||
florianlink
|
r13 | QSettings* PythonQtWrapper_QSettings::new_QSettings(QObject* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSettings(parent); } | ||
florianlink
|
r13 | |||
QSettings* PythonQtWrapper_QSettings::new_QSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSettings(format, scope, organization, application, parent); } | ||
florianlink
|
r13 | |||
QSettings* PythonQtWrapper_QSettings::new_QSettings(QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSettings(scope, organization, application, parent); } | ||
florianlink
|
r13 | |||
QSettings* PythonQtWrapper_QSettings::new_QSettings(const QString& fileName, QSettings::Format format, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSettings(fileName, format, parent); } | ||
florianlink
|
r13 | |||
QSettings* PythonQtWrapper_QSettings::new_QSettings(const QString& organization, const QString& application, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSettings(organization, application, parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r73 | QSettings::Format PythonQtWrapper_QSettings::format(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->format()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::clear(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->clear()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSettings::Format PythonQtWrapper_QSettings::static_QSettings_defaultFormat() | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSettings::defaultFormat()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSettings::organizationName(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->organizationName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QSettings::contains(QSettings* theWrappedObject, const QString& key) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->contains(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSettings::Scope PythonQtWrapper_QSettings::scope(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->scope()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::setFallbacksEnabled(QSettings* theWrappedObject, bool b) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFallbacksEnabled(b)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSettings::event(QSettings* theWrappedObject, QEvent* event) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QSettings*)theWrappedObject)->promoted_event(event)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSettings::childGroups(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->childGroups()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::static_QSettings_setDefaultFormat(QSettings::Format format) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | (QSettings::setDefaultFormat(format)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::beginGroup(QSettings* theWrappedObject, const QString& prefix) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->beginGroup(prefix)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSettings::fallbacksEnabled(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->fallbacksEnabled()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::beginWriteArray(QSettings* theWrappedObject, const QString& prefix, int size) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->beginWriteArray(prefix, size)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::endArray(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->endArray()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::static_QSettings_setPath(QSettings::Format format, QSettings::Scope scope, const QString& path) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | (QSettings::setPath(format, scope, path)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSettings::applicationName(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->applicationName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSettings::group(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->group()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSettings::isWritable(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isWritable()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::setValue(QSettings* theWrappedObject, const QString& key, const QVariant& value) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setValue(key, value)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::remove(QSettings* theWrappedObject, const QString& key) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->remove(key)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSettings::Status PythonQtWrapper_QSettings::status(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->status()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QVariant PythonQtWrapper_QSettings::value(QSettings* theWrappedObject, const QString& key, const QVariant& defaultValue) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->value(key, defaultValue)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSettings::allKeys(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->allKeys()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSettings::childKeys(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->childKeys()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::setArrayIndex(QSettings* theWrappedObject, int i) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setArrayIndex(i)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::endGroup(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->endGroup()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QSettings::beginReadArray(QSettings* theWrappedObject, const QString& prefix) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->beginReadArray(prefix)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSettings::sync(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->sync()); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSettings::fileName(QSettings* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | return ( theWrappedObject->fileName()); | ||
florianlink
|
r13 | } | ||