Beispiel #1
0
 def __init__(self, ilsa):
     self._name = "CPR"
     self._action = CPRAction(ilsa)
     ilsa.add(self)
     self._ilsa = ilsa
Beispiel #2
0
class CPRPlugin(PluginBase):
    def __init__(self, ilsa):
        self._name = "CPR"
        self._action = CPRAction(ilsa)
        ilsa.add(self)
        self._ilsa = ilsa

    @property
    def ilsa(self):
        logging.debug("In CPRPlugin::ilsa()")
        return self._ilsa
        
    @property
    def action(self):
        logging.debug("In CPRAction::action()")
        return self._action
        
    @property
    def name(self):
        logging.debug("In CPRAction::name()")
        return self._name
    
    @name.setter
    def name(self, name):
        logging.debug("In CPRAction::name.setter()")
        self._name = name

    def notify(self, *args, **kwargs):
        logging.debug("In CPRPlugin::notify()")
    
    def save(self):
        logging.debug("In CPRPlugin::save()")
        value = self._action.save()
        save = {"type" :  self.type, "value" : value}
        return save
    
    def restore(self, value=None):
        logging.debug("In CPRPlugin::restore()")
        if value:
            self._action.restore(value)
        
    
    @property
    def description(self):
        logging.debug("In CPRPlugin::description()")
        return "..."
    
    @property
    def separator(self):
        logging.debug("In CPRPlugin::separator()")
        return False
    
    @property
    def status(self):
        logging.debug("In CPRPlugin::status()")
        return True

    def addScene(self, scene):
        self._action.addScene(scene)
        
    def removeScene(self, scene):
        self._action.removeScene(scene)