diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-09-16 11:36:32 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-09-16 14:22:02 -0300 |
commit | c06110168c39e5c44b9b11ff13fd6f9795199df3 (patch) | |
tree | 7007d43542c38c44f9ae709e2c087a7e7b590886 /PySide/QtCore | |
parent | f92262928a6ac0463d4fb3fe52e8650fd484fbdc (diff) |
Fixes bug #348 adding the method QState.addTransition(Signal, QAbstractTransition*).
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 073da0021..4d7e3e4f7 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -2380,6 +2380,26 @@ </modify-argument> </modify-function> + <!-- FIXME: the proper signature for this added function would be something like + addTransition(PySide.QtCore.Signal, QAbstractState*) + but that depends on bug #362. --> + <add-function signature="addTransition(PyObject*, QAbstractState*)" return-type="QSignalTransition*"> + <modify-argument index="return"> + <parent index="this" action="add"/> + </modify-argument> + <inject-code class="target" position="beginning"> + // Obviously the label used by the following goto is a very awkward solution, + // since it refers to a name very tied to the generator implementation. + // Check bug #362 for more information on this + // http://bugs.openbossa.org/show_bug.cgi?id=362 + if (!PyObject_TypeCheck(%1, &PySide::SignalInstance_Type)) + goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError; + PySide::SignalInstanceData* signalInstance = reinterpret_cast<PySide::SignalInstanceData*>(%1); + QObject* sender = %CONVERTTOCPP[QObject*](signalInstance->source); + %PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%CPPSELF->%FUNCTION_NAME(sender, signalInstance->signature, %2)); + </inject-code> + </add-function> + <modify-function signature="removeTransition(QAbstractTransition*)"> <modify-argument index="1"> <parent index="this" action="remove"/> |