PythonQtWrapper_QSettings.cpp
283 lines
| 9.0 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)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSettings::staticMetaObject, | ||||
"childEvent(QSettings*,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; | ||||
} | ||||
} | ||||
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)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSettings::staticMetaObject, | ||||
"customEvent(QSettings*,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; | ||||
} | ||||
} | ||||
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)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSettings::staticMetaObject, | ||||
"event(QSettings*,QEvent* )"); | ||||
bool returnValue; | ||||
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) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
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)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSettings::staticMetaObject, | ||||
"eventFilter(QSettings*,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 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)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QSettings::staticMetaObject, | ||||
"timerEvent(QSettings*,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; | ||||
} | ||||
} | ||||
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
|
r28 | bool PythonQtWrapper_QSettings::fallbacksEnabled(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->fallbacksEnabled(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QSettings::fileName(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->fileName(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::sync(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->sync(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSettings::Format PythonQtWrapper_QSettings::format(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->format(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QSettings::contains(QSettings* theWrappedObject, const QString& key) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->contains(key); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::endArray(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->endArray(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QSettings::applicationName(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->applicationName(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QSettings::group(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->group(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSettings::Scope PythonQtWrapper_QSettings::scope(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->scope(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::static_QSettings_setPath(QSettings::Format format, QSettings::Scope scope, const QString& path) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | QSettings::setPath(format, scope, path); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QSettings::event(QSettings* theWrappedObject, QEvent* event) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QSettings*)theWrappedObject)->promoted_event(event); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSettings::Format PythonQtWrapper_QSettings::static_QSettings_defaultFormat() | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QSettings::defaultFormat(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::setFallbacksEnabled(QSettings* theWrappedObject, bool b) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setFallbacksEnabled(b); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | int PythonQtWrapper_QSettings::beginReadArray(QSettings* theWrappedObject, const QString& prefix) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->beginReadArray(prefix); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QSettings::isWritable(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isWritable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QSettings::static_QSettings_setDefaultFormat(QSettings::Format format) | ||
florianlink
|
r13 | { | ||
florianlink
|
r24 | QSettings::setDefaultFormat(format); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QStringList PythonQtWrapper_QSettings::childGroups(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->childGroups(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::setArrayIndex(QSettings* theWrappedObject, int i) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setArrayIndex(i); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::setValue(QSettings* theWrappedObject, const QString& key, const QVariant& value) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setValue(key, value); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QSettings::Status PythonQtWrapper_QSettings::status(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->status(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::endGroup(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->endGroup(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::remove(QSettings* theWrappedObject, const QString& key) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->remove(key); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QVariant PythonQtWrapper_QSettings::value(QSettings* theWrappedObject, const QString& key, const QVariant& defaultValue) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->value(key, defaultValue); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QStringList PythonQtWrapper_QSettings::allKeys(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->allKeys(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::beginWriteArray(QSettings* theWrappedObject, const QString& prefix, int size) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->beginWriteArray(prefix, size); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::clear(QSettings* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->clear(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QStringList PythonQtWrapper_QSettings::childKeys(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->childKeys(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QSettings::organizationName(QSettings* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->organizationName(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QSettings::beginGroup(QSettings* theWrappedObject, const QString& prefix) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | theWrappedObject->beginGroup(prefix); | ||
florianlink
|
r13 | } | ||