23 #ifndef PYTHONQTSIGNALMAPPER_H
24 #define PYTHONQTSIGNALMAPPER_H
27 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API
31 #if (defined _DEBUG) && (defined WIN32)
33 #include "python/pythonWrapper.h"
36 #include "python/pythonWrapper.h"
40 #include "../global.h"
44 #include <qelapsedtimer.h>
76 void call(
void ** arguments);
82 bool isSame(
int signalId, PyObject* callable)
const;
110 PyObject *m_function;
122 int m_minRepeatInterval;
176 bool addSignalHandler(QObject *obj,
const char* signal,
int sigId, PyObject* callable, IntList &argTypeList,
int minRepeatInterval);
181 virtual int qt_metacall(QMetaObject::Call c,
int id,
void **arguments);
TargetMap m_targets
index of the last virtual slot managed by this instance (auto-incremented)
Definition: pythonQtSignalMapper.h:190
IntList m_argTypeList
type id's from QMetaType::type("..."), describing the arguments of the function-call ...
Definition: pythonQtSignalMapper.h:87
int signalId() const
gets the id of the original signal
Definition: pythonQtSignalMapper.h:70
Definition: pythonQtSignalMapper.h:50
unbounded python method, the function is stored in m_function, m_boundedInstance is NULL ...
Definition: pythonQtSignalMapper.h:94
QMap< int, PythonQtSignalTarget > TargetMap
list with all virtual slot targets that are the destination for any registered signal-slot-connection...
Definition: pythonQtSignalMapper.h:184
void removeSignalHandlers()
disconnects all signal-slot connections managed by this instane of PythonQtSignalMapper ...
Definition: pythonQtSignalMapper.cpp:178
virtual int qt_metacall(QMetaObject::Call c, int id, void **arguments)
overwrites qt_metacall from PythonQtSignalMapperBase.
Definition: pythonQtSignalMapper.cpp:199
CallableType m_callableType
type of the python callable (see CallableType)
Definition: pythonQtSignalMapper.h:112
bool isSame(int signalId, PyObject *callable) const
Compares this signal target with given values.
Definition: pythonQtSignalMapper.cpp:346
Definition: apiFunctionsGraph.cpp:39
void call(void **arguments)
invokes the python method or function
Definition: pythonQtSignalMapper.cpp:382
PythonQtSignalMapper()
constructor
Definition: pythonQtSignalMapper.cpp:69
~PythonQtSignalTarget()
destructor
Definition: pythonQtSignalMapper.cpp:330
CallableType
Definition: pythonQtSignalMapper.h:89
IntList argTypeList() const
returns list of type-numbers of arguments
Definition: pythonQtSignalMapper.h:79
int slotId() const
gets the id that was assigned to this simulated slot
Definition: pythonQtSignalMapper.h:73
int m_slotId
index of this slot
Definition: pythonQtSignalMapper.h:85
PythonQtSignalTarget()
empty constructor
Definition: pythonQtSignalMapper.cpp:219
int m_signalId
index of the connected signal
Definition: pythonQtSignalMapper.h:86
PythonQtSignalTarget & operator=(const PythonQtSignalTarget &rhs)
assignment operator
Definition: pythonQtSignalMapper.cpp:306
bool removeSignalHandler(QObject *obj, int sigId, PyObject *callable)
disconnects a certain connection
Definition: pythonQtSignalMapper.cpp:146
~PythonQtSignalMapper()
destructor
Definition: pythonQtSignalMapper.cpp:80
the callable is invalid
Definition: pythonQtSignalMapper.h:91
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:111
QElapsedTimer m_elapsedTimer
see m_minRepeatInterval
Definition: pythonQtSignalMapper.h:114
QString m_signalName
signature of the signal (mainly used for debugging reasons)
Definition: pythonQtSignalMapper.h:113
base class for PythonQtSignalMapper
Definition: pythonQtSignalMapper.h:141
function, written in C, stored in m_function. m_boundedInstance is NULL, since the potential self obj...
Definition: pythonQtSignalMapper.h:97
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
This class provides the possibility to redirect any signal emitted in an user-defined GUI to differen...
Definition: pythonQtSignalMapper.h:169