def invoke(self, **params): local_params = Params(**params) if self.__plugin__ == None: return if self.__host_stack_object__ == None: return if self.__host_stack_object__: for signal in self.__plugin__.signals: _params = [] for param in signal.params: if not param.key == None: _params.append(getattr(local_params, param.key)) elif not param.value == None: if param.value.title() in ('True', 'False'): _params.append(param.value.title() == 'True') elif param.value == "None": _params.append(None) else: _params.append(param.value) if local_params.activity_description \ and local_params.activity_params: ActivityManager.saveActivity( PluginActivity( self.__ident__, description=local_params.activity_description, **get_subdict(params, keys=local_params.activity_params))) if len(params) > 0: self.__host_stack_object__.emit(signal.resolveIdent, *_params) else: self.__host_stack_object__.emit(signal.resolveIdent)
def invoke(self, **params): local_params = Params(**params) if self.__plugin__ == None: return if self.__host_stack_object__ == None: return if self.__host_stack_object__: for signal in self.__plugin__.signals: _params = [] for param in signal.params: if not param.key == None: _params.append(getattr(local_params, param.key)) elif not param.value == None: if param.value.title() in ('True', 'False'): _params.append(param.value.title() == 'True') elif param.value == "None": _params.append(None) else: _params.append(param.value) if local_params.activity_description \ and local_params.activity_params: ActivityManager.saveActivity(PluginActivity(self.__ident__, description=local_params.activity_description, **get_subdict(params, keys=local_params.activity_params))) if len(params) > 0: self.__host_stack_object__.emit(signal.resolveIdent, *_params) else: self.__host_stack_object__.emit(signal.resolveIdent)
def __call__(self): #this explicit import is required here to prevent from a cyclic import from hra_gui.qt.utils.plugins import PluginsManager PluginsManager.invokePlugin(self.__plugin_id__, inspect.stack(), **get_subdict(self.params, not_keys=['description']))
def __call__(self): #this explicit import is required here to prevent from a cyclic import from hra_gui.qt.utils.plugins import PluginsManager PluginsManager.invokePlugin( self.__plugin_id__, inspect.stack(), **get_subdict(self.params, not_keys=['description']))