• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utils.mostrar_calendario函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中utils.mostrar_calendario函数的典型用法代码示例。如果您正苦于以下问题:Python mostrar_calendario函数的具体用法?Python mostrar_calendario怎么用?Python mostrar_calendario使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了mostrar_calendario函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: set_fin

 def set_fin(self,boton):
     try:
         temp = utils.mostrar_calendario(utils.parse_fecha(self.wids['e_fechafin'].get_text()), padre = self.wids['ventana'])
     except:
         temp = utils.mostrar_calendario(padre = self.wids['ventana'])
     self.wids['e_fechafin'].set_text(utils.str_fecha(temp))
     self.fin = mx.DateTime.DateTimeFrom(day = temp[0], month = temp[1], year = temp[2])
开发者ID:pacoqueen,项目名称:bbinn,代码行数:7,代码来源:listado_balas.py


示例2: set_inicio

 def set_inicio(self,boton):
     try:
         datinw = utils.parse_fecha(self.wids['e_fechainicio'].get_text())
         temp = utils.mostrar_calendario(datinw,
                                         padre = self.wids['ventana'])
     except:
         temp = utils.mostrar_calendario(padre = self.wids['ventana'])
     self.wids['e_fechainicio'].set_text(utils.str_fecha(temp))
     self.inicio = mx.DateTime.DateTimeFrom(day = temp[0], 
                                            month = temp[1], 
                                            year = temp[2])
开发者ID:pacoqueen,项目名称:bbinn,代码行数:11,代码来源:listado_balas.py


示例3: cambiar_fecha

def cambiar_fecha(entry, padre = None):
    """
    Cambia el texto del entry por la fecha seleccionada en un diálogo 
    centrado en la ventana "padre".
    """
    try:
        entry.set_text(utils.str_fecha(utils.mostrar_calendario(
            fecha_defecto = utils.parse_fecha(entry.get_text()), 
            padre = padre)))
    except:     # Probablemente fecha mal formada, 
                # pero me curo en salud y capturo todas.
        entry.set_text(utils.str_fecha(utils.mostrar_calendario(padre=padre)))
开发者ID:pacoqueen,项目名称:upy,代码行数:12,代码来源:facturacion_por_cliente_y_fechas.py


示例4: set_fecha

 def set_fecha(self, boton):
     """
     Muestra el diálogo de selección de fecha en calendario.
     """
     if "inicio" in boton.name:
         e = self.wids['e_fecha_inicio']
     elif "fin" in boton.name:
         e = self.wids['e_fecha_fin']
     else:
         return
     try:
         e.set_text(utils.str_fecha(utils.mostrar_calendario(e.get_text(), self.wids['ventana'])))
     except:
         e.set_text(utils.str_fecha(utils.mostrar_calendario(padre = self.wids['ventana'])))
开发者ID:pacoqueen,项目名称:upy,代码行数:14,代码来源:iva.py


示例5: add_ausencia

 def add_ausencia(self, b):
     fecha = utils.str_fecha(utils.mostrar_calendario(padre=self.wids["ventana"]))
     dia, mes, anno = map(int, fecha.split("/"))
     fecha = mx.DateTime.DateTimeFrom(day=dia, month=mes, year=anno)
     opciones = []
     for motivo in pclases.Motivo.select():
         opciones.append((motivo.id, "%s %s" % (motivo.descripcion, motivo.descripcionDias)))
     idmotivo = utils.dialogo_combo(
         titulo="¿MOTIVO?", texto="Seleccione motivo de ausencia", ops=opciones, padre=self.wids["ventana"]
     )
     if idmotivo != None:
         motivo = pclases.Motivo.get(idmotivo)
         defecto = "%d" % motivo.excedenciaMaxima
         duracion = utils.dialogo_entrada(
             titulo="DURACIÓN",
             texto="Introduzca la duración en días de la ausencia.",
             padre=self.wids["ventana"],
             valor_por_defecto=defecto,
         )
         try:
             duracion = int(duracion)
             for i in range(duracion):
                 ausencia = pclases.Ausencia(
                     empleado=self.objeto, fecha=fecha + (mx.DateTime.oneDay * i), motivo=motivo
                 )
             self.actualizar_ventana()
         except ValueError:
             utils.dialogo_info(
                 titulo="VALOR INCORRECTO",
                 texto="Debe teclear un número. Vuelva a intentarlo",
                 padre=self.wids["ventana"],
             )
