##// END OF EJS Templates
improved so that dict contains properties and that dir() shows all available things, including the derived base attributes...
improved so that dict contains properties and that dir() shows all available things, including the derived base attributes git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@70 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r34:5daedfb035c8
Show More
PythonQtWrapper_QUndoCommand.cpp
142 lines | 4.6 KiB | text/x-c | CppLexer
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include "PythonQtWrapper_QUndoCommand.h"
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 #include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include <QVariant>
#include <qundostack.h>
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 int PythonQtShell_QUndoCommand::id() const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "id");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QUndoCommand::staticMetaObject,
"id(QUndoCommand*)");
int returnValue;
void* args[1] = {NULL};
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 = *((int *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QUndoCommand::id();
}
bool PythonQtShell_QUndoCommand::mergeWith(const QUndoCommand* other)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mergeWith");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QUndoCommand::staticMetaObject,
"mergeWith(QUndoCommand*,const QUndoCommand* )");
bool returnValue;
void* args[2] = {NULL, (void*)&other};
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 QUndoCommand::mergeWith(other);
}
void PythonQtShell_QUndoCommand::redo()
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "redo");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QUndoCommand::staticMetaObject,
"redo(QUndoCommand*)");
void* args[1] = {NULL};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QUndoCommand::redo();
}
void PythonQtShell_QUndoCommand::undo()
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "undo");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QUndoCommand::staticMetaObject,
"undo(QUndoCommand*)");
void* args[1] = {NULL};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
QUndoCommand::undo();
}
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 QUndoCommand* PythonQtWrapper_QUndoCommand::new_QUndoCommand(QUndoCommand* parent)
{
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 return new PythonQtShell_QUndoCommand(parent); }
florianlink
added initial generated wrappers for Qt 4.4.3...
r13
QUndoCommand* PythonQtWrapper_QUndoCommand::new_QUndoCommand(const QString& text, QUndoCommand* parent)
{
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 return new PythonQtShell_QUndoCommand(text, parent); }
florianlink
added initial generated wrappers for Qt 4.4.3...
r13
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 void PythonQtWrapper_QUndoCommand::undo(QUndoCommand* theWrappedObject)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QUndoCommand*)theWrappedObject)->promoted_undo();
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 void PythonQtWrapper_QUndoCommand::setText(QUndoCommand* theWrappedObject, const QString& text)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 theWrappedObject->setText(text);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 QString PythonQtWrapper_QUndoCommand::text(QUndoCommand* theWrappedObject) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return theWrappedObject->text();
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 bool PythonQtWrapper_QUndoCommand::mergeWith(QUndoCommand* theWrappedObject, const QUndoCommand* other)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QUndoCommand*)theWrappedObject)->promoted_mergeWith(other);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 void PythonQtWrapper_QUndoCommand::redo(QUndoCommand* theWrappedObject)
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 ((PythonQtPublicPromoter_QUndoCommand*)theWrappedObject)->promoted_redo();
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 const QUndoCommand* PythonQtWrapper_QUndoCommand::child(QUndoCommand* theWrappedObject, int index) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return theWrappedObject->child(index);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 int PythonQtWrapper_QUndoCommand::childCount(QUndoCommand* theWrappedObject) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return theWrappedObject->childCount();
}
int PythonQtWrapper_QUndoCommand::id(QUndoCommand* theWrappedObject) const
{
return ((PythonQtPublicPromoter_QUndoCommand*)theWrappedObject)->promoted_id();
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }