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

Subversion Repositories phr

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

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 332 maximiq
# generated by wxGlade 0.6.5 on Mon Jun  9 21:21:26 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
        self.statusbar.SetStatusWidths([-1])
57
        # statusbar fields
58
        statusbar_fields = ["Listo"]
59
        for i in range(len(statusbar_fields)):
60
            self.statusbar.SetStatusText(statusbar_fields[i], i)
61
        self.label_2.SetMinSize((300, 21))
62
        self.text_ctrl_console.SetMinSize((0,120))
63
        # end wxGlade
64
 
65
    def __do_layout(self):
66
        # begin wxGlade: guiParent.__do_layout
67
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
68
        grid_sizer_1 = wx.FlexGridSizer(7, 1, 0, 0)
69
        grid_sizer_3 = wx.FlexGridSizer(1, 2, 0, 0)
70
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
71
        grid_sizer_2.Add(self.label_1, 0, 0, 0)
72
        grid_sizer_2.Add(self.boton_detectar, 0, wx.BOTTOM, 5)
73
        grid_sizer_2.AddGrowableCol(0)
74
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
75
        grid_sizer_1.Add(self.list_box_dispositivos_conectados, 0, wx.BOTTOM | wx.EXPAND, 15)
76
        grid_sizer_3.Add(self.label_2, 0, 0, 0)
77
        grid_sizer_3.Add(self.boton_elegir_fichero, 0, 0, 0)
78
        grid_sizer_3.AddGrowableCol(0)
79
        grid_sizer_1.Add(grid_sizer_3, 1, wx.EXPAND, 0)
80
        grid_sizer_1.Add(self.text_ctrl_fichero, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
81
        grid_sizer_1.Add(self.boton_transferir, 0, wx.TOP | wx.EXPAND, 10)
82
        grid_sizer_1.Add(self.text_ctrl_console, 0, wx.TOP | wx.BOTTOM | wx.EXPAND, 5)
83
        grid_sizer_1.Add(self.boton_borrar_salida, 0, wx.ALIGN_RIGHT, 0)
84
        grid_sizer_1.AddGrowableRow(5)
85
        grid_sizer_1.AddGrowableCol(0)
86
        sizer_1.Add(grid_sizer_1, 1, wx.ALL | wx.EXPAND, 5)
87
        self.SetSizer(sizer_1)
88
        sizer_1.Fit(self)
89
        sizer_1.SetSizeHints(self)
90
        self.Layout()
91
        self.Centre()
92
        # end wxGlade
93
 
94
    def menu_item_ayuda_hint_handler(self, event):  # wxGlade: guiParent.<event_handler>
95
        print "Event handler `menu_item_ayuda_hint_handler' not implemented!"
96
        event.Skip()
97
 
98
    def menu_item_ayuda_acerca_de_handler(self, event):  # wxGlade: guiParent.<event_handler>
99
        print "Event handler `menu_item_ayuda_acerca_de_handler' not implemented!"
100
        event.Skip()
101
 
102
    def boton_detectar_handler(self, event):  # wxGlade: guiParent.<event_handler>
103
        print "Event handler `boton_detectar_handler' not implemented!"
104
        event.Skip()
105
 
106
    def boton_elegir_fichero_handler(self, event):  # wxGlade: guiParent.<event_handler>
107
        print "Event handler `boton_elegir_fichero_handler' not implemented!"
108
        event.Skip()
109
 
110
    def boton_transferir_handler(self, event):  # wxGlade: guiParent.<event_handler>
111
        print "Event handler `boton_transferir_handler' not implemented!"
112
        event.Skip()
113
 
114
    def boton_borrar_salida_handler(self, event):  # wxGlade: guiParent.<event_handler>
115
        print "Event handler `boton_borrar_salida_handler' not implemented!"
116
        event.Skip()
117
 
118
# end of class guiParent
119
if __name__ == "__main__":
120
    app = wx.PySimpleApp(0)
121
    wx.InitAllImageHandlers()
122
    main_frame = guiParent(None, -1, "")
123
    app.SetTopWindow(main_frame)
124
    main_frame.Show()
125
    app.MainLoop()

powered by: WebSVN 2.1.0

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