开发者ID:pacoqueen,项目名称:bbinn,代码行数:32,代码来源:ausencias.py


示例6: set_fecha_fin

 def set_fecha_fin(self, b):
     try:
         fecha_defecto = utils.parse_fecha(self.wids['e_fecha_fin'].get_text())
     except: 
         fecha_defecto = mx.DateTime.localtime()
     else:
         self.wids['e_fecha_fin'].set_text(utils.str_fecha(utils.mostrar_calendario(fecha_defecto = fecha_defecto, padre = self.wids['ventana'])))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:7,代码来源:horas_trabajadas.py


示例7: set_fin

 def set_fin(self, boton):
     temp = utils.mostrar_calendario(fecha_defecto = self.fin, 
                                     padre = self.wids['ventana'])
     self.fin = temp
     self.fin = datetime.date(day = temp[0], month = temp[1], 
                              year = temp[2])
     self.wids['e_fechafin'].set_text(utils.str_fecha(self.fin))
开发者ID:pacoqueen,项目名称:upy,代码行数:7,代码来源:up_consulta_facturas.py


示例8: set_fin

 def set_fin(self, boton):
     temp = utils.mostrar_calendario(
         fecha_defecto = utils.parse_fecha(
             self.wids["e_fechafin"].get_text()), 
         padre = self.wids['ventana'])
     self.fin = mx.DateTime.DateTimeFrom(*temp[::-1])
     self.wids['e_fechafin'].set_text(utils.str_fecha(self.fin))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:7,代码来源:consulta_mensual_nominas.py


示例9: set_fecha

 def set_fecha(self, b):
     try:
         fecha_defecto = utils.parse_fecha(self.wids['e_fecha'].get_text())
     except: 
         fecha_defecto = mx.DateTime.localtime()
     else:
         self.wids['e_fecha'].set_text("/".join(["%02d" % i for i in utils.mostrar_calendario(fecha_defecto = fecha_defecto, padre = self.wids['ventana'])]))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:7,代码来源:horas_trabajadas_dia.py


示例10: set_inicio

 def set_inicio(self, boton):
     temp = utils.mostrar_calendario(
         fecha_defecto = utils.parse_fecha(
             self.wids['e_fechainicio'].get_text()), 
         padre = self.wids['ventana'])
     self.inicio = mx.DateTime.DateTimeFrom(*temp[::-1])
     self.wids['e_fechainicio'].set_text(utils.str_fecha(self.inicio))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:7,代码来源:consulta_mensual_nominas.py


示例11: set_fecha

 def set_fecha(self, boton):
     """
     Cambia la fecha a la seleccionada en la ventana calendario.
     """
     self.wids['e_fecha'].set_text(utils.str_fecha(
         utils.mostrar_calendario(
             fecha_defecto = self.wids['e_fecha'].get_text(), 
             padre = self.wids['ventana'])))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:8,代码来源:historico_existencias.py


示例12: fecha

 def fecha(self, w):
     self.wids["e_fecha"].set_text(
         utils.str_fecha(
             utils.mostrar_calendario(
                 fecha_defecto=self.objeto and self.objeto.fecha or None, padre=self.wids["ventana"]
             )
         )
     )
开发者ID:pacoqueen,项目名称:bbinn,代码行数:8,代码来源:resultados_tenacidad.py


示例13: set_inicio

 def set_inicio(self,boton):
     try:
         fini = map(int, self.inicio.split("/"))[::-1]
     except:
         fini = None
     temp = utils.mostrar_calendario(fecha_defecto = fini, padre = self.wids['ventana'])
     self.wids['e_fechainicio'].set_text(utils.str_fecha(temp))
     self.inicio = str(temp[2])+'/'+str(temp[1])+'/'+str(temp[0])
