def __init__(self, parent):
        self.group = Pmw.Group(parent, tag_text='Radiografia')
        self.group.grid(row=1, column=0, sticky=N, padx=5, pady=5)

        ####Inicio el Filtro

        Label(self.group.interior(), text='IdRadio:').grid(row=0,
                                                           column=0,
                                                           sticky=W,
                                                           padx=5,
                                                           pady=5)
        self.entryIdFiltro = Entry(self.group.interior())
        self.entryIdFiltro.grid(row=0, column=1)

        Button(self.group.interior(),text="Filtrar",command= self.filter).\
            grid(row=0,column=2,sticky=W, padx=5, pady=5)

        ##### Ventana de antecedentes

        self.groupAntecedentes = Pmw.Group(parent, tag_text='Antecedentes')
        self.groupAntecedentes.grid(row=2, column=0)

        self.vistaAntece = vistaAntecedentes(self.groupAntecedentes)

        self.groupBotones = Pmw.Group(parent, tag_text='Acciones')
        self.groupBotones.grid(row=3, column=0)

        Button(self.groupBotones.interior(),
               text='Actualizar',
               command=self.actualiza).grid(column=0, row=0)
    def __init__(self, parent):
        self.group = Pmw.Group(parent, tag_text = 'Radiografia')
        self.group.grid(row=1,column=0,sticky= N, padx=5, pady=5)

        ####Inicio el Filtro

        Label(self.group.interior(), text = 'IdRadio:').grid(row=0,column=0,sticky=W, padx=5, pady=5)
        self.entryIdFiltro = Entry(self.group.interior())
        self.entryIdFiltro.grid(row=0,column=1)

        Button(self.group.interior(),text="Filtrar",command= self.filter).\
            grid(row=0,column=2,sticky=W, padx=5, pady=5)


        ##### Ventana de antecedentes

        self.groupAntecedentes = Pmw.Group(parent, tag_text = 'Antecedentes')
        self.groupAntecedentes.grid(row=2,column=0)

        self.vistaAntece = vistaAntecedentes(self.groupAntecedentes)

        self.groupBotones = Pmw.Group(parent, tag_text = 'Acciones')
        self.groupBotones.grid(row=3,column=0)

        Button(self.groupBotones.interior(),text = 'Actualizar',command = self.actualiza).grid(column=0, row=0)
