Beispiel #1
0
    def quit(self, w=None):
        """Sale del modulo."""
        if self.signal is not None:
            self.signal.remove()
        self.controlador.quitar_timer()

        ModuloBase.quit(self, w)
Beispiel #2
0
 def quit(self, w=None):
     """Sale del modulo."""
     if self.sesion._mesa is not None:
         self.ret_code = MODULO_MENU
     else:
         self.ret_code = MODULO_INICIO
     self._descargar_ui_web()
     ModuloBase.quit(self)
Beispiel #3
0
    def quit(self, w=None):
        """Sale del modulo."""
        if hasattr(self.controlador, "timeout_bateria"):
            GObject.source_remove(self.controlador.timeout_bateria)
        if self.signal is not None:
            self.signal.remove()

        ModuloBase.quit(self, w)
Beispiel #4
0
    def quit(self, w=None):
        """Sale del modulo."""
        if hasattr(self.controlador, "timeout_bateria"):
            GObject.source_remove(self.controlador.timeout_bateria)
        if self.signal is not None:
            self.signal.remove()

        ModuloBase.quit(self, w)
Beispiel #5
0
    def __init__(self, nombre):
        """Constructor."""
        self.controlador = Controlador(
            self, FAKE, None, MISCLICK_THRESHOLD, DUALCLICK_THRESHOLD,
            TIMEOUT, FAST_START, NPOINTS, AUTO_CLOSE)
        self.web_template = "calibrador"

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

        ModuloBase.__init__(self, nombre)
Beispiel #6
0
    def __init__(self, nombre):
        self.controlador = Controlador(self)
        self.web_template = MODULO_MANTENIMIENTO

        ModuloBase.__init__(self, nombre)
        levantar_locales()

        self._vaciar_impresora()
        self.ret_code = MODULO_MENU

        self.rampa = Rampa(self)
        self._start_audio()
Beispiel #7
0
    def __init__(self, nombre):
        self.controlador = Controlador(self)
        self.web_template = MODULO_MANTENIMIENTO

        ModuloBase.__init__(self, nombre)
        levantar_locales()

        self._vaciar_impresora()
        self.ret_code = MODULO_MENU

        self.rampa = Rampa(self)
        self._start_audio()
Beispiel #8
0
 def __init__(self, nombre):
     """Constructor"""
     self.web_template = "escrutinio"
     self.get_controller()
     ModuloBase.__init__(self, nombre)
     self._start_audio()
     self.set_volume()
     self.apertura = self.sesion.apertura
     self.ret_code = MODULO_RECUENTO
     self.get_rampa()
     if self.sesion.recuento is None:
         self.sesion.recuento = Recuento(self.sesion.mesa)
     self.estado = E_RECUENTO
     self.get_orden_certs()
     self.config_files = [COMMON_SETTINGS, nombre, "imaging"]
     self._load_config()
Beispiel #9
0
    def __init__(self, nombre):
        """Constructor del modulo Apertura.
        Argumentos:
            nombre -- el nombre del modulo que se está cargando.
        """
        self.web_template = "apertura"
        self.rampa = Apertura(self)
        self.controlador = Controlador(self)
        self._mensaje = None

        ModuloBase.__init__(self, nombre)
        self._start_audio()

        self.ret_code = MODULO_INICIO
        self.estado = E_INICIAL
        self.registrador = RegistradorApertura(self, self.callback_salir,
                                               self.callback_proxima_acta)
Beispiel #10
0
    def __init__(self, nombre):
        self.controlador = Controlador(self)
        self.web_template = MODULO_MENU

        ModuloBase.__init__(self, nombre)
        self._start_audio()
        levantar_locales()

        self._vaciar_impresora()
        self.ret_code = MODULO_INICIO
        self.mesa_abierta = self.sesion.apertura is not None or not \
            self.config("realizar_apertura")
        self.boton_mantenimiento = False

        self.rampa = Rampa(self)

        self.sesion._tmp_apertura = None
