PythonQtWrapper_QAction.cpp
359 lines
| 10.3 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QAction.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qaction.h> | ||||
#include <qactiongroup.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qfont.h> | ||||
#include <qicon.h> | ||||
#include <qkeysequence.h> | ||||
#include <qlist.h> | ||||
#include <qmenu.h> | ||||
#include <qobject.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | void PythonQtShell_QAction::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_QAction::staticMetaObject, | ||||
"childEvent(QAction*,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; | ||||
} | ||||
} | ||||
QAction::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QAction::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_QAction::staticMetaObject, | ||||
"customEvent(QAction*,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; | ||||
} | ||||
} | ||||
QAction::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QAction::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_QAction::staticMetaObject, | ||||
"event(QAction*,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 QAction::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QAction::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_QAction::staticMetaObject, | ||||
"eventFilter(QAction*,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 QAction::eventFilter(arg__1, arg__2); | ||||
} | ||||
void PythonQtShell_QAction::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_QAction::staticMetaObject, | ||||
"timerEvent(QAction*,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; | ||||
} | ||||
} | ||||
QAction::timerEvent(arg__1); | ||||
} | ||||
florianlink
|
r13 | QAction* PythonQtWrapper_QAction::new_QAction(QObject* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QAction(parent); } | ||
florianlink
|
r13 | |||
QAction* PythonQtWrapper_QAction::new_QAction(const QIcon& icon, const QString& text, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QAction(icon, text, parent); } | ||
florianlink
|
r13 | |||
QAction* PythonQtWrapper_QAction::new_QAction(const QString& text, QObject* parent) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QAction(text, parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | void PythonQtWrapper_QAction::setToolTip(QAction* theWrappedObject, const QString& tip) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setToolTip(tip); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QIcon PythonQtWrapper_QAction::icon(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->icon(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | Qt::ShortcutContext PythonQtWrapper_QAction::shortcutContext(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->shortcutContext(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setData(QAction* theWrappedObject, const QVariant& var) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setData(var); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QFont PythonQtWrapper_QAction::font(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->font(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isEnabled(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isEnabled(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QKeySequence PythonQtWrapper_QAction::shortcut(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->shortcut(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setFont(QAction* theWrappedObject, const QFont& font) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setFont(font); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | QMenu* PythonQtWrapper_QAction::menu(QAction* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return theWrappedObject->menu(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::autoRepeat(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->autoRepeat(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::showStatusText(QAction* theWrappedObject, QWidget* widget) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->showStatusText(widget); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QAction::whatsThis(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->whatsThis(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isVisible(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isVisible(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QAction::MenuRole PythonQtWrapper_QAction::menuRole(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->menuRole(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QAction::text(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->text(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setWhatsThis(QAction* theWrappedObject, const QString& what) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setWhatsThis(what); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setActionGroup(QAction* theWrappedObject, QActionGroup* group) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setActionGroup(group); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setCheckable(QAction* theWrappedObject, bool arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setCheckable(arg__1); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setText(QAction* theWrappedObject, const QString& text) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setText(text); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isChecked(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isChecked(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setShortcuts(QAction* theWrappedObject, QKeySequence::StandardKey arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setShortcuts(arg__1); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setIconText(QAction* theWrappedObject, const QString& text) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setIconText(text); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QList<QKeySequence > PythonQtWrapper_QAction::shortcuts(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->shortcuts(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setShortcuts(QAction* theWrappedObject, const QList<QKeySequence >& shortcuts) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setShortcuts(shortcuts); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setShortcut(QAction* theWrappedObject, const QKeySequence& shortcut) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setShortcut(shortcut); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | QString PythonQtWrapper_QAction::toolTip(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->toolTip(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QAction::statusTip(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->statusTip(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QActionGroup* PythonQtWrapper_QAction::actionGroup(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->actionGroup(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setMenu(QAction* theWrappedObject, QMenu* menu) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setMenu(menu); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setMenuRole(QAction* theWrappedObject, QAction::MenuRole menuRole) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setMenuRole(menuRole); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QAction::iconText(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->iconText(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setAutoRepeat(QAction* theWrappedObject, bool arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setAutoRepeat(arg__1); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isCheckable(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isCheckable(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r24 | void PythonQtWrapper_QAction::setShortcutContext(QAction* theWrappedObject, Qt::ShortcutContext context) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setShortcutContext(context); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setIconVisibleInMenu(QAction* theWrappedObject, bool visible) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setIconVisibleInMenu(visible); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::activate(QAction* theWrappedObject, QAction::ActionEvent event) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->activate(event); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::event(QAction* theWrappedObject, QEvent* arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QAction*)theWrappedObject)->promoted_event(arg__1); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QList<QWidget* > PythonQtWrapper_QAction::associatedWidgets(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->associatedWidgets(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setStatusTip(QAction* theWrappedObject, const QString& statusTip) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setStatusTip(statusTip); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isIconVisibleInMenu(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isIconVisibleInMenu(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QVariant PythonQtWrapper_QAction::data(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->data(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QAction::isSeparator(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->isSeparator(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QWidget* PythonQtWrapper_QAction::parentWidget(QAction* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->parentWidget(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setSeparator(QAction* theWrappedObject, bool b) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setSeparator(b); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QAction::setIcon(QAction* theWrappedObject, const QIcon& icon) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setIcon(icon); | ||
florianlink
|
r13 | } | ||