Beispiel #1
0
 def __init__(self,
              container,
              state_names=('in', 'out'),
              state_colors=('blue', 'yellow'),
              initState=None):
     ClickableOutputLed.__init__(self, parent=container)
     self.stateActive = state_names[0]
     self.stateInactive = state_names[1]
     self._colorActive = state_colors[0]
     self._colorInactive = state_colors[1]
     self.current = initState
     self.set_ledcolor()
Beispiel #2
0
    def __init__(self,
                 dev,
                 active,
                 inactive,
                 client,
                 parent=None,
                 designMode=False,
                 colorActive='red',
                 colorInactive='green'):
        ClickableOutputLed.__init__(self, parent, designMode=designMode)
        self.dev = dev

        self._colorActive = colorActive
        self._colorInactive = colorInactive

        self.stateActive = 1 if active is None else active
        self.stateInactive = 0 if inactive is None else inactive

        self.setClient(client)
Beispiel #3
0
 def __init__(self, parent=None, designMode=False):
     ClickableOutputLed.__init__(self, parent, designMode)