Example #3
0
    def __init__(self, parent):
        self.currentIdRadio = None
        self.parent = parent
        self.parent.wm_title("Ingreso de datos")

        Pmw.aboutversion('1.0')
        Pmw.aboutcopyright('Copyright UchileDB\nAll rights reserved')
        Pmw.aboutcontact('Contacto :\n' + '  Informacion de contacto\n' +
                         '  Phone: +995096669\n' +
                         '  email: [email protected]\n' +
                         '  email: [email protected]\n' +
                         '  aferral and argorthas')
        self.about = Pmw.AboutDialog(
            parent,
            applicationname='Interfaz grafica base de datos Radiografias Uchile'
        )
        self.about.withdraw()

        #################################################

        # Create the Balloon for this toplevel.
        self.balloon = Pmw.Balloon(parent)

        # Create and install the MenuBar.
        menuBar = Pmw.MainMenuBar(parent, balloon=self.balloon)
        parent.configure(menu=menuBar)
        self.menuBar = menuBar

        # Add some buttons to the MainMenuBar.
        menuBar.addmenu('Create', 'Close this window or exit')
        menuBar.addmenuitem('Create',
                            'command',
                            'Exit the application',
                            command=self.createVentanaPaciente,
                            label='Paciente')

        menuBar.addmenu('Edit', 'asd')
        menuBar.addmenuitem('Edit',
                            'command',
                            'Delete the current selection',
                            command=lambda: self.newWindow(
                                "Medicamento", queryAddMedicamento,
                                queryDeleteMedicamento, queryUpdateMedicamento,
                                queryListaMedicamento, self.actualizaListas),
                            label='Medicamento')

        menuBar.addmenuitem(
            'Edit',
            'command',
            'Delete the current selection',
            command=lambda: self.newWindow(
                "Alergia", queryAddAlergia, queryDeleteAlergia,
                queryUpdateAlergia, queryListaAlergia, self.actualizaListas),
            label='Alergia')
        menuBar.addmenuitem(
            'Edit',
            'command',
            'Delete the current selection',
            command=lambda: self.newWindow(
                "Droga", queryAddDroga, queryDeleteDroga, queryUpdateDroga,
                queryListaDroga, self.actualizaListas),
            label='Droga')
        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem('Edit',
                            'command',
                            'Delete the current selection',
                            command=self.editRadio,
                            label='Radio')
        menuBar.addmenuitem('Edit',
                            'command',
                            'Delete the current selection',
                            command=self.editAntecedentes,
                            label='Antecedentes')

        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem(
            'Edit',
            'command',
            'Delete the current selection',
            command=lambda: self.newWindow(
                "Procedencia", queryAddProce, queryDeleteProce,
                queryUpdateProce, queryListaProce, self.actualizaListas),
            label='Procedencia')
        menuBar.addmenuitem(
            'Edit',
            'command',
            'Delete the current selection',
            command=lambda: self.newWindow(
                "Zona", queryAddZona, queryDeleteZona, queryUpdateZona,
                queryListaZona, self.actualizaListas),
            label='Zona')
        menuBar.addmenuitem(
            'Edit',
            'command',
            'Delete the current selection',
            command=lambda: self.newWindow(
                "Tipo", queryAddTipo, queryDeleteTipo, queryUpdateTipo,
                queryListaTipo, self.actualizaListas),
            label='Tipo')
        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem('Edit',
                            'command',
                            'Delete the current selection',
                            command=lambda: self.newWindow(
                                "Tipo", queryAddEnfermedad,
                                queryDeleteEnfermedad, queryUpdateEnfermedad,
                                queryListaEnfermedad, self.actualizaListas),
                            label='Enfermedad')

        menuBar.addmenu('Help', 'Set user preferences')
        menuBar.addmenuitem('Help',
                            'command',
                            'Set general preferences',
                            command=self.execute,
                            label='About')

        #############################################################################

        # Create and pack the NoteBook.
        self.notebook = Pmw.NoteBook(parent)
        self.notebook.pack(fill='both', expand=1, padx=10, pady=10)

        # Add the "Gemeral" page to the notebook.
        self.page = self.notebook.add('General')
        self.notebook.tab('General').focus_set()

        # Create the "Paciente" contents of the page.
        self.group = Pmw.Group(self.page,
                               tag_text='Filtrar personas por RUT :')
        self.group.pack()

        Label(self.group.interior(), text='RUT sin codigo ver:').grid(row=0,
                                                                      column=0,
                                                                      sticky=W,
                                                                      padx=5,
                                                                      pady=5)
        self.runentry = Entry(self.group.interior())
        self.runentry.grid(row=0, column=1, sticky=W, padx=5, pady=5)

        # Create the "Radiografia" contents of the page.
        self.group1 = Pmw.Group(
            self.page,
            tag_text='Radiografia \nTodos los campos son obligatorios')
        self.group1.pack()

        #---------------Aqui estan las radiografias------------------------------

        self.vistaRadio = vistaRadio(self.group1)

        #Button "Filtro"
        Button(self.group.interior(),
               text="Filtrar",
               command=lambda: filtrarPaciente(
                   self.runentry, self.vistaRadio.getWidget('PacienteCombo'),
                   None)).grid(row=0, column=2, sticky=W, padx=5, pady=5)

        #Aqui van los antecedentes y la nueva pagina
        # Add another page
        self.page1 = self.notebook.add('Antecedentes')

        self.groupAntecedentes = Pmw.Group(self.page1, tag_text='Antecedentes')
        self.groupAntecedentes.pack(fill='both', expand=1, padx=10, pady=10)

        #---------------Aqui estan los antecedentes ------------------------------
        self.vistaAntece = vistaAntecedentes(self.groupAntecedentes)

        self.notebook.setnaturalsize()

        self.statusValue = StringVar()
        self.statusValue.set("Status:")
        self.status = Label(parent, textvariable=self.statusValue).pack()

        # Create and pack the ButtonBox.
        b = Button(parent, text="Crear", command=self.crearRadiografia)
        b.pack(padx=10, pady=10, side=RIGHT)

        b = Button(parent, text="Borrar campos", command=self.clean)
        b.pack(padx=10, pady=10, side=RIGHT)
        self.actualizaListas()
