File: /home/pubuntu/wxInterfaz.py                                             Page 1 of 18#!/usr/bin/env python# -*- codin...
File: /home/pubuntu/wxInterfaz.py                                                       Page 2 of 18       self.lblCompani...
File: /home/pubuntu/wxInterfaz.py                                    Page 3 of 18       sizer_6.Add(self.lblFechaInicio, 0...
File: /home/pubuntu/wxInterfaz.py                                                           Page 4 of 18       #Coordenada...
File: /home/pubuntu/wxInterfaz.py                                                    Page 5 of 18    def __do_layout(self)...
File: /home/pubuntu/wxInterfaz.py                                                            Page 6 of 18    def __do_layo...
File: /home/pubuntu/wxInterfaz.py                                                Page 7 of 18    def __init__(self, *args,...
File: /home/pubuntu/wxInterfaz.py                                                            Page 8 of 18        self.__se...
File: /home/pubuntu/wxInterfaz.py                                                             Page 9 of 18# end of class w...
File: /home/pubuntu/wxInterfaz.py                                                    Page 10 of 18       sizer_22 = wx.Box...
File: /home/pubuntu/wxInterfaz.py                                                    Page 11 of 18        self.btnCancelar...
File: /home/pubuntu/wxInterfaz.py                                            Page 12 of 18       self.btnCancelar = wx.But...
File: /home/pubuntu/wxInterfaz.py                                            Page 13 of 18        self.Layout()        # e...
File: /home/pubuntu/wxInterfaz.py                                                     Page 14 of 18       grid_sizer_11.Ad...
File: /home/pubuntu/wxInterfaz.py                                               Page 15 of 18        self.txtPlacas.SetMin...
File: /home/pubuntu/wxInterfaz.py                                                           Page 16 of 18        self.SetT...
File: /home/pubuntu/wxInterfaz.py                                                 Page 17 of 18       grid_sizer_14 = wx.G...
File: /home/pubuntu/wxInterfaz.py                                           Page 18 of 18       grid_sizer_15.Add(sizer_33...
Upcoming SlideShare
Loading in...5
×

interfaz

296

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
296
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "interfaz"

  1. 1. File: /home/pubuntu/wxInterfaz.py Page 1 of 18#!/usr/bin/env python# -*- coding: utf-8 -*-# generated by wxGlade 0.6.3 on Wed Dec 16 06:32:12 2009import wximport wx.grid# begin wxGlade: extracode# end wxGladeclass wxIngresarSistema(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxIngresarSistema.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Declarando variables self.lblUsuario = wx.StaticText(self, -1, "Usuario:") self.txtUsuario = wx.TextCtrl(self, -1, "") self.lblPassword = wx.StaticText(self, -1, "Password:") self.txtPassword = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Entrar") self.__set_properties() self.__do_layout() # end wxGlade #Propiedades del frame def __set_properties(self): # begin wxGlade: wxIngresarSistema.__set_properties self.SetTitle("Login") # end wxGlade #Agregar controles al frame def __do_layout(self): # begin wxGlade: wxIngresarSistema.__do_layout sizer_39 = wx.BoxSizer(wx.VERTICAL) grid_sizer_16 = wx.GridSizer(3, 2, 0, 0) grid_sizer_16.Add(self.lblUsuario, 0, 0, 0) grid_sizer_16.Add(self.txtUsuario, 0, 0, 0) grid_sizer_16.Add(self.lblPassword, 0, 0, 0) grid_sizer_16.Add(self.txtPassword, 0, 0, 0) grid_sizer_16.Add(self.btnAceptar, 0, wx.ALIGN_RIGHT, 0) sizer_39.Add(grid_sizer_16, 1, wx.EXPAND, 0) self.SetSizer(sizer_39) sizer_39.Fit(self) self.Layout() # end wxGlade# end of class wxIngresarSistemaclass wxAltaPoliza(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaPoliza.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblNumeroPoliza = wx.StaticText(self, -1, "Numero de Poliza:") self.txtNumeroPoliza = wx.TextCtrl(self, -1, "") self.lblCliente = wx.StaticText(self, -1, "Cliente:") #Establecer Textboxs con propiedad Readonly self.txtNumero = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY) self.txtNombre = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY) #Establecer texto del botón self.btnBuscar = wx.Button(self, -1, "Buscar")
  2. 2. File: /home/pubuntu/wxInterfaz.py Page 2 of 18 self.lblCompania = wx.StaticText(self, -1, "Compania:n") self.cmbCompania = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.lblTipoPoliza = wx.StaticText(self, -1, "Tipo Poliza:") self.cmbTipoPoliza = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.lblFechaInicio = wx.StaticText(self, -1, "Fecha Inicio:") self.txtFechaInicio = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY) self.btnCalendario = wx.Button(self, -1, "Calendario") self.lblFechaFin = wx.StaticText(self, -1, "Fecha Fin:") self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY|wx.TE_RICH2) self.btnCalendario2 = wx.Button(self, -1, "Calendario") self.lblPrecio = wx.StaticText(self, -1, "Precio:") self.txtPrecio = wx.TextCtrl(self, -1, "") self.lblFormaPAgo = wx.StaticText(self, -1, "Forma Pago:n") self.cmbFormaPago = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.lblCobertura = wx.StaticText(self, -1, "Cobertura:") self.cmbCobertura = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.lblPolizaAnterior = wx.StaticText(self, -1, "Numero de Poliza Anterior:") self.txtNumeroPolizaAnterior = wx.TextCtrl(self, -1, "") self.btnbuscar2 = wx.Button(self, -1, "Buscar") self.lblBeneficiario = wx.StaticText(self, -1, "Beneficiario:") self.cmbBeneficiario = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.btnBuscar3 = wx.Button(self, -1, "Buscar") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.button_1 = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade #Propiedades del frame def __set_properties(self): # begin wxGlade: wxAltaPoliza.__set_properties self.SetTitle("Alta Poliza") #Tamaño del Frame self.txtNombre.SetMinSize((140, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaPoliza.__do_layout sizer_1 = wx.BoxSizer(wx.VERTICAL) sizer_13 = wx.BoxSizer(wx.HORIZONTAL) sizer_12 = wx.BoxSizer(wx.HORIZONTAL) sizer_11 = wx.BoxSizer(wx.HORIZONTAL) sizer_10 = wx.BoxSizer(wx.HORIZONTAL) sizer_9 = wx.BoxSizer(wx.HORIZONTAL) sizer_8 = wx.BoxSizer(wx.HORIZONTAL) sizer_7 = wx.BoxSizer(wx.HORIZONTAL) sizer_6 = wx.BoxSizer(wx.HORIZONTAL) sizer_5 = wx.BoxSizer(wx.HORIZONTAL) sizer_4 = wx.BoxSizer(wx.HORIZONTAL) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_2 = wx.BoxSizer(wx.HORIZONTAL) #Agregar elementos a los BoxSizer sizer_2.Add(self.lblNumeroPoliza, 0, wx.LEFT, 0) sizer_2.Add(self.txtNumeroPoliza, 0, 0, 0) sizer_1.Add(sizer_2, 1, wx.EXPAND, 0) sizer_3.Add(self.lblCliente, 0, wx.LEFT, 0) sizer_3.Add(self.txtNumero, 0, 0, 0) sizer_3.Add(self.txtNombre, 0, 0, 0) sizer_3.Add(self.btnBuscar, 0, 0, 0) sizer_1.Add(sizer_3, 1, wx.EXPAND, 0) sizer_4.Add(self.lblCompania, 0, 0, 0) sizer_4.Add(self.cmbCompania, 0, 0, 0) sizer_1.Add(sizer_4, 1, wx.EXPAND, 0) sizer_5.Add(self.lblTipoPoliza, 0, 0, 0) sizer_5.Add(self.cmbTipoPoliza, 0, 0, 0) sizer_1.Add(sizer_5, 1, wx.EXPAND, 0)
  3. 3. File: /home/pubuntu/wxInterfaz.py Page 3 of 18 sizer_6.Add(self.lblFechaInicio, 0, 0, 0) sizer_6.Add(self.txtFechaInicio, 0, 0, 0) sizer_6.Add(self.btnCalendario, 0, 0, 0) sizer_1.Add(sizer_6, 1, wx.EXPAND, 0) sizer_7.Add(self.lblFechaFin, 0, 0, 0) sizer_7.Add(self.text_ctrl_1, 0, 0, 0) sizer_7.Add(self.btnCalendario2, 0, 0, 0) sizer_1.Add(sizer_7, 1, wx.EXPAND, 0) sizer_8.Add(self.lblPrecio, 0, 0, 0) sizer_8.Add(self.txtPrecio, 0, 0, 0) sizer_1.Add(sizer_8, 1, wx.EXPAND, 0) sizer_9.Add(self.lblFormaPAgo, 0, 0, 0) sizer_9.Add(self.cmbFormaPago, 0, 0, 0) sizer_1.Add(sizer_9, 1, wx.EXPAND, 0) sizer_10.Add(self.lblCobertura, 0, 0, 0) sizer_10.Add(self.cmbCobertura, 0, 0, 0) sizer_1.Add(sizer_10, 1, wx.EXPAND, 0) sizer_11.Add(self.lblPolizaAnterior, 0, 0, 0) sizer_11.Add(self.txtNumeroPolizaAnterior, 0, 0, 0) sizer_11.Add(self.btnbuscar2, 0, 0, 0) sizer_1.Add(sizer_11, 1, wx.EXPAND, 0) sizer_12.Add(self.lblBeneficiario, 0, 0, 0) sizer_12.Add(self.cmbBeneficiario, 0, 0, 0) sizer_12.Add(self.btnBuscar3, 0, 0, 0) sizer_1.Add(sizer_12, 1, wx.EXPAND, 0) sizer_13.Add((80, 20), 0, 0, 0) sizer_13.Add(self.btnAceptar, 0, 0, 0) sizer_13.Add(self.button_1, 0, 0, 0) sizer_13.Add((80, 20), 0, 0, 0) sizer_1.Add(sizer_13, 1, wx.EXPAND, 0) self.SetSizer(sizer_1) sizer_1.Fit(self) self.Layout() # end wxGlade# end of class wxAltaPolizaclass wxListaUsuarios(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxListaUsuarios.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.btnAltaUsuario = wx.Button(self, -1, "Nuevo Usuario") self.grdUsuarios = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxListaUsuarios.__set_properties self.SetTitle("Lista Usuarios") self.grdUsuarios.CreateGrid(10, 6) #Agregar elementos al Grid self.grdUsuarios.SetColLabelValue(0, "Username") self.grdUsuarios.SetColLabelValue(1, "Nombres") self.grdUsuarios.SetColLabelValue(2, "Apellido Paterno") self.grdUsuarios.SetColLabelValue(3, "Apellido Materno") self.grdUsuarios.SetColLabelValue(4, "") self.grdUsuarios.SetColLabelValue(5, "") # end wxGlade def __do_layout(self): # begin wxGlade: wxListaUsuarios.__do_layout sizer_14 = wx.BoxSizer(wx.VERTICAL) sizer_15 = wx.BoxSizer(wx.HORIZONTAL)
  4. 4. File: /home/pubuntu/wxInterfaz.py Page 4 of 18 #Coordenadas del BoxSizer sizer_15.Add((70, 20), 0, 0, 0) #Alinear elementos del boxsizer sizer_15.Add(self.btnAltaUsuario, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0) sizer_15.Add((70, 20), 0, 0, 0) sizer_14.Add(sizer_15, 1, wx.EXPAND, 0) sizer_14.Add(self.grdUsuarios, 1, wx.EXPAND, 0) self.SetSizer(sizer_14) sizer_14.Fit(self) self.Layout() # end wxGlade# end of class wxListaUsuariosclass mnuCatalogos(wx.MenuBar): def __init__(self, *args, **kwds): # begin wxGlade: mnuCatalogos.__init__ wx.MenuBar.__init__(self, *args, **kwds) #Agregar opciones al menú self.lblAgente = wx.Menu() self.Append(self.lblAgente, "Agente") self.lblCompania = wx.Menu() self.Append(self.lblCompania, u"Compañía") self.lblTipoPoliza = wx.Menu() self.Append(self.lblTipoPoliza, "Tipo Poliza") self.lblCobertura = wx.Menu() self.Append(self.lblCobertura, "Cobertura") wxglade_tmp_menu = wx.Menu() self.Append(wxglade_tmp_menu, "Ayuda") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: mnuCatalogos.__set_properties pass # end wxGlade def __do_layout(self): # begin wxGlade: mnuCatalogos.__do_layout pass # end wxGlade# end of class mnuCatalogosclass mnuGeneral(wx.MenuBar): def __init__(self, *args, **kwds): # begin wxGlade: mnuGeneral.__init__ wx.MenuBar.__init__(self, *args, **kwds) #Opciones del menú self.lblUsuarios = wx.Menu() self.Append(self.lblUsuarios, "Usuarios") self.lblAyuda = wx.Menu() self.Append(self.lblAyuda, "Ayuda") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: mnuGeneral.__set_properties pass # end wxGlade
  5. 5. File: /home/pubuntu/wxInterfaz.py Page 5 of 18 def __do_layout(self): # begin wxGlade: mnuGeneral.__do_layout pass # end wxGlade# end of class mnuGeneralclass mnuPoliza(wx.MenuBar): def __init__(self, *args, **kwds): # begin wxGlade: mnuPoliza.__init__ wx.MenuBar.__init__(self, *args, **kwds) #Opciones del menú self.lblPoliza = wx.Menu() self.Append(self.lblPoliza, "Poliza") self.lblReportes = wx.Menu() self.Append(self.lblReportes, "Reportes") self.lblAyuda = wx.Menu() self.Append(self.lblAyuda, "Ayuda") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: mnuPoliza.__set_properties pass # end wxGlade def __do_layout(self): # begin wxGlade: mnuPoliza.__do_layout pass # end wxGlade# end of class mnuPolizaclass wxAltaUsuario(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaUsuario.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.lblNombre = wx.StaticText(self, -1, "Nombre:") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.lblApellidoPaterno = wx.StaticText(self, -1, "Apellido Paterno:") self.text_ctrl_3 = wx.TextCtrl(self, -1, "") self.lblApellidoMaterno = wx.StaticText(self, -1, "Apellido Materno:") self.text_ctrl_4 = wx.TextCtrl(self, -1, "") self.lblRol = wx.StaticText(self, -1, "Rol:") #Crear combobox y sus opciones (que en este caso se llenaran de Mysql self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxAltaUsuario.__set_properties self.SetTitle("Alta Usuario") #Cambiar Tamaño de los Textboxs self.text_ctrl_2.SetMinSize((189, 27)) self.text_ctrl_3.SetMinSize((189, 27)) self.text_ctrl_4.SetMinSize((189, 27)) # end wxGlade
  6. 6. File: /home/pubuntu/wxInterfaz.py Page 6 of 18 def __do_layout(self): # begin wxGlade: wxAltaUsuario.__do_layout sizer_16 = wx.BoxSizer(wx.VERTICAL) #Agregar elementos al BoxSizer grid_sizer_1 = wx.GridSizer(5, 2, 0, 0) grid_sizer_1.Add(self.lblNombre, 0, 0, 0) grid_sizer_1.Add(self.text_ctrl_2, 0, 0, 0) grid_sizer_1.Add(self.lblApellidoPaterno, 0, 0, 0) grid_sizer_1.Add(self.text_ctrl_3, 0, 0, 0) grid_sizer_1.Add(self.lblApellidoMaterno, 0, 0, 0) grid_sizer_1.Add(self.text_ctrl_4, 0, 0, 0) grid_sizer_1.Add(self.lblRol, 0, 0, 0) grid_sizer_1.Add(self.combo_box_1, 0, 0, 0) grid_sizer_1.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_1.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_16.Add(grid_sizer_1, 1, wx.EXPAND, 0) self.SetSizer(sizer_16) sizer_16.Fit(self) self.Layout() # end wxGlade# end of class wxAltaUsuarioclass wxListaAgente(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxListaAgente.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.btnAltaAgente = wx.Button(self, -1, "Nuevo Agente") self.grdAgente = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxListaAgente.__set_properties self.SetTitle("Lista Agentes") #Establecer elementos del grid self.grdAgente.CreateGrid(10, 6) self.grdAgente.SetColLabelValue(0, "Clave") self.grdAgente.SetColLabelValue(1, "Nombre") self.grdAgente.SetColLabelValue(2, "Apellido Paterno") self.grdAgente.SetColLabelValue(3, "Apellido Materno") self.grdAgente.SetColLabelValue(4, "") self.grdAgente.SetColLabelValue(5, "") # end wxGlade def __do_layout(self): # begin wxGlade: wxListaAgente.__do_layout sizer_17 = wx.BoxSizer(wx.VERTICAL) grid_sizer_2 = wx.GridSizer(2, 1, 0, 0) #Agregar los controles al BoxSizer grid_sizer_2.Add(self.btnAltaAgente, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0) grid_sizer_2.Add(self.grdAgente, 1, wx.EXPAND, 0) sizer_17.Add(grid_sizer_2, 1, wx.EXPAND, 0) self.SetSizer(sizer_17) sizer_17.Fit(self) self.Layout() # end wxGlade# end of class wxListaAgenteclass wxAltaAgente(wx.Frame):
  7. 7. File: /home/pubuntu/wxInterfaz.py Page 7 of 18 def __init__(self, *args, **kwds): # begin wxGlade: wxAltaAgente.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblClave = wx.StaticText(self, -1, "Clave:") self.txtClave = wx.TextCtrl(self, -1, "") self.lblNombre = wx.StaticText(self, -1, "Nombre:") self.txtNombre = wx.TextCtrl(self, -1, "") self.lblApellidoPaterno = wx.StaticText(self, -1, "Apellido Paterno:") self.txtApPaterno = wx.TextCtrl(self, -1, "") self.lblApMaterno = wx.StaticText(self, -1, "Apellido Materno:") self.txtApMaterno = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxAltaAgente.__set_properties #Titulo del Frame self.SetTitle("Alta Agente") #Propiedades de los controles textbox self.txtNombre.SetMinSize((189, 27)) self.txtApPaterno.SetMinSize((189, 27)) self.txtApMaterno.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaAgente.__do_layout sizer_18 = wx.BoxSizer(wx.VERTICAL) #Agregar elementos al BoxSizer grid_sizer_3 = wx.GridSizer(5, 2, 0, 0) grid_sizer_3.Add(self.lblClave, 0, 0, 0) grid_sizer_3.Add(self.txtClave, 0, 0, 0) grid_sizer_3.Add(self.lblNombre, 0, 0, 0) grid_sizer_3.Add(self.txtNombre, 0, 0, 0) grid_sizer_3.Add(self.lblApellidoPaterno, 0, 0, 0) grid_sizer_3.Add(self.txtApPaterno, 0, 0, 0) grid_sizer_3.Add(self.lblApMaterno, 0, 0, 0) grid_sizer_3.Add(self.txtApMaterno, 0, 0, 0) grid_sizer_3.Add(self.btnAceptar, 0, 0, 0) grid_sizer_3.Add(self.btnCancelar, 0, 0, 0) sizer_18.Add(grid_sizer_3, 1, wx.EXPAND, 0) self.SetSizer(sizer_18) sizer_18.Fit(self) self.Layout() # end wxGlade# end of class wxAltaAgenteclass wxAltaCompania(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaCompania.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblNombre = wx.StaticText(self, -1, "Nombre:") self.txtNombre = wx.TextCtrl(self, -1, "") self.lblDescripcion = wx.StaticText(self, -1, "Descripcion:") self.txtDescripcion = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar")
  8. 8. File: /home/pubuntu/wxInterfaz.py Page 8 of 18 self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxAltaCompania.__set_properties #Establecer propiedades de controles self.SetTitle(u"Alta Compañia") self.txtNombre.SetMinSize((189, 27)) self.txtDescripcion.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaCompania.__do_layout sizer_19 = wx.BoxSizer(wx.VERTICAL) #Agregar controles al BoxSizer grid_sizer_4 = wx.GridSizer(3, 2, 0, 0) grid_sizer_4.Add(self.lblNombre, 0, 0, 0) grid_sizer_4.Add(self.txtNombre, 0, 0, 0) grid_sizer_4.Add(self.lblDescripcion, 0, 0, 0) grid_sizer_4.Add(self.txtDescripcion, 0, 0, 0) grid_sizer_4.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_4.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_19.Add(grid_sizer_4, 1, wx.EXPAND, 0) self.SetSizer(sizer_19) sizer_19.Fit(self) self.Layout() # end wxGlade# end of class wxAltaCompaniaclass wxListaCompania(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxListaCompania.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.btnNuevaCompania = wx.Button(self, -1, u"Nueva Compañia") self.grid_1 = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxListaCompania.__set_properties #Propiedades self.SetTitle(u"Lista Compañia") self.grid_1.CreateGrid(10, 2) self.grid_1.SetColLabelValue(0, "Nombre") self.grid_1.SetColLabelValue(1, "Descripcion") # end wxGlade def __do_layout(self): # begin wxGlade: wxListaCompania.__do_layout sizer_20 = wx.BoxSizer(wx.VERTICAL) grid_sizer_5 = wx.GridSizer(2, 1, 0, 0) #Agregar elementos al boxsizer grid_sizer_5.Add(self.btnNuevaCompania, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0) grid_sizer_5.Add(self.grid_1, 1, wx.EXPAND, 0) sizer_20.Add(grid_sizer_5, 1, wx.EXPAND, 0) self.SetSizer(sizer_20) sizer_20.Fit(self) self.Layout() # end wxGlade
  9. 9. File: /home/pubuntu/wxInterfaz.py Page 9 of 18# end of class wxListaCompaniaclass wxListaTipoPoliza(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxListaTipoPoliza.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.btnNuevoTipoPoliza = wx.Button(self, -1, "Nuevo Tipo Poliza") self.grdTipoPoliza = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxListaTipoPoliza.__set_properties self.SetTitle("Lista Tipo Poliza") #Propiedades del Grid self.grdTipoPoliza.CreateGrid(10, 2) self.grdTipoPoliza.SetColLabelValue(0, "Id") self.grdTipoPoliza.SetColLabelValue(1, "Tipo Poliza") # end wxGlade def __do_layout(self): # begin wxGlade: wxListaTipoPoliza.__do_layout sizer_21 = wx.BoxSizer(wx.VERTICAL) grid_sizer_6 = wx.GridSizer(2, 1, 0, 0) #Agregar controles al boxsizer grid_sizer_6.Add(self.btnNuevoTipoPoliza, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL,0) grid_sizer_6.Add(self.grdTipoPoliza, 1, wx.EXPAND, 0) sizer_21.Add(grid_sizer_6, 1, wx.EXPAND, 0) self.SetSizer(sizer_21) sizer_21.Fit(self) self.Layout() # end wxGlade# end of class wxListaTipoPolizaclass wxAltaTipoPoliza(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaTipoPoliza.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblDescripcion = wx.StaticText(self, -1, u"Descripción:") self.txtTipoPoliza = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxAltaTipoPoliza.__set_properties #Establecer propiedades self.SetTitle("Alta Tipo Poliza") self.txtTipoPoliza.SetMinSize((189, 27)) self.btnCancelar.SetMinSize((85, 32)) # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaTipoPoliza.__do_layout
  10. 10. File: /home/pubuntu/wxInterfaz.py Page 10 of 18 sizer_22 = wx.BoxSizer(wx.VERTICAL) grid_sizer_7 = wx.GridSizer(2, 2, 0, 0) #Agregar elementos al boxsizer grid_sizer_7.Add(self.lblDescripcion, 0, 0, 0) grid_sizer_7.Add(self.txtTipoPoliza, 0, 0, 0) grid_sizer_7.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_7.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_22.Add(grid_sizer_7, 1, wx.EXPAND, 0) self.SetSizer(sizer_22) sizer_22.Fit(self) self.Layout() # end wxGlade# end of class wxAltaTipoPolizaclass wxCobertura(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxCobertura.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.btnNuevaCobertura = wx.Button(self, -1, "Nueva Cobertura") self.grdCobertura = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxCobertura.__set_properties #Propiedades self.SetTitle("Lista Cobertura") self.grdCobertura.CreateGrid(10, 4) self.grdCobertura.SetColLabelValue(0, "Descripcion") self.grdCobertura.SetColLabelValue(1, "Tipo Poliza") self.grdCobertura.SetColLabelValue(2, "") self.grdCobertura.SetColLabelValue(3, "") # end wxGlade def __do_layout(self): # begin wxGlade: wxCobertura.__do_layout #Agregar elementos al boxsizer sizer_23 = wx.BoxSizer(wx.VERTICAL) grid_sizer_8 = wx.GridSizer(1, 1, 0, 0) grid_sizer_8.Add(self.btnNuevaCobertura, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_8.Add(self.grdCobertura, 1, wx.EXPAND, 0) sizer_23.Add(grid_sizer_8, 1, wx.EXPAND, 0) self.SetSizer(sizer_23) sizer_23.Fit(self) self.Layout() # end wxGlade# end of class wxCoberturaclass wxAltaCobertura(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaCobertura.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblDescripcion = wx.StaticText(self, -1, u"Descripción:") self.ttxtDescripcion = wx.TextCtrl(self, -1, "") self.lblTipoPoliza = wx.StaticText(self, -1, "Tipo de Poliza:") self.combo_box_2 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.btnAceptar = wx.Button(self, -1, "Aceptar")
  11. 11. File: /home/pubuntu/wxInterfaz.py Page 11 of 18 self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxAltaCobertura.__set_properties #propiedades self.SetTitle("Alta Cobertura") self.ttxtDescripcion.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaCobertura.__do_layout sizer_24 = wx.BoxSizer(wx.VERTICAL) grid_sizer_9 = wx.GridSizer(3, 2, 0, 0) #Agregar elementos al boxsizer grid_sizer_9.Add(self.lblDescripcion, 0, 0, 0) grid_sizer_9.Add(self.ttxtDescripcion, 0, 0, 0) grid_sizer_9.Add(self.lblTipoPoliza, 0, 0, 0) grid_sizer_9.Add(self.combo_box_2, 0, 0, 0) grid_sizer_9.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_9.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_24.Add(grid_sizer_9, 1, wx.EXPAND, 0) self.SetSizer(sizer_24) sizer_24.Fit(self) self.Layout() # end wxGlade# end of class wxAltaCoberturaclass wxPolizaVida(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxPolizaVida.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblNumeroPoliza = wx.StaticText(self, -1, "Numero Poliza:") self.txtNumeroPoliza = wx.TextCtrl(self, -1, "") self.label_1 = wx.StaticText(self, -1, "Asegurado:") self.lblNombre = wx.StaticText(self, -1, "Nombre:") self.txtNombre = wx.TextCtrl(self, -1, "") self.lblApellidoPaterno = wx.StaticText(self, -1, "Apellido Paterno:") self.txtApellidoPaterno = wx.TextCtrl(self, -1, "") self.lblApellidoMaterno = wx.StaticText(self, -1, "Apellido Materno:") self.txtApellidoMaterno = wx.TextCtrl(self, -1, "") self.lblRFC = wx.StaticText(self, -1, "RFC:") self.txtRFC = wx.TextCtrl(self, -1, "") self.label_2 = wx.StaticText(self, -1, "Fecha Nacimiento:") self.cmbDia = wx.ComboBox(self, -1, choices=["Dia"], style=wx.CB_DROPDOWN) self.cmbMes = wx.ComboBox(self, -1, choices=["Mes"], style=wx.CB_DROPDOWN) self.cmbAnio = wx.ComboBox(self, -1, choices=[""], style=wx.CB_DROPDOWN) self.lblCalle = wx.StaticText(self, -1, "Calle:") self.txtCalle = wx.TextCtrl(self, -1, "") self.lblColonia = wx.StaticText(self, -1, "Colonia:") self.txtColonia = wx.TextCtrl(self, -1, "") self.lblMunicipio = wx.StaticText(self, -1, "Municipio:") self.txtMunicipio = wx.TextCtrl(self, -1, "") self.lblEstado = wx.StaticText(self, -1, "Estado:") self.txtEstado = wx.TextCtrl(self, -1, "") self.lblTelefono = wx.StaticText(self, -1, u"Teléfono:") self.txtTelefono = wx.TextCtrl(self, -1, "") self.lblCP = wx.StaticText(self, -1, "CP:") self.txtCP = wx.TextCtrl(self, -1, "") self.btAceptar = wx.Button(self, -1, "Aceptar")
  12. 12. File: /home/pubuntu/wxInterfaz.py Page 12 of 18 self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxPolizaVida.__set_properties #Establecer Propiedades self.SetTitle("AltaPolizaVida") self.txtNombre.SetMinSize((189, 27)) self.txtApellidoPaterno.SetMinSize((189, 27)) self.txtApellidoMaterno.SetMinSize((189, 27)) self.txtRFC.SetMinSize((189, 27)) self.cmbDia.SetMinSize((60, 29)) self.cmbDia.SetSelection(0) self.cmbMes.SetMinSize((80, 29)) self.cmbMes.SetSelection(-1) self.cmbAnio.SetMinSize((70, 29)) #Elemento seleccionado del combo self.cmbAnio.SetSelection(-1) self.txtCalle.SetMinSize((189, 27)) self.txtColonia.SetMinSize((189, 27)) self.txtMunicipio.SetMinSize((189, 27)) self.txtEstado.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxPolizaVida.__do_layout sizer_25 = wx.BoxSizer(wx.VERTICAL) grid_sizer_10 = wx.GridSizer(15, 2, 0, 0) sizer_26 = wx.BoxSizer(wx.HORIZONTAL) #Agregar elementos al boxsizer grid_sizer_10.Add(self.lblNumeroPoliza, 0, 0, 0) grid_sizer_10.Add(self.txtNumeroPoliza, 0, 0, 0) grid_sizer_10.Add(self.label_1, 0, 0, 0) grid_sizer_10.Add((189, 20), 0, 0, 0) grid_sizer_10.Add(self.lblNombre, 0, 0, 0) grid_sizer_10.Add(self.txtNombre, 0, 0, 0) grid_sizer_10.Add(self.lblApellidoPaterno, 0, 0, 0) grid_sizer_10.Add(self.txtApellidoPaterno, 0, 0, 0) grid_sizer_10.Add(self.lblApellidoMaterno, 0, 0, 0) grid_sizer_10.Add(self.txtApellidoMaterno, 0, 0, 0) grid_sizer_10.Add(self.lblRFC, 0, 0, 0) grid_sizer_10.Add(self.txtRFC, 0, 0, 0) grid_sizer_10.Add(self.label_2, 0, 0, 0) sizer_26.Add(self.cmbDia, 0, 0, 0) sizer_26.Add(self.cmbMes, 0, 0, 0) sizer_26.Add(self.cmbAnio, 0, 0, 0) grid_sizer_10.Add(sizer_26, 1, wx.EXPAND, 0) grid_sizer_10.Add(self.lblCalle, 0, 0, 0) grid_sizer_10.Add(self.txtCalle, 0, 0, 0) grid_sizer_10.Add(self.lblColonia, 0, 0, 0) grid_sizer_10.Add(self.txtColonia, 0, 0, 0) grid_sizer_10.Add(self.lblMunicipio, 0, 0, 0) grid_sizer_10.Add(self.txtMunicipio, 0, 0, 0) grid_sizer_10.Add(self.lblEstado, 0, 0, 0) grid_sizer_10.Add(self.txtEstado, 0, 0, 0) grid_sizer_10.Add(self.lblTelefono, 0, 0, 0) grid_sizer_10.Add(self.txtTelefono, 0, 0, 0) grid_sizer_10.Add(self.lblCP, 0, 0, 0) grid_sizer_10.Add(self.txtCP, 0, 0, 0) grid_sizer_10.Add(self.btAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_10.Add(self.btnCancelar, 0, 0, 0) sizer_25.Add(grid_sizer_10, 1, wx.EXPAND, 0) self.SetSizer(sizer_25) sizer_25.Fit(self)
  13. 13. File: /home/pubuntu/wxInterfaz.py Page 13 of 18 self.Layout() # end wxGlade# end of class wxPolizaVidaclass wxPolizaCasa(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxPolizaCasa.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #variables self.lblNumeroPoliza = wx.StaticText(self, -1, "Numero Poliza:") self.txtNumeroPoliza = wx.TextCtrl(self, -1, "") self.lblSumaAsegurada = wx.StaticText(self, -1, "Suma Asegurada:") self.txtAsegurada = wx.TextCtrl(self, -1, "") self.lblCalle = wx.StaticText(self, -1, "Calle:") self.txtCalle = wx.TextCtrl(self, -1, "") self.label_3 = wx.StaticText(self, -1, "Numero:") self.txtNumero = wx.TextCtrl(self, -1, "") self.lblColonia = wx.StaticText(self, -1, "Colonia:") self.txtColonia = wx.TextCtrl(self, -1, "") self.lblCP = wx.StaticText(self, -1, "CP:") self.txtCP = wx.TextCtrl(self, -1, "") self.lblMunicipio = wx.StaticText(self, -1, "Municipio:") self.txtMunicipio = wx.TextCtrl(self, -1, "") self.lblEstado = wx.StaticText(self, -1, "Estado:") self.txtEstado = wx.TextCtrl(self, -1, "") self.lblNumeroNiveles = wx.StaticText(self, -1, "Numero Niveles:") self.txtNumeroNiveles = wx.TextCtrl(self, -1, "") self.lblSotano = wx.StaticText(self, -1, u"Sotáno") self.chkSotano = wx.CheckBox(self, -1, "Si") self.lblHabitada = wx.StaticText(self, -1, "Habitada") self.chkHabitada = wx.CheckBox(self, -1, "Si") self.lblObservaciones = wx.StaticText(self, -1, "Observaciones:") self.txtObservaciones = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxPolizaCasa.__set_properties #Propiedades self.SetTitle("AltaPolizaCasa") self.txtCalle.SetMinSize((189, 27)) self.txtColonia.SetMinSize((189, 27)) self.txtMunicipio.SetMinSize((189, 27)) self.txtEstado.SetMinSize((189, 27)) self.txtObservaciones.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxPolizaCasa.__do_layout #Agregar elementos al boxsizer sizer_27 = wx.BoxSizer(wx.VERTICAL) grid_sizer_11 = wx.GridSizer(14, 2, 0, 0) grid_sizer_11.Add(self.lblNumeroPoliza, 0, 0, 0) grid_sizer_11.Add(self.txtNumeroPoliza, 0, 0, 0) grid_sizer_11.Add(self.lblSumaAsegurada, 0, 0, 0) grid_sizer_11.Add(self.txtAsegurada, 0, 0, 0) grid_sizer_11.Add(self.lblCalle, 0, 0, 0) grid_sizer_11.Add(self.txtCalle, 0, 0, 0) grid_sizer_11.Add(self.label_3, 0, 0, 0) grid_sizer_11.Add(self.txtNumero, 0, 0, 0)
  14. 14. File: /home/pubuntu/wxInterfaz.py Page 14 of 18 grid_sizer_11.Add(self.lblColonia, 0, 0, 0) grid_sizer_11.Add(self.txtColonia, 0, 0, 0) grid_sizer_11.Add(self.lblCP, 0, 0, 0) grid_sizer_11.Add(self.txtCP, 0, 0, 0) grid_sizer_11.Add(self.lblMunicipio, 0, 0, 0) grid_sizer_11.Add(self.txtMunicipio, 0, 0, 0) grid_sizer_11.Add(self.lblEstado, 0, 0, 0) grid_sizer_11.Add(self.txtEstado, 0, 0, 0) grid_sizer_11.Add(self.lblNumeroNiveles, 0, 0, 0) grid_sizer_11.Add(self.txtNumeroNiveles, 0, 0, 0) grid_sizer_11.Add(self.lblSotano, 0, 0, 0) grid_sizer_11.Add(self.chkSotano, 0, 0, 0) grid_sizer_11.Add(self.lblHabitada, 0, 0, 0) grid_sizer_11.Add(self.chkHabitada, 0, 0, 0) grid_sizer_11.Add(self.lblObservaciones, 0, 0, 0) grid_sizer_11.Add(self.txtObservaciones, 0, 0, 0) grid_sizer_11.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_11.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_27.Add(grid_sizer_11, 1, wx.EXPAND, 0) self.SetSizer(sizer_27) sizer_27.Fit(self) self.Layout() # end wxGlade# end of class wxPolizaCasaclass wxPolizaVehiculo(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxPolizaVehiculo.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblNumeroPoliza = wx.StaticText(self, -1, "Numero Poliza:") self.text_ctrl_9 = wx.TextCtrl(self, -1, "") self.lblAsegurado = wx.StaticText(self, -1, "Asegurado:") self.cmbAsegurado = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.label_4 = wx.StaticText(self, -1, "Vehiculo:") self.lblClaveSBG = wx.StaticText(self, -1, "Clave SBG:") self.txtClaveSBG = wx.TextCtrl(self, -1, "") self.lblMarca = wx.StaticText(self, -1, "Marca:") self.txtMarca = wx.TextCtrl(self, -1, "") self.lblTipo = wx.StaticText(self, -1, "Tipo:") self.txtTipo = wx.TextCtrl(self, -1, "") self.lblModelo = wx.StaticText(self, -1, "Modelo:") self.txtModelo = wx.TextCtrl(self, -1, "") self.lblPlacas = wx.StaticText(self, -1, "Placas:") self.txtPlacas = wx.TextCtrl(self, -1, "") self.lblNumeroSerie = wx.StaticText(self, -1, "Numero Serie:") self.txtNumeroSerie = wx.TextCtrl(self, -1, "") self.lblNumeroMotor = wx.StaticText(self, -1, "Numero Motor:") self.txtNumeroMotor = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): #Propiedades # begin wxGlade: wxPolizaVehiculo.__set_properties self.SetTitle("Alta Poliza Vehiculo") self.txtClaveSBG.SetMinSize((189, 27)) self.txtMarca.SetMinSize((189, 27)) self.txtTipo.SetMinSize((189, 27)) self.txtModelo.SetMinSize((189, 27))
  15. 15. File: /home/pubuntu/wxInterfaz.py Page 15 of 18 self.txtPlacas.SetMinSize((189, 27)) self.txtNumeroSerie.SetMinSize((189, 27)) #Establecer tamaño minimo self.txtNumeroMotor.SetMinSize((189, 27)) # end wxGlade def __do_layout(self): # begin wxGlade: wxPolizaVehiculo.__do_layout #Agregar contoles al boxsizer sizer_28 = wx.BoxSizer(wx.VERTICAL) grid_sizer_12 = wx.GridSizer(11, 2, 0, 0) grid_sizer_12.Add(self.lblNumeroPoliza, 0, 0, 0) grid_sizer_12.Add(self.text_ctrl_9, 0, 0, 0) grid_sizer_12.Add(self.lblAsegurado, 0, 0, 0) grid_sizer_12.Add(self.cmbAsegurado, 0, 0, 0) grid_sizer_12.Add(self.label_4, 0, 0, 0) grid_sizer_12.Add((189, 20), 0, 0, 0) grid_sizer_12.Add(self.lblClaveSBG, 0, 0, 0) grid_sizer_12.Add(self.txtClaveSBG, 0, 0, 0) grid_sizer_12.Add(self.lblMarca, 0, 0, 0) grid_sizer_12.Add(self.txtMarca, 0, 0, 0) grid_sizer_12.Add(self.lblTipo, 0, 0, 0) grid_sizer_12.Add(self.txtTipo, 0, 0, 0) grid_sizer_12.Add(self.lblModelo, 0, 0, 0) grid_sizer_12.Add(self.txtModelo, 0, 0, 0) grid_sizer_12.Add(self.lblPlacas, 0, 0, 0) grid_sizer_12.Add(self.txtPlacas, 0, 0, 0) grid_sizer_12.Add(self.lblNumeroSerie, 0, 0, 0) grid_sizer_12.Add(self.txtNumeroSerie, 0, 0, 0) grid_sizer_12.Add(self.lblNumeroMotor, 0, 0, 0) grid_sizer_12.Add(self.txtNumeroMotor, 0, 0, 0) grid_sizer_12.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_12.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_28.Add(grid_sizer_12, 1, wx.EXPAND, 0) self.SetSizer(sizer_28) sizer_28.Fit(self) self.Layout() # end wxGlade# end of class wxPolizaVehiculoclass wxAltaPolizaGastosMedicos(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxAltaPolizaGastosMedicos.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.lblNumeroPoliza = wx.StaticText(self, -1, "Numero Poliza:") self.txtNumeroPoliza = wx.TextCtrl(self, -1, "") self.lblAsegurados = wx.StaticText(self, -1, "Asegurados:") self.grgAsegurados = wx.grid.Grid(self, -1, size=(1, 1)) self.btnAgregarAsegurado = wx.Button(self, -1, "Agregar Asegurado") self.lblSumaAsegurada = wx.StaticText(self, -1, "Suma Asegurada:") self.text_ctrl_10 = wx.TextCtrl(self, -1, "") self.lblDeducible = wx.StaticText(self, -1, "Deducible:") self.txtDeducible = wx.TextCtrl(self, -1, "") self.btnAceptar = wx.Button(self, -1, "Aceptar") self.btnCancelar = wx.Button(self, -1, "Cancelar") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): #Establecer propiedades # begin wxGlade: wxAltaPolizaGastosMedicos.__set_properties
  16. 16. File: /home/pubuntu/wxInterfaz.py Page 16 of 18 self.SetTitle("Alta Poliza Gastos Medicos") self.grgAsegurados.CreateGrid(2, 2) self.grgAsegurados.SetColLabelValue(0, "Asegurado") self.grgAsegurados.SetColLabelValue(1, "Parentezco") # end wxGlade def __do_layout(self): # begin wxGlade: wxAltaPolizaGastosMedicos.__do_layout sizer_29 = wx.BoxSizer(wx.VERTICAL) grid_sizer_13 = wx.GridSizer(7, 2, 0, 0) #Agregar controles al grid grid_sizer_13.Add(self.lblNumeroPoliza, 0, 0, 0) grid_sizer_13.Add(self.txtNumeroPoliza, 0, 0, 0) grid_sizer_13.Add(self.lblAsegurados, 0, 0, 0) grid_sizer_13.Add((189, 20), 0, 0, 0) grid_sizer_13.Add(self.grgAsegurados, 1, wx.EXPAND, 0) grid_sizer_13.Add(self.btnAgregarAsegurado, 0, 0, 0) grid_sizer_13.Add(self.lblSumaAsegurada, 0, 0, 0) grid_sizer_13.Add(self.text_ctrl_10, 0, 0, 0) grid_sizer_13.Add(self.lblDeducible, 0, 0, 0) grid_sizer_13.Add(self.txtDeducible, 0, 0, 0) grid_sizer_13.Add(self.btnAceptar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_13.Add(self.btnCancelar, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_29.Add(grid_sizer_13, 1, wx.EXPAND, 0) self.SetSizer(sizer_29) sizer_29.Fit(self) self.Layout() # end wxGlade# end of class wxAltaPolizaGastosMedicosclass wxListaPoliza(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxListaPoliza.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #Variables self.btnAltaPoliza = wx.Button(self, -1, "Nueva Poliza") self.lblFiltrar = wx.StaticText(self, -1, "Filtrar Por:") self.cmbTipoPoliza = wx.ComboBox(self, -1, choices=["Poliza Vida", "Poliza Casa", "PolizaVehiculo", "Poliza Gastos Medicos"], style=wx.CB_DROPDOWN) self.grdPoliza = wx.grid.Grid(self, -1, size=(1, 1)) self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxListaPoliza.__set_properties #establecer propiedades self.SetTitle("Lista Polizas") self.cmbTipoPoliza.SetSelection(-1) self.grdPoliza.CreateGrid(10, 7) #Elementos del Grid self.grdPoliza.SetColLabelValue(0, "Numero") self.grdPoliza.SetColLabelValue(1, "Agente") self.grdPoliza.SetColLabelValue(2, "Cliente") self.grdPoliza.SetColLabelValue(3, "Compania") self.grdPoliza.SetColLabelValue(4, "Tipo Poliza") self.grdPoliza.SetColLabelValue(5, "Precio") self.grdPoliza.SetColLabelValue(6, "Detalles") # end wxGlade def __do_layout(self): # begin wxGlade: wxListaPoliza.__do_layout sizer_30 = wx.BoxSizer(wx.VERTICAL)
  17. 17. File: /home/pubuntu/wxInterfaz.py Page 17 of 18 grid_sizer_14 = wx.GridSizer(3, 1, 0, 0) sizer_31 = wx.BoxSizer(wx.HORIZONTAL) grid_sizer_14.Add(self.btnAltaPoliza, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) sizer_31.Add(self.lblFiltrar, 0, 0, 0) sizer_31.Add(self.cmbTipoPoliza, 0, 0, 0) grid_sizer_14.Add(sizer_31, 1, wx.EXPAND, 0) grid_sizer_14.Add(self.grdPoliza, 1, wx.EXPAND, 0) sizer_30.Add(grid_sizer_14, 1, wx.EXPAND, 0) self.SetSizer(sizer_30) sizer_30.Fit(self) self.Layout() # end wxGlade# end of class wxListaPolizaclass wxReportes(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: wxReportes.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) #VAriables self.lblReportes = wx.StaticText(self, -1, "Reportes") self.chkUsuarios = wx.CheckBox(self, -1, "Usuarios del Sistema") self.chkAgentes = wx.CheckBox(self, -1, "Agentes") self.chkCompanias = wx.CheckBox(self, -1, u"Compañias") self.chkTipoPolizas = wx.CheckBox(self, -1, "Tipos de Polizas") self.chkCoberturas = wx.CheckBox(self, -1, "Coberturas") self.chkClientes = wx.CheckBox(self, -1, "Clientes") self.chkPolizas = wx.CheckBox(self, -1, "Polizas") self.rdbCliente = wx.RadioButton(self, -1, "Cliente en especifico") self.rdbAgente = wx.RadioButton(self, -1, "Agente en especifico") self.rdbCompania = wx.RadioButton(self, -1, u"Compañia en especifico") self.rdbTipoPoliza = wx.RadioButton(self, -1, "Poliza en especifico") self.rdbCobertura = wx.RadioButton(self, -1, "Cobertura en especifico") self.btnVerReporte = wx.Button(self, -1, "Ver Reporte") self.__set_properties() self.__do_layout() # end wxGlade def __set_properties(self): # begin wxGlade: wxReportes.__set_properties self.SetTitle("Reportes") # end wxGlade def __do_layout(self): # begin wxGlade: wxReportes.__do_layout sizer_32 = wx.BoxSizer(wx.VERTICAL) grid_sizer_15 = wx.GridSizer(14, 1, 0, 0) sizer_38 = wx.BoxSizer(wx.HORIZONTAL) sizer_37 = wx.BoxSizer(wx.HORIZONTAL) sizer_36 = wx.BoxSizer(wx.HORIZONTAL) sizer_35 = wx.BoxSizer(wx.HORIZONTAL) sizer_34 = wx.BoxSizer(wx.HORIZONTAL) sizer_33 = wx.BoxSizer(wx.HORIZONTAL) #Agregar controles al boxsizer grid_sizer_15.Add(self.lblReportes, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_15.Add(self.chkUsuarios, 0, 0, 0) grid_sizer_15.Add(self.chkAgentes, 0, 0, 0) grid_sizer_15.Add(self.chkCompanias, 0, 0, 0) grid_sizer_15.Add(self.chkTipoPolizas, 0, 0, 0) grid_sizer_15.Add(self.chkCoberturas, 0, 0, 0) grid_sizer_15.Add(self.chkClientes, 0, 0, 0) grid_sizer_15.Add(self.chkPolizas, 0, 0, 0) sizer_33.Add((20, 20), 0, 0, 0) sizer_33.Add(self.rdbCliente, 0, 0, 0)
  18. 18. File: /home/pubuntu/wxInterfaz.py Page 18 of 18 grid_sizer_15.Add(sizer_33, 1, wx.EXPAND, 0) sizer_34.Add((20, 20), 0, 0, 0) #Agregar radiobutton sizer_34.Add(self.rdbAgente, 0, 0, 0) grid_sizer_15.Add(sizer_34, 1, wx.EXPAND, 0) sizer_35.Add((20, 20), 0, 0, 0) sizer_35.Add(self.rdbCompania, 0, 0, 0) grid_sizer_15.Add(sizer_35, 1, wx.EXPAND, 0) sizer_36.Add((20, 20), 0, 0, 0) sizer_36.Add(self.rdbTipoPoliza, 0, 0, 0) grid_sizer_15.Add(sizer_36, 1, wx.EXPAND, 0) sizer_37.Add((20, 20), 0, 0, 0) sizer_37.Add(self.rdbCobertura, 0, 0, 0) grid_sizer_15.Add(sizer_37, 1, wx.EXPAND, 0) sizer_38.Add(self.btnVerReporte, 0, wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_15.Add(sizer_38, 1, wx.EXPAND, 0) sizer_32.Add(grid_sizer_15, 1, wx.EXPAND, 0) self.SetSizer(sizer_32) sizer_32.Fit(self) self.Layout() # end wxGlade# end of class wxReportesif __name__ == "__main__": app = wx.PySimpleApp(0) wx.InitAllImageHandlers() AltaPoliza = wxAltaPoliza(None, -1, "") app.SetTopWindow(AltaPoliza) #mostrar frame alta poliza AltaPoliza.Show() app.MainLoop()

×