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

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [interfaz/] [gui.py] - Blame information for rev 327

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

Line No. Rev Author Line
1 182 maximiq
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
# generated by wxGlade 0.6.3 on Wed Mar 26 16:29:14 2014
4
 
5
import wx
6
 
7
# begin wxGlade: extracode
8
# end wxGlade
9
 
10
 
11
 
12
class MyFrame(wx.Frame):
13
    def __init__(self, *args, **kwds):
14
        # begin wxGlade: MyFrame.__init__
15
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
16
        wx.Frame.__init__(self, *args, **kwds)
17
        self.frame_1_statusbar = self.CreateStatusBar(1, 0)
18
        self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("ban.jpg", wx.BITMAP_TYPE_ANY))
19
        self.button_help = wx.Button(self, -1, "  Ayuda  ")
20
        self.button_about = wx.Button(self, -1, "  Acerca de  ")
21
        self.text_ctrl_file = wx.TextCtrl(self, -1, "")
22
        self.button_choose_file = wx.Button(self, -1, "Elegir fichero")
23
        self.button_conf_fpga = wx.Button(self, -1, "Configurar FPGA")
24
        self.button_prog_prom = wx.Button(self, -1, "Programar PROM")
25
        self.text_ctrl_console = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL)
26
        self.button_conection = wx.Button(self, -1, u"  Comprobar conexión  ")
27
        self.button_empty = wx.Button(self, -1, "  Borrar salida  ")
28
 
29
        self.__set_properties()
30
        self.__do_layout()
31
 
32
        self.Bind(wx.EVT_BUTTON, self.boton_ayuda, self.button_help)
33
        self.Bind(wx.EVT_BUTTON, self.boton_acerca_de, self.button_about)
34
        self.Bind(wx.EVT_BUTTON, self.boton_elegir_fichero, self.button_choose_file)
35
        self.Bind(wx.EVT_BUTTON, self.boton_conf_fpga, self.button_conf_fpga)
36
        self.Bind(wx.EVT_BUTTON, self.boton_prog_prom, self.button_prog_prom)
37
        self.Bind(wx.EVT_BUTTON, self.boton_conexion, self.button_conection)
38
        self.Bind(wx.EVT_BUTTON, self.boton_borrar, self.button_empty)
39
        # end wxGlade
40
 
41
    def __set_properties(self):
42
        # begin wxGlade: MyFrame.__set_properties
43
        self.SetTitle("PHR GUI")
44
        _icon = wx.EmptyIcon()
45
        _icon.CopyFromBitmap(wx.Bitmap("phr.ico", wx.BITMAP_TYPE_ANY))
46
        self.SetIcon(_icon)
47
        self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))
48
        self.frame_1_statusbar.SetStatusWidths([-1])
49
        # statusbar fields
50
        frame_1_statusbar_fields = ["Listo"]
51
        for i in range(len(frame_1_statusbar_fields)):
52
            self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
53
        self.text_ctrl_console.SetMinSize((-1, 150))
54
        # end wxGlade
55
 
56
    def __do_layout(self):
57
        # begin wxGlade: MyFrame.__do_layout
58
        grid_sizer_1 = wx.FlexGridSizer(5, 1, 0, 0)
59
        grid_sizer_2 = wx.GridSizer(1, 2, 0, 0)
60
        grid_sizer_4 = wx.GridSizer(1, 2, 0, 0)
61
        grid_sizer_5 = wx.FlexGridSizer(1, 2, 0, 0)
62
        grid_sizer_6 = wx.FlexGridSizer(1, 2, 0, 0)
63
        grid_sizer_7 = wx.FlexGridSizer(2, 1, 0, 0)
64
        grid_sizer_6.Add(self.bitmap_1, 0, wx.ALL, 5)
65
        grid_sizer_7.Add(self.button_help, 0, wx.RIGHT|wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
66
        grid_sizer_7.Add(self.button_about, 0, wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
67
        grid_sizer_6.Add(grid_sizer_7, 1, wx.EXPAND, 0)
68
        grid_sizer_6.AddGrowableCol(1)
69
        grid_sizer_1.Add(grid_sizer_6, 1, wx.EXPAND, 0)
70
        grid_sizer_5.Add(self.text_ctrl_file, 0, wx.ALL|wx.EXPAND, 5)
71
        grid_sizer_5.Add(self.button_choose_file, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
72
        grid_sizer_5.AddGrowableCol(0)
73
        grid_sizer_1.Add(grid_sizer_5, 1, wx.EXPAND, 0)
74
        grid_sizer_4.Add(self.button_conf_fpga, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
75
        grid_sizer_4.Add(self.button_prog_prom, 0, wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
76
        grid_sizer_1.Add(grid_sizer_4, 1, wx.EXPAND, 0)
77
        grid_sizer_1.Add(self.text_ctrl_console, 0, wx.ALL|wx.EXPAND, 5)
78
        grid_sizer_2.Add(self.button_conection, 0, wx.LEFT|wx.BOTTOM, 5)
79
        grid_sizer_2.Add(self.button_empty, 0, wx.RIGHT|wx.BOTTOM|wx.ALIGN_RIGHT, 5)
80
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
81
        self.SetSizer(grid_sizer_1)
82
        grid_sizer_1.Fit(self)
83
        grid_sizer_1.SetSizeHints(self)
84
        grid_sizer_1.AddGrowableRow(3)
85
        grid_sizer_1.AddGrowableCol(0)
86
        self.Layout()
87
        # end wxGlade
88
 
89
    def boton_ayuda(self, event): # wxGlade: MyFrame.<event_handler>
90
        print "Event handler `boton_ayuda' not implemented!"
91
        event.Skip()
92
 
93
    def boton_acerca_de(self, event): # wxGlade: MyFrame.<event_handler>
94
        print "Event handler `boton_acerca_de' not implemented!"
95
        event.Skip()
96
 
97
    def boton_elegir_fichero(self, event): # wxGlade: MyFrame.<event_handler>
98
        print "Event handler `boton_elegir_fichero' not implemented!"
99
        event.Skip()
100
 
101
    def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler>
102
        print "Event handler `boton_conf_fpga' not implemented!"
103
        event.Skip()
104
 
105
    def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler>
106
        print "Event handler `boton_prog_prom' not implemented!"
107
        event.Skip()
108
 
109
    def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler>
110
        print "Event handler `boton_conexion' not implemented!"
111
        event.Skip()
112
 
113
    def boton_borrar(self, event): # wxGlade: MyFrame.<event_handler>
114
        print "Event handler `boton_borrar' not implemented!"
115
        event.Skip()
116
 
117
# end of class MyFrame
118
 
119
 
120
if __name__ == "__main__":
121
    app = wx.PySimpleApp(0)
122
    wx.InitAllImageHandlers()
123
    frame_1 = MyFrame(None, -1, "")
124
    app.SetTopWindow(frame_1)
125
    frame_1.Show()
126
    app.MainLoop()

powered by: WebSVN 2.1.0

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