Exemplo n.º 1
0
    def __setColorsSchemes(self):
        colors = GuiColorsLoader.load()
        defaultSchemes = {}
        for name in colors.schemasNames():
            if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX):
                continue
            defaultSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.DEFAULT_SUB_SCHEME)

        colorBlindSchemes = {}
        for name in colors.schemasNames():
            if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX):
                continue
            colorBlindSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.COLOR_BLIND_SUB_SCHEME)

        self._parentObj.setColorsSchemes(defaultSchemes, colorBlindSchemes)
Exemplo n.º 2
0
    def __setColorsSchemes(self, isColorBlind):
        colors = GuiColorsLoader.load()
        defaultSchemes = {}
        for name in colors.schemasNames():
            if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX):
                continue
            defaultSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.DEFAULT_SUB_SCHEME)

        colorBlindSchemes = {}
        for name in colors.schemasNames():
            if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX):
                continue
            colorBlindSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.COLOR_BLIND_SUB_SCHEME)

        self.as_setColorSchemesS(defaultSchemes, colorBlindSchemes)
        self.as_setColorBlindS(isColorBlind)
Exemplo n.º 3
0
 def __init__(self):
     super(ColorSchemeManager, self).__init__()
     self.colors = GuiColorsLoader.load()
Exemplo n.º 4
0
 def __getCurrentColor(self, colorBlind):
     colors = GuiColorsLoader.load()
     scheme = colors.getSubScheme('areaBorder', 'color_blind' if colorBlind else 'default')
     color = scheme['rgba'] / 255
     return color
Exemplo n.º 5
0
 def __init__(self):
     super(ColorSchemeManager, self).__init__()
     self.colors = GuiColorsLoader.load()