开发者ID:pacoqueen,项目名称:bbinn,代码行数:8,代码来源:consulta_albaranesPorFacturar.py


示例14: set_fin

 def set_fin(self, boton):
     try:
         ffin = map(int, self.fin.split("/"))[::-1]
     except:
         ffin = None
     temp = utils.mostrar_calendario(fecha_defecto=ffin, padre=self.wids["ventana"])
     self.wids["e_fechafin"].set_text(utils.str_fecha(temp))
     self.fin = str(temp[2]) + "/" + str(temp[1]) + "/" + str(temp[0])
开发者ID:pacoqueen,项目名称:upy,代码行数:8,代码来源:consulta_albaranesPorFacturar.py


示例15: nueva_alarma

 def nueva_alarma(self, idfras):
     texto = utils.dialogo_entrada(
         titulo="TEXTO ALARMA", texto="Introduzca el texto de la alarma.", padre=self.wids["ventana"]
     )
     if texto:
         fechalarma = utils.mostrar_calendario(
             titulo="FECHA Y HORA",
             padre=self.wids["ventana"],
             fecha_defecto=mx.DateTime.localtime() + mx.DateTime.oneDay,
         )
         try:
             dia, mes, anno = fechalarma
             fechalarma = mx.DateTime.DateTimeFrom(day=dia, month=mes, year=anno)
         except (TypeError, ValueError, AttributeError):
             utils.dialogo_info(
                 titulo="FECHA INCORRECTA",
                 texto="La fecha seleccionada (%s)\n" "no es correcta." % ` fechalarma `,
                 padre=self.wids["ventana"],
             )
             fechalarma = None
         if fechalarma:
             hora = utils.mostrar_hora(
                 titulo="SELECCIONE HORA DE ALARMA",
                 padre=self.wids["ventana"],
                 horas=mx.DateTime.localtime().hour,
                 minutos=mx.DateTime.localtime().minute,
             )
             if not hora:
                 return  # Canceló
             try:
                 horas = int(hora.split(":")[0])
                 minutos = int(hora.split(":")[1])
                 fechalarma = mx.DateTime.DateTimeFrom(
                     day=fechalarma.day, month=fechalarma.month, year=fechalarma.year, hour=horas, minute=minutos
                 )
             except (IndexError, TypeError, ValueError, AttributeError):
                 utils.dialogo_info(
                     titulo="HORA INCORRECTA",
                     texto="La hora %s no es correcta." % (hora),
                     padre=self.wids["ventana"],
                 )
                 fechalarma = None
             if fechalarma:
                 try:
                     estado = pclases.Estado.get(1)  # *Debería* existir.
                 except:
                     estado = None
                 # print idfras
                 for id in idfras:
                     tarea = pclases.Alarma(
                         facturaVentaID=id,
                         texto=texto,
                         fechahora=mx.DateTime.localtime(),
                         estado=estado,
                         fechahoraAlarma=fechalarma,
                         objetoRelacionado=None,
                     )
                 self.buscar_alertas()
开发者ID:pacoqueen,项目名称:bbinn,代码行数:58,代码来源:crm_seguimiento_impagos.py


示例16: set_validez

 def set_validez(self, boton):
     """
     Muestra un diálogo de selecciónde fecha y 
     escribe la fecha elegida en el Entry 
     correspondiente.
     """
     entry = boton.name.replace("b", "e")
     fecha = utils.mostrar_calendario(padre = self.wids['ventana'])
     self.wids[entry].set_text(utils.str_fecha(fecha))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:9,代码来源:tarifas_de_precios.py


