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

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [xin/] [guiparent.py] - Blame information for rev 434

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

Line No. Rev Author Line
1 331 maximiq
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3 337 maximiq
# generated by wxGlade 0.6.5 on Thu Jun 12 23:43:57 2014
4 331 maximiq
 
5
import wx
6
 
7
# begin wxGlade: extracode
8
# some extra code appended by maximiq
9
# end wxGlade
10
 
11
 
12
class guiParent(wx.Frame):
13
    def __init__(self, *args, **kwds):
14
        # begin wxGlade: guiParent.__init__
15
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
16
        wx.Frame.__init__(self, *args, **kwds)
17
 
18
        # Menu Bar
19
        self.menubar = wx.MenuBar()
20
        wxglade_tmp_menu = wx.Menu()
21
        self.menu_item_ayuda_hint = wx.MenuItem(wxglade_tmp_menu, wx.NewId(), "&Hint", "", wx.ITEM_NORMAL)
22
        wxglade_tmp_menu.AppendItem(self.menu_item_ayuda_hint)
23
        self.menu_item_ayuda_acerca_de = wx.MenuItem(wxglade_tmp_menu, wx.NewId(), "Acerca &de", "", wx.ITEM_NORMAL)
24
        wxglade_tmp_menu.AppendItem(self.menu_item_ayuda_acerca_de)
25
        self.menubar.Append(wxglade_tmp_menu, "&Ayuda")
26
        self.SetMenuBar(self.menubar)
27
        # Menu Bar end
28
        self.statusbar = self.CreateStatusBar(1, 0)
29
        self.label_1 = wx.StaticText(self, -1, "Dispositivos conectados")
30
        self.boton_detectar = wx.Button(self, -1, "&Detectar")
31
        self.list_box_dispositivos_conectados = wx.ListBox(self, -1, choices=[])
32 332 maximiq
        self.label_2 = wx.StaticText(self, -1, u"Fichero de configuraciĆ³n/programaciĆ³n")
33 331 maximiq
        self.boton_elegir_fichero = wx.Button(self, -1, "&Elegir")
34
        self.text_ctrl_fichero = wx.TextCtrl(self, -1, "")
35
        self.boton_transferir = wx.Button(self, -1, "&Transferir")
36
        self.text_ctrl_console = wx.TextCtrl(self, -1, "PHR>>>", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL)
37
        self.boton_borrar_salida = wx.Button(self, -1, "&Borrar salida")
38
 
39
        self.__set_properties()
40
        self.__do_layout()
41
 
42
        self.Bind(wx.EVT_MENU, self.menu_item_ayuda_hint_handler, self.menu_item_ayuda_hint)
43
        self.Bind(wx.EVT_MENU, self.menu_item_ayuda_acerca_de_handler, self.menu_item_ayuda_acerca_de)
44
        self.Bind(wx.EVT_BUTTON, self.boton_detectar_handler, self.boton_detectar)
45
        self.Bind(wx.EVT_BUTTON, self.boton_elegir_fichero_handler, self.boton_elegir_fichero)
46
        self.Bind(wx.EVT_BUTTON, self.boton_transferir_handler, self.boton_transferir)
47
        self.Bind(wx.EVT_BUTTON, self.boton_borrar_salida_handler, self.boton_borrar_salida)
48
        # end wxGlade
49
 
50
    def __set_properties(self):
51
        # begin wxGlade: guiParent.__set_properties
52
        self.SetTitle("PHR GUI")
53
        _icon = wx.EmptyIcon()
54
        _icon.CopyFromBitmap(wx.Bitmap("grafica/phr-gui.ico", wx.BITMAP_TYPE_ANY))
55
        self.SetIcon(_icon)
56 337 maximiq
        self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))
57 331 maximiq
        self.statusbar.SetStatusWidths([-1])
58
        # statusbar fields
59
        statusbar_fields = ["Listo"]
60
        for i in range(len(statusbar_fields)):
61
            self.statusbar.SetStatusText(statusbar_fields[i], i)
62
        self.label_2.SetMinSize((300, 21))
63
        self.text_ctrl_console.SetMinSize((0,120))
64
        # end wxGlade
65
 
66
    def __do_layout(self):
67
        # begin wxGlade: guiParent.__do_layout
68
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
69
        grid_sizer_1 = wx.FlexGridSizer(7, 1, 0, 0)
70
        grid_sizer_3 = wx.FlexGridSizer(1, 2, 0, 0)
71
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
72
        grid_sizer_2.Add(self.label_1, 0, 0, 0)
73
        grid_sizer_2.Add(self.boton_detectar, 0, wx.BOTTOM, 5)
74
        grid_sizer_2.AddGrowableCol(0)
75
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
76
        grid_sizer_1.Add(self.list_box_dispositivos_conectados, 0, wx.BOTTOM | wx.EXPAND, 15)
77
        grid_sizer_3.Add(self.label_2, 0, 0, 0)
78
        grid_sizer_3.Add(self.boton_elegir_fichero, 0, 0, 0)
79
        grid_sizer_3.AddGrowableCol(0)
80
        grid_sizer_1.Add(grid_sizer_3, 1, wx.EXPAND, 0)
81
        grid_sizer_1.Add(self.text_ctrl_fichero, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
82
        grid_sizer_1.Add(self.boton_transferir, 0, wx.TOP | wx.EXPAND, 10)
83
        grid_sizer_1.Add(self.text_ctrl_console, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
84
        grid_sizer_1.Add(self.boton_borrar_salida, 0, wx.ALIGN_RIGHT, 0)
85
        grid_sizer_1.AddGrowableRow(5)
86
        grid_sizer_1.AddGrowableCol(0)
87
        sizer_1.Add(grid_sizer_1, 1, wx.ALL | wx.EXPAND, 5)
88
        self.SetSizer(sizer_1)
89
        sizer_1.Fit(self)
90
        sizer_1.SetSizeHints(self)
91
        self.Layout()
92
        self.Centre()
93
        # end wxGlade
94
 
95
    def menu_item_ayuda_hint_handler(self, event):  # wxGlade: guiParent.<event_handler>
96
        print "Event handler `menu_item_ayuda_hint_handler' not implemented!"
97
        event.Skip()
98
 
99
    def menu_item_ayuda_acerca_de_handler(self, event):  # wxGlade: guiParent.<event_handler>
100
        print "Event handler `menu_item_ayuda_acerca_de_handler' not implemented!"
101
        event.Skip()
102
 
103
    def boton_detectar_handler(self, event):  # wxGlade: guiParent.<event_handler>
104
        print "Event handler `boton_detectar_handler' not implemented!"
105
        event.Skip()
106
 
107
    def boton_elegir_fichero_handler(self, event):  # wxGlade: guiParent.<event_handler>
108
        print "Event handler `boton_elegir_fichero_handler' not implemented!"
109
        event.Skip()
110
 
111
    def boton_transferir_handler(self, event):  # wxGlade: guiParent.<event_handler>
112
        print "Event handler `boton_transferir_handler' not implemented!"
113
        event.Skip()
114
 
115
    def boton_borrar_salida_handler(self, event):  # wxGlade: guiParent.<event_handler>
116
        print "Event handler `boton_borrar_salida_handler' not implemented!"
117
        event.Skip()
118
 
119
# end of class guiParent
120
if __name__ == "__main__":
121
    app = wx.PySimpleApp(0)
122
    wx.InitAllImageHandlers()
123
    main_frame = guiParent(None, -1, "")
124
    app.SetTopWindow(main_frame)
125
    main_frame.Show()
126
    app.MainLoop()

powered by: WebSVN 2.1.0

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