Example #4
0
    def __init__(self, parent):
        self.currentIdRadio = None
        self.parent = parent
        self.parent.wm_title("Ingreso de datos")

        Pmw.aboutversion('1.0')
        Pmw.aboutcopyright('Copyright UchileDB\nAll rights reserved')
        Pmw.aboutcontact(
            'Contacto :\n' +
            '  Informacion de contacto\n' +
            '  Phone: +995096669\n' +
            '  email: [email protected]\n' +
            '  email: [email protected]\n' +
            '  aferral and argorthas'
        )
        self.about = Pmw.AboutDialog(parent, applicationname = 'Interfaz grafica base de datos Radiografias Uchile')
        self.about.withdraw()


        #################################################

        # Create the Balloon for this toplevel.
        self.balloon = Pmw.Balloon(parent)

        # Create and install the MenuBar.
        menuBar = Pmw.MainMenuBar(parent,
                balloon = self.balloon)
        parent.configure(menu = menuBar)
        self.menuBar = menuBar

        # Add some buttons to the MainMenuBar.
        menuBar.addmenu('Create', 'Close this window or exit')
        menuBar.addmenuitem('Create', 'command', 'Exit the application',
                command = self.createVentanaPaciente,
                label = 'Paciente')

        menuBar.addmenu('Edit','asd')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Medicamento",
                                                 queryAddMedicamento,queryDeleteMedicamento,
                                                 queryUpdateMedicamento,queryListaMedicamento,
                                                 self.actualizaListas),
                label = 'Medicamento')

        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Alergia",queryAddAlergia,
                                                 queryDeleteAlergia,
                                                 queryUpdateAlergia,
                                                 queryListaAlergia,
                                                 self.actualizaListas),
                label = 'Alergia')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Droga",queryAddDroga,
                                                 queryDeleteDroga,
                                                 queryUpdateDroga,
                                                 queryListaDroga,
                                                 self.actualizaListas),
                label = 'Droga')
        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = self.editRadio,
                label = 'Radio')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = self.editAntecedentes,
                label = 'Antecedentes')
        
        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Procedencia",
                                                 queryAddProce,queryDeleteProce,
                                                 queryUpdateProce,queryListaProce,
                                                 self.actualizaListas),
                label = 'Procedencia')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Zona",
                                                 queryAddZona,queryDeleteZona,
                                                 queryUpdateZona,queryListaZona,
                                                 self.actualizaListas),
                label = 'Zona')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Tipo",
                                                 queryAddTipo,queryDeleteTipo,
                                                 queryUpdateTipo,queryListaTipo,
                                                 self.actualizaListas),
                label = 'Tipo')
        menuBar.addmenuitem('Edit', 'separator')
        menuBar.addmenuitem('Edit', 'command', 'Delete the current selection',
                command = lambda: self.newWindow("Tipo",
                                                 queryAddEnfermedad,queryDeleteEnfermedad,
                                                 queryUpdateEnfermedad,queryListaEnfermedad,
                                                 self.actualizaListas),
                label = 'Enfermedad')


        menuBar.addmenu('Help', 'Set user preferences')
        menuBar.addmenuitem('Help', 'command', 'Set general preferences',
                command = self.execute,
                label = 'About')




        #############################################################################

        
        # Create and pack the NoteBook.
        self.notebook = Pmw.NoteBook(parent)
        self.notebook.pack(fill = 'both', expand = 1, padx = 10, pady = 10)

        # Add the "Gemeral" page to the notebook.
        self.page = self.notebook.add('General')
        self.notebook.tab('General').focus_set()

        # Create the "Paciente" contents of the page.
        self.group = Pmw.Group(self.page, tag_text = 'Filtrar personas por RUT :')
        self.group.pack()


        Label(self.group.interior(),
            text = 'RUT sin codigo ver:').grid(row=0,column=0,sticky=W, padx=5, pady=5)
        self.runentry = Entry(self.group.interior())
        self.runentry.grid(row=0,column=1,sticky=W, padx=5, pady=5)

        # Create the "Radiografia" contents of the page.
        self.group1 = Pmw.Group(self.page, tag_text = 'Radiografia \nTodos los campos son obligatorios')
        self.group1.pack()

        #---------------Aqui estan las radiografias------------------------------

        self.vistaRadio = vistaRadio(self.group1)

        #Button "Filtro"
        Button(self.group.interior(),text="Filtrar",command= lambda: filtrarPaciente(
            self.runentry,self.vistaRadio.getWidget('PacienteCombo'),None)
               ).grid(row=0,column=2,sticky=W, padx=5, pady=5)

        #Aqui van los antecedentes y la nueva pagina
        # Add another page
        self.page1 = self.notebook.add('Antecedentes')

        self.groupAntecedentes = Pmw.Group(self.page1, tag_text = 'Antecedentes')
        self.groupAntecedentes.pack(fill = 'both', expand = 1, padx = 10, pady = 10)

        #---------------Aqui estan los antecedentes ------------------------------
        self.vistaAntece = vistaAntecedentes(self.groupAntecedentes)

        self.notebook.setnaturalsize()

        self.statusValue = StringVar()
        self.statusValue.set("Status:")
        self.status = Label(parent,textvariable=self.statusValue).pack()


        # Create and pack the ButtonBox.
        b = Button(parent, text="Crear", command=self.crearRadiografia)
        b.pack(padx = 10, pady = 10,side=RIGHT)

        b = Button(parent, text="Borrar campos", command=self.clean)
        b.pack(padx = 10, pady = 10,side=RIGHT)
        self.actualizaListas()