Source code for qct_interfaces.events

"""
The definition of the IInstallationEvents interface.
"""
#
# Copyright Qualcomm Technologies Inc, 2019.
# All Rights Reserved
#

# Thirdparty imports
from zope.interface import Interface

# Zope interface bends the rules slightly, so ignore these pylint warnings:
# pylint: disable=no-self-argument,inherit-non-class,no-method-argument


[docs]class IDatabaseEvents(Interface): """This utility defines a number of Signals that get fired when various global actions happen to device configuration databases. The standard usage within application code is something like this:: from zope.component import getUtility from qct_interfaces.events import IDatabaseEvents ... sig = getUtility(IDatabaseEvents).datebase_changed_signal() and then the signal can be fired with:: sig.emit() or connected to a callback function or method like this:: sig.connect(my_callback_func) """ def database_attribute_changed_signal(): """Returns a signal that gets fired when a config attribute has been changed. :return: The QSignal that is fired. The data on the QSignal callback is the attribute that has been changed (an instance of ``ConfigAttributeBase``). :rtype: QSignal(attribute) """ def device_domain_selected_signal(): """Returns a signal that gets fired when a domain item is selected in the Tree view of the database domains. :return: The QSignal that is fired. The data on the QSignal callback is the domain object (and instance of ``ConfigDomain``). :rtype: QSignal(domain) """