Пример #1
0
    def __init__(self):
        """Constructor"""
        if LOG_CAPTURE_STDOUT:
            import sys
            from logging import INFO, ERROR
            from msa import StreamToLogger
            sys.stdout = StreamToLogger(sesion.logger, INFO)
            sys.stderr = StreamToLogger(sesion.logger, ERROR)
        self.constants_sent = False
        self.send_function = None
        self.set_controller()
        self.es_modulo_web = True
        self.web_template = "voto"
        Modulo.__init__(self)
        self.estado = None

        self.ret_code = MODULO_VOTO
        self.volvera = None
        self._metiendo_papel = False
        self.momento_ultimo_voto = None

        self.registrador = Registrador(self._fin_registro, self.seleccion,
                                       self)
        self.sesion = sesion
        self.tiempo_verificacion = 5000

        self.rampa = RampaVoto(self)
Пример #2
0
    def __init__(self):
        """Constructor"""
        if LOG_CAPTURE_STDOUT:
            import sys
            from logging import INFO, ERROR
            from msa import StreamToLogger
            sys.stdout = StreamToLogger(sesion.logger, INFO)
            sys.stderr = StreamToLogger(sesion.logger, ERROR)
        self.constants_sent = False
        self.send_function = None
        self.set_controller()
        self.es_modulo_web = True
        self.web_template = "voto"
        Modulo.__init__(self)
        self.estado = None

        self.ret_code = MODULO_VOTO
        self.volvera = None
        self._metiendo_papel = False
        self.momento_ultimo_voto = None

        self.registrador = Registrador(self._fin_registro,
                                       self.seleccion, self)
        self.sesion = sesion
        self.tiempo_verificacion = 5000

        self.rampa = RampaVoto(self)
Пример #3
0
    def __init__(self, mensaje):
        Modulo.__init__(self)
        self.ret_code = MODULO_ADMIN

        lbl = gtk.Label()
        lbl.set_markup(_("formato_titulo") % mensaje)
        lbl.modify_font(DEFAULT_FONT)
        panel = Panel()
        panel.add(lbl)
        self.set_pantalla(panel)
Пример #4
0
    def __init__(self, mensaje):
        Modulo.__init__(self)
        self.ret_code = MODULO_ADMIN

        lbl = gtk.Label()
        lbl.set_markup(_("formato_titulo") % mensaje)
        lbl.modify_font(DEFAULT_FONT)
        panel = Panel()
        panel.add(lbl)
        self.set_pantalla(panel)
Пример #5
0
    def __init__(self):
        """Constructor"""
        self.es_modulo_web = True
        self.web_template = "apertura"
        self.rampa = RampaApertura(self)
        self.controller = ControllerInteraccion(self, modulo=MODULO_APERTURA)
        self._mensaje = None

        Modulo.__init__(self)

        self.ret_code = MODULO_APERTURA
        self.estado = E_INICIAL
        self._cargar_ui_apertura()
Пример #6
0
    def __init__(self):
        """Constructor"""
        self.es_modulo_web = True
        self.web_template = "apertura"
        self.rampa = RampaApertura(self)
        self.controller = ControllerInteraccion(self, modulo=MODULO_APERTURA)
        self._mensaje = None

        Modulo.__init__(self)

        self.ret_code = MODULO_APERTURA
        self.estado = E_INICIAL
        self._cargar_ui_apertura()
Пример #7
0
    def __init__(self):
        """ Constructor """
        self.controller = CalibratorController(self, FAKE, None,
                                               MISCLICK_THRESHOLD,
                                               DUALCLICK_THRESHOLD,
                                               FINGER_DELTA, TIMEOUT,
                                               FAST_START, NPOINTS, AUTO_CLOSE)
        self.es_modulo_web = True
        self.web_template = "calibrador"

        # Esto hace que no se apague la pantalla
        system("DISPLAY=%s xset s off; xset -dpms" % getenv("DISPLAY", ":0"))

        Modulo.__init__(self)
Пример #8
0
    def __init__(self):
        """ Constructor """
        self.controller = CalibratorController(self, FAKE, None,
                                               MISCLICK_THRESHOLD,
                                               DUALCLICK_THRESHOLD,
                                               FINGER_DELTA, TIMEOUT,
                                               FAST_START, NPOINTS, AUTO_CLOSE)
        self.es_modulo_web = True
        self.web_template = "calibrador"

        # Esto hace que no se apague la pantalla
        system("DISPLAY=%s xset s off; xset -dpms" % getenv("DISPLAY",
                                                            ":0"))

        Modulo.__init__(self)
Пример #9
0
    def __init__(self):
        self.controller = ControllerAdmin(self)
        self.es_modulo_web = True
        self.web_template = "admin"

        Modulo.__init__(self)
        levantar_locales()

        self._vaciar_impresora()
        self.ret_code = MODULO_ADMIN  # Esto hace que salga del gtk_main()
        self.mesa_abierta = sesion.apertura is not None or not \
            REALIZAR_APERTURA
        self.modo_mantenimiento = False
        self.boton_mantenimiento = False

        self.rampa = RampaAdmin(self)
Пример #10
0
    def __init__(self):
        self.controller = ControllerAdmin(self)
        self.es_modulo_web = True
        self.web_template = "admin"

        Modulo.__init__(self)
        levantar_locales()

        self._vaciar_impresora()
        self.ret_code = MODULO_ADMIN  # Esto hace que salga del gtk_main()
        self.mesa_abierta = sesion.apertura is not None or not \
            REALIZAR_APERTURA
        self.modo_mantenimiento = False
        self.boton_mantenimiento = False

        self.rampa = RampaAdmin(self)
Пример #11
0
    def __init__(self):
        self._mesa_anterior = None
        self.controller = ControllerDemo(self)
        self.es_modulo_web = True
        self.web_template = "demo"

        Modulo.__init__(self)
        self.estado = None

        #self._limpiar_configuracion()
        self.volvera = None
        self._metiendo_papel = False
        self.momento_ultimo_voto = None
        self.constants_sent = False

        self.tiempo_verificacion = 5000

        self.rampa = RampaDemo(self)
Пример #12
0
    def __init__(self):
        self._mesa_anterior = None
        self.controller = ControllerDemo(self)
        self.es_modulo_web = True
        self.web_template = "demo"

        Modulo.__init__(self)
        self.estado = None

        #self._limpiar_configuracion()
        self.volvera = None
        self._metiendo_papel = False
        self.momento_ultimo_voto = None
        self.constants_sent = False

        self.tiempo_verificacion = 5000

        self.rampa = RampaDemo(self)
Пример #13
0
    def __init__(self):
        """Constructor"""
        # Importante antes de inicializar el modulo, limpiar la configuracion
        self._limpiar_configuracion()
        self.mute_armve_ver_1()
        self.controller = ControllerInicio(self)
        self.es_modulo_web = True
        self.web_template = "inicio"

        Modulo.__init__(self)

        self.ret_code = MODULO_INICIO
        self.loop_lector = True
        self._vaciar_impresora()
        self.estado = E_INICIAL
        self.dialogo = None
        self._bind_term()
        self.manejar_desconexion()

        self.rampa = RampaInicio(self)

        gobject.idle_add(self._dump_check)
Пример #14
0
 def __init__(self):
     """Constructor"""
     self.send_function = None
     # El primer controller es ControllerInteraccion porque es el que maneja
     # el ingreso de datos de mesa y pin y autoridades
     self.web_template = "recuento"
     self._cargar_controller_interaccion()
     self.es_modulo_web = True
     Modulo.__init__(self)
     self.ret_code = MODULO_RECUENTO
     self.estado = E_INICIAL
     self._intento = 0
     self._ui_web_activa = True  # Flag que indica si esta activa la ui web
     self.apertura = None
     """
     if USA_ARMVE:
         power_source = sesion.powermanager.get_power_source()
         if power_source is not None and not power_source['byte']:
             sesion.fancoolers.set_fan_auto_mode(False)
             sesion.fancoolers.set_fan_speed(100)
     """
     self.rampa = RampaRecuento(self)
Пример #15
0
 def __init__(self):
     """Constructor"""
     self.send_function = None
     # El primer controller es ControllerInteraccion porque es el que maneja
     # el ingreso de datos de mesa y pin y autoridades
     self.web_template = "recuento"
     self._cargar_controller_interaccion()
     self.es_modulo_web = True
     Modulo.__init__(self)
     self.ret_code = MODULO_RECUENTO
     self.estado = E_INICIAL
     self._intento = 0
     self._ui_web_activa = True  # Flag que indica si esta activa la ui web
     self.apertura = None
     """
     if USA_ARMVE:
         power_source = sesion.powermanager.get_power_source()
         if power_source is not None and not power_source['byte']:
             sesion.fancoolers.set_fan_auto_mode(False)
             sesion.fancoolers.set_fan_speed(100)
     """
     self.rampa = RampaRecuento(self)