23#ifndef PYTHONQTSIGNALMAPPER_H
24#define PYTHONQTSIGNALMAPPER_H
27 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API
29 #include "python/pythonWrapper.h"
36#include <qelapsedtimer.h>
68 void call(
void ** arguments);
102 PyObject *m_function;
114 int m_minRepeatInterval;
168 bool addSignalHandler(QObject *obj,
const char* signal,
int sigId, PyObject* callable, IntList &argTypeList,
int minRepeatInterval);
173 virtual int qt_metacall(QMetaObject::Call c,
int id,
void **arguments);
base class for PythonQtSignalMapper
Definition pythonQtSignalMapper.h:134
This class provides the possibility to redirect any signal emitted in an user-defined GUI to differen...
Definition pythonQtSignalMapper.h:162
virtual int qt_metacall(QMetaObject::Call c, int id, void **arguments)
overwrites qt_metacall from PythonQtSignalMapperBase.
Definition pythonQtSignalMapper.cpp:199
void removeSignalHandlers()
disconnects all signal-slot connections managed by this instance of PythonQtSignalMapper
Definition pythonQtSignalMapper.cpp:178
PythonQtSignalMapper()
constructor
Definition pythonQtSignalMapper.cpp:69
QMap< int, PythonQtSignalTarget > TargetMap
list with all virtual slot targets that are the destination for any registered signal-slot-connection
Definition pythonQtSignalMapper.h:176
bool removeSignalHandler(QObject *obj, int sigId, PyObject *callable)
disconnects a certain connection
Definition pythonQtSignalMapper.cpp:146
bool addSignalHandler(QObject *obj, const char *signal, int sigId, PyObject *callable, IntList &argTypeList, int minRepeatInterval)
creates signal-slot connection between the signal of any widget and a python method as slot
Definition pythonQtSignalMapper.cpp:107
TargetMap m_targets
index of the last virtual slot managed by this instance (auto-incremented)
Definition pythonQtSignalMapper.h:182
~PythonQtSignalMapper()
destructor
Definition pythonQtSignalMapper.cpp:80
Definition pythonQtSignalMapper.h:43
int signalId() const
gets the id of the original signal
Definition pythonQtSignalMapper.h:62
CallableType m_callableType
type of the python callable (see CallableType)
Definition pythonQtSignalMapper.h:104
~PythonQtSignalTarget()
destructor
Definition pythonQtSignalMapper.cpp:330
int slotId() const
gets the id that was assigned to this simulated slot
Definition pythonQtSignalMapper.h:65
PyObject * m_boundedInstance
weak reference to the python-class instance of the function (if the function is bounded) or NULL if t...
Definition pythonQtSignalMapper.h:103
int m_signalId
index of the connected signal
Definition pythonQtSignalMapper.h:78
IntList argTypeList() const
returns list of type-numbers of arguments
Definition pythonQtSignalMapper.h:71
QString m_signalName
signature of the signal (mainly used for debugging reasons)
Definition pythonQtSignalMapper.h:105
PythonQtSignalTarget()
empty constructor
Definition pythonQtSignalMapper.cpp:219
int m_slotId
index of this slot
Definition pythonQtSignalMapper.h:77
void call(void **arguments)
invokes the python method or function
Definition pythonQtSignalMapper.cpp:382
bool isSame(int signalId, PyObject *callable) const
Compares this signal target with given values.
Definition pythonQtSignalMapper.cpp:346
CallableType
Definition pythonQtSignalMapper.h:82
@ Callable_Invalid
the callable is invalid
Definition pythonQtSignalMapper.h:83
@ Callable_Function
function, written in C, stored in m_function. m_boundedInstance is NULL, since the potential self obj...
Definition pythonQtSignalMapper.h:89
@ Callable_Method
unbounded python method, the function is stored in m_function, m_boundedInstance is NULL
Definition pythonQtSignalMapper.h:86
PythonQtSignalTarget & operator=(const PythonQtSignalTarget &rhs)
assignment operator
Definition pythonQtSignalMapper.cpp:306
QElapsedTimer m_elapsedTimer
see m_minRepeatInterval
Definition pythonQtSignalMapper.h:106
IntList m_argTypeList
type id's from QMetaType::type("..."), describing the arguments of the function-call
Definition pythonQtSignalMapper.h:79
Definition apiFunctionsGraph.cpp:40