123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
- .. module:: callbacks
- .. _callbacks:
- Module callbacks
- ================
- .. py:class:: NoCallbackError(Exception)
- .. py:class:: CallbackExistsError(Exception)
- .. py:class:: CallbackHandler(QtCore.QObject)
- Handler for custom callbacks.
- It can handle synchronous callbacks as well as async callbacks (using pyqtSignals)
- .. py:method:: __init__(self)
- .. py:method:: callback(self, name, *args, **kwargs)
- Call all registered callback method for name
- This passes all additional arguments and keyword arguments down to the callbacks
- NOTE: all callbacks therefore need to accept the same number of arguments
- :param name: the name for which the callbacks are to be called
- :param args: arguments to be passed to the callbacks
- :param kwargs: keyword arguments to be passed to the callbacks
- .. py:method:: __async_callback_receiver(self, name, *args)
- Internal Method (Called when async callbacks are to be executed)
- .. py:method:: async_callback(self, name, *args, **kwargs)
- Perform a async callback (same as callback but through pyqtSignal and therefore allowed in threads)
- :param name: the name for which the callbacks are to be called
- :param args: arguments to be passed to the callbacks
- :param kwargs: keyword arguments to be passed to the callbacks
- .. py:method:: add_callback(self, name, callback)
- Register a callback for name
- :param name: the name to register against
- :param callback: the callback to register
- .. py:method:: delete_callback(self, name, callback)
- Delete a callback from name
- if no callback for name is left the whole group is deleted
- :param name: the name to delete the callback from
- :param callback: the callback to delete
- .. py:method:: delete_callback_class(self, name)
- Delete a whole callback class
- :param name: the name of the class
|