PySide::Signal Namespace
namespace PySide::SignalNamespace for the Signal type. More...
| Header: | #include <pysidesignal.h> |
Functions
| bool | checkInstanceType(PyObject *pyObj) |
| bool | checkQtSignal(const char *signature) |
| bool | checkType(PyObject *pyObj) |
| int | getCallbackSignature(QMetaMethod signal, QObject *receiver, PyObject *callback, bool encodeName) |
| PySide::Signal::EmitterData | getEmitterData(int *signal) |
| PyObject * | getObject(int *signal) |
| const char * | getSignature(int *signal) |
| bool | isQtSignal(const char *signature) |
| int * | newObjectFromMethod(QObject *sourceQObject, PyObject *source, const int &methods) |
| void | registerSignals(PyTypeObject *pyObj, const int *metaObject) |
| void | updateSourceObject(PyObject *source) |
Detailed Description
Function Documentation
bool Signal::checkInstanceType(PyObject *pyObj)
Returns whether pyObj is a PySideSignalInstance.
bool Signal::checkQtSignal(const char *signature)
Returns whether the signature is a Qt signal. This function is similar to isQtSignal(), however if it fails, it raises a Python error.
bool Signal::checkType(PyObject *pyObj)
Returns whether pyObj is a PySideSignal.
int Signal::getCallbackSignature(QMetaMethod signal, QObject *receiver, PyObject *callback, bool encodeName)
Returns the signature of a callback based on the signal and the receiver callback.
| Parameter | Meaning |
|---|---|
| signal | The signal. |
| receiver | The QObject which will receive the signal. |
| callback | Callback function which will be connected to the signal. |
| encodeName | Specifies whether the returned signature will be encoded in Qt signal/slot style. |
PySide::Signal::EmitterData Signal::getEmitterData(int *signal)
A convenience to retrieve the emitter data from the signal instance signal.
PyObject *Signal::getObject(int *signal)
Returns the internal reference to the object to which the signal is attached.
const char *Signal::getSignature(int *signal)
Returns the signature of the signal.
bool Signal::isQtSignal(const char *signature)
Returns whether the signature is a Qt signal based on the SIGNAL flag.
int *Signal::newObjectFromMethod(QObject *sourceQObject, PyObject *source, const int &methods)
Creates a Signal object which stays attached to a QObject class based on a list of QMetaMethods.
| Parameter | Meaning |
|---|---|
| sourceQObject | The QObject emitting the signal. |
| source | The Python object of sourceQObject on which the signal is registered. |
| methods | A list of QMetaMethod containing the supported signatures. |
Returns a new reference to a PySideSignalInstance.
void Signal::registerSignals(PyTypeObject *pyObj, const int *metaObject)
Registers all C++ signals of the QObject meta object metaObject on the Python type pyObj.
void Signal::updateSourceObject(PyObject *source)
Updates the signal instances in the instance dictionary of the Python object source from the signals found in its type's MRO.