示例#1
0
文件: voto.py 项目: Charlyzzz/vot.ar
    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 quit(self, w=None):
     if sesion._mesa is not None:
         self.ret_code = MODULO_ADMIN
     else:
         self.ret_code = MODULO_INICIO
     self._descargar_ui_web()
     Modulo.quit(self)
示例#3
0
 def quit(self, w=None):
     if sesion._mesa is not None:
         self.ret_code = MODULO_ADMIN
     else:
         self.ret_code = MODULO_INICIO
     self._descargar_ui_web()
     Modulo.quit(self)
示例#4
0
    def quit(self, w=None):
        if hasattr(self.controller, "timeout_bateria"):
            gobject.source_remove(self.controller.timeout_bateria)
        if self.signal is not None:
            self.signal.remove()

        Modulo.quit(self, w)
示例#5
0
    def quit(self, w=None):
        if hasattr(self.controller, "timeout_bateria"):
            gobject.source_remove(self.controller.timeout_bateria)
        if self.signal is not None:
            self.signal.remove()

        Modulo.quit(self, w)
示例#6
0
文件: voto.py 项目: sunzu/vot.ar
    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)
示例#7
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)
示例#8
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)
示例#9
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()
示例#10
0
文件: apertura.py 项目: sunzu/vot.ar
    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()
示例#11
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)
示例#12
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)
示例#13
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)
示例#14
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)
示例#15
0
    def main(self):
        #sesion.reiniciar_impresora()
        # Lo comenté porque estoy casi seguro de que no funciona.
        # TODO: Implementar esto.
        sesion.impresora.imprimir_prueba()

        gobject.timeout_add(5000, self.quit)
        return Modulo.main(self)
示例#16
0
    def main(self):
        #sesion.reiniciar_impresora()
        # Lo comenté porque estoy casi seguro de que no funciona.
        # TODO: Implementar esto.
        sesion.impresora.imprimir_prueba()

        gobject.timeout_add(5000, self.quit)
        return Modulo.main(self)
示例#17
0
文件: demo.py 项目: Charlyzzz/vot.ar
    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)
示例#18
0
文件: demo.py 项目: sunzu/vot.ar
    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)
示例#19
0
文件: recuento.py 项目: sunzu/vot.ar
 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)
示例#20
0
文件: recuento.py 项目: Goblab/vot.ar
 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)
示例#21
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)
示例#22
0
 def main(self):
     #sesion.reiniciar_impresora()
     gobject.timeout_add(3000, self.quit)
     sesion.impresora.expulsar_boleta()
     return Modulo.main(self)
示例#23
0
文件: recuento.py 项目: sunzu/vot.ar
 def _cargar_ui_web(self):
     Modulo._cargar_ui_web(self)
示例#24
0
文件: recuento.py 项目: sunzu/vot.ar
 def _cargar_ui_recuento(self):
     Modulo._cargar_ui_web(self)
     self.ventana.show_all()
示例#25
0
 def _cargar_ui_inicio(self):
     Modulo._cargar_ui_web(self)
     self._inicio()
     self.controller.set_pantalla()
     self.ventana.show_all()
示例#26
0
文件: recuento.py 项目: Goblab/vot.ar
 def quit(self, w=None):
     #self._stop_audio()
     self.ret_code = MODULO_INICIO
     #self._descargar_ui_web()
     Modulo.quit(self)
示例#27
0
文件: recuento.py 项目: sunzu/vot.ar
 def quit(self, w=None):
     #self._stop_audio()
     self.ret_code = MODULO_INICIO
     #self._descargar_ui_web()
     Modulo.quit(self)
示例#28
0
文件: recuento.py 项目: Goblab/vot.ar
 def _cargar_ui_web(self):
     Modulo._cargar_ui_web(self)
示例#29
0
文件: recuento.py 项目: Goblab/vot.ar
 def _cargar_ui_recuento(self):
     Modulo._cargar_ui_web(self)
     self.ventana.show_all()
示例#30
0
 def main(self):
     #sesion.reiniciar_impresora()
     gobject.timeout_add(3000, self.quit)
     sesion.impresora.expulsar_boleta()
     return Modulo.main(self)