URL
https://opencores.org/ocsvn/phr/phr/trunk
Subversion Repositories phr
[/] [phr/] [trunk/] [codigo/] [gui/] [xin/] [guiparent.py] - Rev 352
Go to most recent revision | Compare with Previous | Blame | View Log
#!/usr/bin/env python # -*- coding: utf-8 -*- # generated by wxGlade 0.6.5 on Thu Jun 12 23:43:57 2014 import wx # begin wxGlade: extracode # some extra code appended by maximiq # end wxGlade class guiParent(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: guiParent.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) # Menu Bar self.menubar = wx.MenuBar() wxglade_tmp_menu = wx.Menu() self.menu_item_ayuda_hint = wx.MenuItem(wxglade_tmp_menu, wx.NewId(), "&Hint", "", wx.ITEM_NORMAL) wxglade_tmp_menu.AppendItem(self.menu_item_ayuda_hint) self.menu_item_ayuda_acerca_de = wx.MenuItem(wxglade_tmp_menu, wx.NewId(), "Acerca &de", "", wx.ITEM_NORMAL) wxglade_tmp_menu.AppendItem(self.menu_item_ayuda_acerca_de) self.menubar.Append(wxglade_tmp_menu, "&Ayuda") self.SetMenuBar(self.menubar) # Menu Bar end self.statusbar = self.CreateStatusBar(1, 0) self.label_1 = wx.StaticText(self, -1, "Dispositivos conectados") self.boton_detectar = wx.Button(self, -1, "&Detectar") self.list_box_dispositivos_conectados = wx.ListBox(self, -1, choices=[]) self.label_2 = wx.StaticText(self, -1, u"Fichero de configuraciĆ³n/programaciĆ³n") self.boton_elegir_fichero = wx.Button(self, -1, "&Elegir") self.text_ctrl_fichero = wx.TextCtrl(self, -1, "") self.boton_transferir = wx.Button(self, -1, "&Transferir") self.text_ctrl_console = wx.TextCtrl(self, -1, "PHR>>>", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL) self.boton_borrar_salida = wx.Button(self, -1, "&Borrar salida") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_MENU, self.menu_item_ayuda_hint_handler, self.menu_item_ayuda_hint) self.Bind(wx.EVT_MENU, self.menu_item_ayuda_acerca_de_handler, self.menu_item_ayuda_acerca_de) self.Bind(wx.EVT_BUTTON, self.boton_detectar_handler, self.boton_detectar) self.Bind(wx.EVT_BUTTON, self.boton_elegir_fichero_handler, self.boton_elegir_fichero) self.Bind(wx.EVT_BUTTON, self.boton_transferir_handler, self.boton_transferir) self.Bind(wx.EVT_BUTTON, self.boton_borrar_salida_handler, self.boton_borrar_salida) # end wxGlade def __set_properties(self): # begin wxGlade: guiParent.__set_properties self.SetTitle("PHR GUI") _icon = wx.EmptyIcon() _icon.CopyFromBitmap(wx.Bitmap("grafica/phr-gui.ico", wx.BITMAP_TYPE_ANY)) self.SetIcon(_icon) self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)) self.statusbar.SetStatusWidths([-1]) # statusbar fields statusbar_fields = ["Listo"] for i in range(len(statusbar_fields)): self.statusbar.SetStatusText(statusbar_fields[i], i) self.label_2.SetMinSize((300, 21)) self.text_ctrl_console.SetMinSize((0,120)) # end wxGlade def __do_layout(self): # begin wxGlade: guiParent.__do_layout sizer_1 = wx.BoxSizer(wx.VERTICAL) grid_sizer_1 = wx.FlexGridSizer(7, 1, 0, 0) grid_sizer_3 = wx.FlexGridSizer(1, 2, 0, 0) grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0) grid_sizer_2.Add(self.label_1, 0, 0, 0) grid_sizer_2.Add(self.boton_detectar, 0, wx.BOTTOM, 5) grid_sizer_2.AddGrowableCol(0) grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0) grid_sizer_1.Add(self.list_box_dispositivos_conectados, 0, wx.BOTTOM | wx.EXPAND, 15) grid_sizer_3.Add(self.label_2, 0, 0, 0) grid_sizer_3.Add(self.boton_elegir_fichero, 0, 0, 0) grid_sizer_3.AddGrowableCol(0) grid_sizer_1.Add(grid_sizer_3, 1, wx.EXPAND, 0) grid_sizer_1.Add(self.text_ctrl_fichero, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5) grid_sizer_1.Add(self.boton_transferir, 0, wx.TOP | wx.EXPAND, 10) grid_sizer_1.Add(self.text_ctrl_console, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5) grid_sizer_1.Add(self.boton_borrar_salida, 0, wx.ALIGN_RIGHT, 0) grid_sizer_1.AddGrowableRow(5) grid_sizer_1.AddGrowableCol(0) sizer_1.Add(grid_sizer_1, 1, wx.ALL | wx.EXPAND, 5) self.SetSizer(sizer_1) sizer_1.Fit(self) sizer_1.SetSizeHints(self) self.Layout() self.Centre() # end wxGlade def menu_item_ayuda_hint_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `menu_item_ayuda_hint_handler' not implemented!" event.Skip() def menu_item_ayuda_acerca_de_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `menu_item_ayuda_acerca_de_handler' not implemented!" event.Skip() def boton_detectar_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `boton_detectar_handler' not implemented!" event.Skip() def boton_elegir_fichero_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `boton_elegir_fichero_handler' not implemented!" event.Skip() def boton_transferir_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `boton_transferir_handler' not implemented!" event.Skip() def boton_borrar_salida_handler(self, event): # wxGlade: guiParent.<event_handler> print "Event handler `boton_borrar_salida_handler' not implemented!" event.Skip() # end of class guiParent if __name__ == "__main__": app = wx.PySimpleApp(0) wx.InitAllImageHandlers() main_frame = guiParent(None, -1, "") app.SetTopWindow(main_frame) main_frame.Show() app.MainLoop()
Go to most recent revision | Compare with Previous | Blame | View Log