Exemplo n.º 1
0
 def __onSettingsChanged(self, diff):
     """Listener for event ISettingsCore.onSettingsChanged.
     :param diff: dictionary containing changes in settings."""
     if GRAPHICS.COLOR_BLIND in diff:
         self._parentObj.setColorBlindFlag(diff[GRAPHICS.COLOR_BLIND])
     if set(MARKERS.ALL()) & set(diff):
         self.__setMarkerSettings(notify=True)
    def _setMarkerSettings(self, notify=False):
        getter = self.settingsCore.getSetting
        result = {}
        for name in MARKERS.ALL():
            stgs = getter(name)
            for custOptName, custOptVal in self.__CUSTOM:
                if custOptName not in stgs:
                    _logger.warning('Option "%s" is not in list of options',
                                    custOptName)
                stgs[custOptName] = custOptVal

            result[name] = stgs

        self._parentObj.setMarkerSettings(result, notify=notify)
 def __onSettingsChanged(self, diff):
     if GRAPHICS.COLOR_BLIND in diff:
         self._parentObj.setColorBlindFlag(diff[GRAPHICS.COLOR_BLIND])
     if set(MARKERS.ALL()) & set(diff):
         self._setMarkerSettings(notify=True)
 def _setMarkerSettings(self, notify=False):
     getter = self.settingsCore.getSetting
     self._parentObj.setMarkerSettings(dict(
         ((name, getter(name)) for name in MARKERS.ALL())),
                                       notify=notify)
Exemplo n.º 5
0
 def __setMarkerSettings(self, notify=False):
     getter = self.settingsCore.getSetting
     self._parentObj.setMarkerSettings(dict(
         map(lambda name: (name, getter(name)), MARKERS.ALL())),
                                       notify=notify)