示例17: buscar_fecha

 def buscar_fecha(self, boton):
     """
     Muestra el diálogo calendario y establece la fecha de la partida.
     """
     partida = self.get_partida()
     if partida != None:
         fecha = utils.mostrar_calendario(fecha_defecto = partida.fecha, padre = self.wids['ventana'])
         fecha = utils.parse_fecha(utils.str_fecha(fecha))
         partida.fecha = mx.DateTime.DateTimeFrom(day = fecha.day, month = fecha.month, year = fecha.year, 
                                             hour = partida.fecha.hour, minute = partida.fecha.minute, second = partida.fecha.second)
         self.wids['e_fecha'].set_text(utils.str_fechahora(partida.fecha))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:11,代码来源:consumo_balas_partida.py


示例18: set_fecha

 def set_fecha(self, boton):
     """
     Cambia la fecha de los filtros.
     """
     w = self.wids[boton.name.replace("b_", "e_")]
     try:
         fechaentry = utils.parse_fecha(w.get_text())
     except (TypeError, ValueError):
         fechaentry = mx.DateTime.today()
     w.set_text(utils.str_fecha(utils.mostrar_calendario(
                                             fecha_defecto = fechaentry, 
                                             padre = self.wids['ventana'])))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:12,代码来源:consulta_existenciasBolsas.py


示例19: build_widget_valor

def build_widget_valor(col):
    """
    Recibe un objeto de la familia SOCol y devuelve el 
    widget adecuado para mostrar su valor.
    Si es un texto, entero o float: entry.
    Si es un boolean: checkbutton.
    Si es una fecha: entry con un botón para mostrar el calendario.
    Si es un ForeignKey, usar un ComboBoxEntry con utils.rellenar... con las
    tuplas de la tabla referenciada.
    """
    box = None  # Posible contenedor externo.
    if isinstance(col, pclases.SOStringCol): 
        w = gtk.Entry()
        w.set_name(col.name)
    elif isinstance(col, pclases.SOIntCol):
        w = gtk.Entry()
        w.set_name(col.name)
    elif isinstance(col, pclases.SOFloatCol):
        w = gtk.Entry()
        w.set_name(col.name)
    elif isinstance(col, pclases.SOBoolCol):
        w = gtk.CheckButton()
        w.set_name(col.name)
    elif isinstance(col, pclases.SODateCol):
        box = gtk.HBox()
        w = gtk.Entry()
        w.set_name(col.name)
        button = gtk.Button(label = "Buscar _fecha")
        button.connect("clicked", lambda boton: w.set_text(utils.str_fecha(utils.mostrar_calendario())))
        button.set_name("b_%s" % (col.name))
        box.add(w)
        box.add(button)
    elif isinstance(col, pclases.SOForeignKey):
        w = gtk.ComboBoxEntry()
        w.set_name(col.name)
        tablajena = col.foreignKey
        clase_tablajena = getattr(pclases, tablajena)
        func_select = getattr(clase_tablajena, "select")
        datos = []
        for reg in func_select():
            campos = []
            for columna in clase_tablajena._SO_columnDict:
                valor = getattr(reg, columna)
                campos.append(`valor`)
            info = ", ".join(campos)
            # info = reg.get_info()
            datos.append((reg.id, info))
        utils.rellenar_lista(w, datos)
    else:
        w = gtk.Entry()
        w.set_name(col.name)
    return w, box
开发者ID:pacoqueen,项目名称:dentinn,代码行数:52,代码来源:seeker.py


示例20: set_fecha

 def set_fecha(self, boton):
     """
     Muestra un calendario y pone la fecha seleccionada en el entry 
     que le corresponde al botón pulsado.
     """
     nombreboton = boton.get_name()
     if nombreboton == "b_fechaini":
         entry = self.wids["e_fechaini"]
     elif nombreboton == "b_fechafin":
         entry = self.wids["e_fechafin"]
     else:
         return
     fecha = utils.mostrar_calendario(
         fecha_defecto = utils.parse_fecha(entry.get_text()), 
         padre = self.wids['ventana'])
     entry.set_text(utils.str_fecha(fecha))
开发者ID:pacoqueen,项目名称:bbinn,代码行数:16,代码来源:consulta_marcado_ce.py



注:本文中的utils.mostrar_calendario函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.msg函数代码示例发布时间:2022-05-26
下一篇:
Python utils.mkdirp函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap