Ejemplo n.º 1
0
 def __init__(self, default="#00149baf"):
     ConfigSelection.__init__(
         self,
         default=default,
         choices=[
             ("#00F0A30A", _("Amber")),
             ("#00ffffff", _("White")),
             ("#00825A2C", _("Brown")),
             ("#000050EF", _("Cobalt")),
             ("#00911d10", _("Crimson")),
             ("#001BA1E2", _("Cyan")),
             ("#00a61d4d", _("Magenta")),
             ("#00A4C400", _("Lime")),
             ("#006A00FF", _("Indigo")),
             ("#0070ad11", _("Green")),
             ("#00008A00", _("Emerald")),
             ("#0076608A", _("Mauve")),
             ("#006D8764", _("Olive")),
             ("#00c3461b", _("Orange")),
             ("#00F472D0", _("Pink")),
             ("#00E51400", _("Red")),
             ("#007A3B3F", _("Sienna")),
             ("#00647687", _("Steel")),
             ("#00149baf", _("Teal")),
             ("#006c0aab", _("Violet")),
             ("#00bf9217", _("Yellow")),
         ],
     )
Ejemplo n.º 2
0
	def __init__(self, default = "#00000000"):
		ConfigSelection.__init__(self, default=default, choices = BASIC_COLORS+[
				("CUSTOM", _("CUSTOM")),													
				("#00000000", _("Black")),
				("#00111111", _("PreBlack")),
				("#00444444", _("Darkgrey")),
				("#00bbbbbb", _("Lightgrey")),
				("#00999999", _("Grey")),
				("#006f0000", _("Darkred")),
				("#00295c00", _("Darkgreen")),
				("#006b3500", _("Darkbrown")),
				("#00446b00", _("Darklime")),
				("#00006b5b", _("Darkteal")),
				("#00004c6b", _("Darkcyan")),
				("#0000236b", _("Darkcobalt")),
				("#0030006b", _("Darkpurple")),
				("#006b003f", _("Darkmagenta")),
				("#0065006b", _("Darkpink"))])
Ejemplo n.º 3
0
 def __init__(self, default="#00000000"):
     ConfigSelection.__init__(
         self,
         default=default,
         choices=[
             ("CUSTOM", _("CUSTOM")),
             ("#00000000", _("Black")),
             ("#00111111", _("PreBlack")),
             ("#00ffffff", _("White")),
             ("#00444444", _("Darkgrey")),
             ("#00bbbbbb", _("Lightgrey")),
             ("#00999999", _("Grey")),
             ("#006f0000", _("Darkred")),
             ("#00295c00", _("Darkgreen")),
             ("#006b3500", _("Darkbrown")),
             ("#00446b00", _("Darklime")),
             ("#00006b5b", _("Darkteal")),
             ("#00004c6b", _("Darkcyan")),
             ("#0000236b", _("Darkcobalt")),
             ("#0030006b", _("Darkpurple")),
             ("#006b003f", _("Darkmagenta")),
             ("#0065006b", _("Darkpink")),
             ("#00F0A30A", _("Amber")),
             ("#00825A2C", _("Brown")),
             ("#000050EF", _("Cobalt")),
             ("#00911d10", _("Crimson")),
             ("#001BA1E2", _("Cyan")),
             ("#00a61d4d", _("Magenta")),
             ("#00A4C400", _("Lime")),
             ("#006A00FF", _("Indigo")),
             ("#0070ad11", _("Green")),
             ("#00008A00", _("Emerald")),
             ("#0076608A", _("Mauve")),
             ("#006D8764", _("Olive")),
             ("#00c3461b", _("Orange")),
             ("#00F472D0", _("Pink")),
             ("#00E51400", _("Red")),
             ("#007A3B3F", _("Sienna")),
             ("#00647687", _("Steel")),
             ("#00149baf", _("Teal")),
             ("#006c0aab", _("Violet")),
             ("#00bf9217", _("Yellow")),
         ],
     )
Ejemplo n.º 4
0
 def __init__(self, item, sub_page, mapping=None):
     SitemapWidget.__init__(self, item, sub_page)
     
     if mapping:
         if not isinstance(mapping, list):
             mapping = [mapping]
         choices = map(lambda mi: (mi["command"], mi["label"]), mapping)
         if len(mapping) == 1:
             # button mode
             if mapping[0]["command"] == item["state"]:
                 # disabled: empty text
                 choices = [(item["state"], "")] 
             else:
                 # add ability to send mapped command
                 choices.append((item["state"], mapping[0]["label"]))
     else:
         choices = [("ON", _("on")), ("OFF", _("off"))]
         
     ConfigSelection.__init__(self, choices=choices, default=item["state"])
Ejemplo n.º 5
0
    def __init__(self, item, sub_page, mapping=None):
        SitemapWidget.__init__(self, item, sub_page)

        item_state = item.get("state") if item else None
        if mapping:
            if not isinstance(mapping, list):
                mapping = [mapping]
            choices = map(lambda mi: (mi["command"], mi["label"]), mapping)
            if len(mapping) == 1 and item_state:
                # button mode
                if mapping[0]["command"] == item_state:
                    # disabled: empty text
                    choices = [(item_state, "")]
                else:
                    # add ability to send mapped command
                    choices.append((item_state, mapping[0]["label"]))
        else:
            choices = [("ON", _("on")), ("OFF", _("off"))]

        ConfigSelection.__init__(self, choices=choices, default=item_state)
Ejemplo n.º 6
0
 def __init__(self, default="#00000000"):
     ConfigSelection.__init__(self,
                              default=default,
                              choices=BASIC_COLORS +
                              [("CUSTOM", _("CUSTOM")),
                               ("#00000000", _("Black")),
                               ("#00111111", _("PreBlack")),
                               ("#00444444", _("Darkgrey")),
                               ("#00bbbbbb", _("Lightgrey")),
                               ("#00999999", _("Grey")),
                               ("#006f0000", _("Darkred")),
                               ("#00295c00", _("Darkgreen")),
                               ("#006b3500", _("Darkbrown")),
                               ("#00446b00", _("Darklime")),
                               ("#00006b5b", _("Darkteal")),
                               ("#00004c6b", _("Darkcyan")),
                               ("#0000236b", _("Darkcobalt")),
                               ("#0030006b", _("Darkpurple")),
                               ("#006b003f", _("Darkmagenta")),
                               ("#0065006b", _("Darkpink"))])
Ejemplo n.º 7
0
 def __init__(self, default='#00000000'):
     ConfigSelection.__init__(self,
                              default=default,
                              choices=[('CUSTOM', _('CUSTOM')),
                                       ('#00000000', _('Black')),
                                       ('#00111111', _('PreBlack')),
                                       ('#00ffffff', _('White')),
                                       ('#00444444', _('Darkgrey')),
                                       ('#00bbbbbb', _('Lightgrey')),
                                       ('#00999999', _('Grey')),
                                       ('#006f0000', _('Darkred')),
                                       ('#00295c00', _('Darkgreen')),
                                       ('#006b3500', _('Darkbrown')),
                                       ('#00446b00', _('Darklime')),
                                       ('#00006b5b', _('Darkteal')),
                                       ('#00004c6b', _('Darkcyan')),
                                       ('#0000236b', _('Darkcobalt')),
                                       ('#0030006b', _('Darkpurple')),
                                       ('#006b003f', _('Darkmagenta')),
                                       ('#0065006b', _('Darkpink')),
                                       ('#00F0A30A', _('Amber')),
                                       ('#00825A2C', _('Brown')),
                                       ('#000050EF', _('Cobalt')),
                                       ('#00911d10', _('Crimson')),
                                       ('#001BA1E2', _('Cyan')),
                                       ('#00a61d4d', _('Magenta')),
                                       ('#00A4C400', _('Lime')),
                                       ('#006A00FF', _('Indigo')),
                                       ('#0070ad11', _('Green')),
                                       ('#00008A00', _('Emerald')),
                                       ('#0076608A', _('Mauve')),
                                       ('#006D8764', _('Olive')),
                                       ('#00c3461b', _('Orange')),
                                       ('#00F472D0', _('Pink')),
                                       ('#00E51400', _('Red')),
                                       ('#007A3B3F', _('Sienna')),
                                       ('#00647687', _('Steel')),
                                       ('#00149baf', _('Teal')),
                                       ('#006c0aab', _('Violet')),
                                       ('#00bf9217', _('Yellow'))])
Ejemplo n.º 8
0
 def __init__(self, default='#00149baf'):
     ConfigSelection.__init__(self,
                              default=default,
                              choices=[('#00F0A30A', _('Amber')),
                                       ('#00ffffff', _('White')),
                                       ('#00825A2C', _('Brown')),
                                       ('#000050EF', _('Cobalt')),
                                       ('#00911d10', _('Crimson')),
                                       ('#001BA1E2', _('Cyan')),
                                       ('#00a61d4d', _('Magenta')),
                                       ('#00A4C400', _('Lime')),
                                       ('#006A00FF', _('Indigo')),
                                       ('#0070ad11', _('Green')),
                                       ('#00008A00', _('Emerald')),
                                       ('#0076608A', _('Mauve')),
                                       ('#006D8764', _('Olive')),
                                       ('#00c3461b', _('Orange')),
                                       ('#00F472D0', _('Pink')),
                                       ('#00E51400', _('Red')),
                                       ('#007A3B3F', _('Sienna')),
                                       ('#00647687', _('Steel')),
                                       ('#00149baf', _('Teal')),
                                       ('#006c0aab', _('Violet')),
                                       ('#00bf9217', _('Yellow'))])
Ejemplo n.º 9
0
	def __init__(self, choices, default = None):
		ConfigSelection.__init__(self, choices, default)
Ejemplo n.º 10
0
 def __init__(self, choices, default=None):
     ConfigSelection.__init__(self, choices, default)
Ejemplo n.º 11
0
 def __init__(self, item, sub_page, value):
     SitemapWidget.__init__(self, item, sub_page)
     ConfigSelection.__init__(self, choices=[value])
Ejemplo n.º 12
0
 def __init__(self, default="#00149baf"):
     ConfigSelection.__init__(self, default=default, choices=BASIC_COLORS)
Ejemplo n.º 13
0
	def __init__(self, encoder, choices, default = None):
		self.encoder = encoder
		ConfigSelection.__init__(self, choices, default)
Ejemplo n.º 14
0
 def __init__(self, item, sub_page, choices):
     SitemapWidget.__init__(self, item, sub_page)
     ConfigSelection.__init__(self,
                              default=item.get("state") if item else None,
                              choices=choices)
Ejemplo n.º 15
0
 def __init__(self, item, sub_page, choices):
     SitemapWidget.__init__(self, item, sub_page)
     ConfigSelection.__init__(self, default=item.get("state") if item else None, choices=choices)
Ejemplo n.º 16
0
 def __init__(self, item, sub_page, value):
     SitemapWidget.__init__(self, item, sub_page)
     ConfigSelection.__init__(self, choices=[value])
Ejemplo n.º 17
0
	def __init__(self, default = "#00149baf"):
		ConfigSelection.__init__(self, default=default, choices = BASIC_COLORS)