PythonQtWrapper_QSound.cpp
154 lines
| 4.9 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QSound.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
|
r24 | void PythonQtShell_QSound::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_QSound::staticMetaObject, | ||||
"childEvent(QSound*,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; | ||||
} | ||||
} | ||||
QSound::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QSound::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_QSound::staticMetaObject, | ||||
"customEvent(QSound*,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; | ||||
} | ||||
} | ||||
QSound::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QSound::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_QSound::staticMetaObject, | ||||
"event(QSound*,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 QSound::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QSound::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_QSound::staticMetaObject, | ||||
"eventFilter(QSound*,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 QSound::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QSound::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_QSound::staticMetaObject, | ||||
"timerEvent(QSound*,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; | ||||
} | ||||
} | ||||
QSound::timerEvent(arg__1); | ||||
} | ||||
|
r13 | QSound* PythonQtWrapper_QSound::new_QSound(const QString& filename, QObject* parent) | ||
{ | ||||
|
r24 | return new PythonQtShell_QSound(filename, parent); } | ||
|
r13 | |||
|
r24 | void PythonQtWrapper_QSound::static_QSound_play(const QString& filename) | ||
|
r13 | { | ||
|
r24 | QSound::play(filename); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QSound::loops(QSound* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->loops(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QSound::isFinished(QSound* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->isFinished(); | ||
|
r13 | } | ||
|
r28 | bool PythonQtWrapper_QSound::static_QSound_isAvailable() | ||
|
r13 | { | ||
|
r28 | return QSound::isAvailable(); | ||
|
r13 | } | ||
|
r28 | QString PythonQtWrapper_QSound::fileName(QSound* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->fileName(); | ||
|
r13 | } | ||
|
r28 | int PythonQtWrapper_QSound::loopsRemaining(QSound* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->loopsRemaining(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QSound::setLoops(QSound* theWrappedObject, int arg__1) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setLoops(arg__1); | ||
|
r13 | } | ||