Beispiel #11
0
    def __init__(self, nombre):
        """Constructor."""
        # Importante antes de inicializar el modulo, limpiar la configuracion
        self.sesion = get_sesion()
        self._limpiar_configuracion()
        self.mute_armve_ver_1()
        self.controlador = Controlador(self)
        self.web_template = "inicio"

        ModuloBase.__init__(self, nombre)

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

        self.rampa = Rampa(self)
Beispiel #12
0
    def __init__(self, nombre):
        """Constructor."""
        # Importante antes de inicializar el modulo, limpiar la configuracion
        self.sesion = get_sesion()
        self._limpiar_configuracion()
        self.mute_armve_ver_1()
        self.controlador = Controlador(self)
        self.web_template = "inicio"

        ModuloBase.__init__(self, nombre)

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

        self.rampa = Rampa(self)
Beispiel #13
0
    def __init__(self, nombre):
        """Constructor."""
        self._mesa_anterior = None
        self.controlador = ControllerCapac(self)
        self.web_template = "capacitacion"

        ModuloBase.__init__(self, nombre)
        self.config_files = [COMMON_SETTINGS, MODULO_SUFRAGIO, MODULO_ASISTIDA,
                             nombre]
        self._load_config()
        self.estado = None

        self.volvera = None
        self._metiendo_papel = False
        self.constants_sent = False

        self.tiempo_verificacion = 5000

        self.rampa = RampaCapacitacion(self)
        self.sesion = get_sesion()
Beispiel #14
0
    def __init__(self, nombre):
        """Constructor"""
        self.set_controller()
        self.web_template = "sufragio"
        ModuloBase.__init__(self, nombre)
        if LOG_CAPTURE_STDOUT:
            import sys
            from logging import INFO, ERROR
            from msa.core.logging import StreamToLogger
            sys.stdout = StreamToLogger(self.logger, INFO)
            sys.stderr = StreamToLogger(self.logger, ERROR)

        self.estado = None

        self.ret_code = MODULO_SUFRAGIO
        self.volvera = None
        self._metiendo_papel = False

        self.registrador = Registrador(self._fin_registro, self, self._error)
        self.tiempo_verificacion = 5000

        self.rampa = Rampa(self)
Beispiel #15
0
    def __init__(self, nombre):
        """Constructor."""
        self.sesion = get_sesion()
        self.nombre = nombre
        self.web_template = "ingreso_datos"
        self._start_audio()

        # Pantalla de introduccion de mesa y pin del modulo Inicio
        if nombre == SUBMODULO_MESA_Y_PIN_INICIO:
            self.controlador = Controlador(self, E_MESAYPIN, MODULO_INICIO)
            ModuloBase.__init__(self, nombre)
            self.rampa = RampaInicio(self)

        # Pantallas de introduccion de boleta e Introduccion de Datos
        # Personales del podulo de apertura
        elif nombre == SUBMODULO_DATOS_APERTURA:
            # en _tmp_apertura se guarda la instancia temporal de apertura que
            # usamos para manejar el "volver atras" antes de imprimir la
            # apertura
            if self.sesion._tmp_apertura is not None:
                self.apertura = self.sesion._tmp_apertura
                self.estado = E_CARGA
                estado_controlador = E_INGRESO_DATOS
            else:
                self.estado = E_INICIAL
                estado_controlador = None

            self.controlador = Controlador(self, estado_controlador,
                                           MODULO_APERTURA)
            ModuloBase.__init__(self, nombre)
            self.rampa = RampaApertura(self)
        # Pantalla de introduccion de datos personales del escrutinio
        elif nombre == SUBMODULO_DATOS_ESCRUTINIO:
            if hasattr(self.sesion, "apertura"):
                self.apertura = self.sesion.apertura
            self.estado = E_SETUP
            estado_controlador = E_INGRESO_DATOS
            self.controlador = Controlador(self, estado_controlador,
                                           MODULO_RECUENTO)
            ModuloBase.__init__(self, nombre)
            self.rampa = RampaEscrutinio(self)
Beispiel #16
0
 def _cargar_ui_inicio(self):
     """Carga la UI del modulo."""
     ModuloBase._cargar_ui_web(self)
     self._inicio()
     self.controlador.set_pantalla()
     self.ventana.show_all()