OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [interfaz/] [gui.py] - Rev 278

Go to most recent revision | Compare with Previous | Blame | View Log

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Wed Mar 26 16:29:14 2014
 
import wx
 
# begin wxGlade: extracode
# end wxGlade
 
 
 
class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.frame_1_statusbar = self.CreateStatusBar(1, 0)
        self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("ban.jpg", wx.BITMAP_TYPE_ANY))
        self.button_help = wx.Button(self, -1, "  Ayuda  ")
        self.button_about = wx.Button(self, -1, "  Acerca de  ")
        self.text_ctrl_file = wx.TextCtrl(self, -1, "")
        self.button_choose_file = wx.Button(self, -1, "Elegir fichero")
        self.button_conf_fpga = wx.Button(self, -1, "Configurar FPGA")
        self.button_prog_prom = wx.Button(self, -1, "Programar PROM")
        self.text_ctrl_console = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL)
        self.button_conection = wx.Button(self, -1, u"  Comprobar conexión  ")
        self.button_empty = wx.Button(self, -1, "  Borrar salida  ")
 
        self.__set_properties()
        self.__do_layout()
 
        self.Bind(wx.EVT_BUTTON, self.boton_ayuda, self.button_help)
        self.Bind(wx.EVT_BUTTON, self.boton_acerca_de, self.button_about)
        self.Bind(wx.EVT_BUTTON, self.boton_elegir_fichero, self.button_choose_file)
        self.Bind(wx.EVT_BUTTON, self.boton_conf_fpga, self.button_conf_fpga)
        self.Bind(wx.EVT_BUTTON, self.boton_prog_prom, self.button_prog_prom)
        self.Bind(wx.EVT_BUTTON, self.boton_conexion, self.button_conection)
        self.Bind(wx.EVT_BUTTON, self.boton_borrar, self.button_empty)
        # end wxGlade
 
    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("PHR GUI")
        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap("phr.ico", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))
        self.frame_1_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_1_statusbar_fields = ["Listo"]
        for i in range(len(frame_1_statusbar_fields)):
            self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
        self.text_ctrl_console.SetMinSize((-1, 150))
        # end wxGlade
 
    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        grid_sizer_1 = wx.FlexGridSizer(5, 1, 0, 0)
        grid_sizer_2 = wx.GridSizer(1, 2, 0, 0)
        grid_sizer_4 = wx.GridSizer(1, 2, 0, 0)
        grid_sizer_5 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_6 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_7 = wx.FlexGridSizer(2, 1, 0, 0)
        grid_sizer_6.Add(self.bitmap_1, 0, wx.ALL, 5)
        grid_sizer_7.Add(self.button_help, 0, wx.RIGHT|wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
        grid_sizer_7.Add(self.button_about, 0, wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
        grid_sizer_6.Add(grid_sizer_7, 1, wx.EXPAND, 0)
        grid_sizer_6.AddGrowableCol(1)
        grid_sizer_1.Add(grid_sizer_6, 1, wx.EXPAND, 0)
        grid_sizer_5.Add(self.text_ctrl_file, 0, wx.ALL|wx.EXPAND, 5)
        grid_sizer_5.Add(self.button_choose_file, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
        grid_sizer_5.AddGrowableCol(0)
        grid_sizer_1.Add(grid_sizer_5, 1, wx.EXPAND, 0)
        grid_sizer_4.Add(self.button_conf_fpga, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
        grid_sizer_4.Add(self.button_prog_prom, 0, wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
        grid_sizer_1.Add(grid_sizer_4, 1, wx.EXPAND, 0)
        grid_sizer_1.Add(self.text_ctrl_console, 0, wx.ALL|wx.EXPAND, 5)
        grid_sizer_2.Add(self.button_conection, 0, wx.LEFT|wx.BOTTOM, 5)
        grid_sizer_2.Add(self.button_empty, 0, wx.RIGHT|wx.BOTTOM|wx.ALIGN_RIGHT, 5)
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(grid_sizer_1)
        grid_sizer_1.Fit(self)
        grid_sizer_1.SetSizeHints(self)
        grid_sizer_1.AddGrowableRow(3)
        grid_sizer_1.AddGrowableCol(0)
        self.Layout()
        # end wxGlade
 
    def boton_ayuda(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_ayuda' not implemented!"
        event.Skip()
 
    def boton_acerca_de(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_acerca_de' not implemented!"
        event.Skip()
 
    def boton_elegir_fichero(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_elegir_fichero' not implemented!"
        event.Skip()
 
    def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_conf_fpga' not implemented!"
        event.Skip()
 
    def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_prog_prom' not implemented!"
        event.Skip()
 
    def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_conexion' not implemented!"
        event.Skip()
 
    def boton_borrar(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `boton_borrar' not implemented!"
        event.Skip()
 
# end of class MyFrame
 
 
if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    frame_1 = MyFrame(None, -1, "")
    app.SetTopWindow(frame_1)
    frame_1.Show()
    app.MainLoop()
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.