def __init__(self, parent, *args): self.__value_set_notification_cb = None ChangeNotifierDict.__init__(self) self.parent = parent self.enabled = 0 self.timed = 0 self.changes = {'enabled': 0, 'timed': 0}
def __init__(self, parent, *args): self.__value_set_notification_cb = None ChangeNotifierDict.__init__(self) self.parent = parent self.enabled = 0 self.timed = 0 self.changes = {'enabled':0, 'timed':0}
def __init__(self, ctrl_be, *args): ChangeNotifierDict.__init__(self) self.ctrl_be = ctrl_be
def count_change(self, change, attr, value): ChangeNotifierDict.count_change(self, change, attr, value) increment = 1 if change else -1 self.changes[attr] += increment
def __setattr__(self, name, value): ChangeNotifierDict.__setattr__(self, name, value) # If configured, notifies about a value being set if self.__value_set_notification_cb: self.__value_set_notification_cb(name, value)