class documentation

class ConnectorMixin(object): (source)

Known subclasses: zim.config.dicts.ControlledDict, zim.config.manager.ConfigFile, zim.gui.widgets.Dialog, zim.gui.widgets.WindowSidePaneWidget, zim.notebook.index.base.IndexerBase, zim.notebook.index.base.TreeModelMixinBase, zim.notebook.notebook.Notebook, zim.plugins.bookmarksbar.BookmarkBar, zim.plugins.ExtensionBase, zim.plugins.PluginClass, zim.plugins.PluginManagerClass, zim.plugins.tableeditor.TableModel, zim.plugins.tableofcontents.FloatingToC, zim.plugins.tableofcontents.ToCWidget, zim.plugins.tags.TagCloudWidget, zim.plugins.tasklist.gui.TaskListWindow, zim.plugins.versioncontrol.VCSApplicationBase

View In Hierarchy

Mixin class that has convenience methods for objects that want to connect to signals of other objects.
Method connectto Connect to signals of another object E.g.:
Method connectto_all Convenience method to combine multiple calls to connectto().
Method disconnect_all Disconnect all signals that have been connected with connectto and friends. Typically called when you want to destroy this object.
Method disconnect_from Disc all signals that have been connected with connectto and friends to a specific object.
Method _disconnect_from Undocumented
Instance Variable _connected_signals Undocumented
def connectto(self, obj, signal, handler=None, order=SIGNAL_NORMAL): (source)

Connect to signals of another object E.g.:

        self.connectto(button, 'clicked', self.on_button_clicked)
Parameters
objthe object to connect to
signalthe signal name
handlerthe callback function, or None to map to a method prefixed with "on_".
orderif order is SIGNAL_NORMAL then GObject.connect() is used, if order is SIGNAL_AFTER then GObject.connect_after() is used.
Returns
the handler id
def connectto_all(self, obj, signals, handler=None, order=SIGNAL_NORMAL): (source)
Convenience method to combine multiple calls to connectto().
Parameters
objthe object to connect to
signals

a list of signals. Elements can either be signal names or tuples where the sub-elements are the parameters for connectto(). For example:

        self.connectto_all(some_object (
                'changed' # defaults to "on_changed()
                ('open', on_open_something, None, SIGNAL_AFTER),
        ))

The optional parameters are used as default values when these parameters are not specified explicitly per signal.

handleroptional parameter
orderoptional parameter
def disconnect_all(self): (source)
Disconnect all signals that have been connected with connectto and friends. Typically called when you want to destroy this object.
def disconnect_from(self, obj): (source)
Disc all signals that have been connected with connectto and friends to a specific object.
def _disconnect_from(self, key): (source)

Undocumented

_connected_signals: dict = (source)

Undocumented