Package Gnumed :: Package wxGladeWidgets :: Module wxgMeasurementsAsTablePnl
[frames] | no frames]

Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementsAsTablePnl

 1  # -*- coding: UTF-8 -*- 
 2  # 
 3  # generated by wxGlade 
 4  # 
 5   
 6  import wx 
 7  import wx.grid 
 8   
 9  # begin wxGlade: dependencies 
10  import gettext 
11  # end wxGlade 
12   
13  # begin wxGlade: extracode 
14  # end wxGlade 
15   
16   
17 -class wxgMeasurementsAsTablePnl(wx.Panel):
18 - def __init__(self, *args, **kwds):
19 # begin wxGlade: wxgMeasurementsAsTablePnl.__init__ 20 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 21 wx.Panel.__init__(self, *args, **kwds) 22 from Gnumed.wxpython.gmMeasurementWidgets import cMeasurementsGrid 23 self._GRID_results_all = cMeasurementsGrid(self, wx.ID_ANY, size=(1, 1)) 24 self._BTN_manage_types = wx.Button(self, wx.ID_ANY, _("Manage types"), style=wx.BU_EXACTFIT) 25 self._BTN_add = wx.Button(self, wx.ID_ADD, "", style=wx.BU_EXACTFIT) 26 self._BTN_select = wx.Button(self, wx.ID_ANY, _("&Select:"), style=wx.BU_EXACTFIT) 27 self._RBTN_my_unsigned = wx.RadioButton(self, wx.ID_ANY, _("your unsigned (&Y)")) 28 self._RBTN_all_unsigned = wx.RadioButton(self, wx.ID_ANY, _("all unsigned (&A)")) 29 self._BTN_review = wx.Button(self, wx.ID_ANY, _("&Actions ... "), style=wx.BU_EXACTFIT) 30 31 self.__set_properties() 32 self.__do_layout() 33 34 self.Bind(wx.EVT_BUTTON, self._on_manage_types_button_pressed, self._BTN_manage_types) 35 self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add) 36 self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select) 37 self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
38 # end wxGlade 39
40 - def __set_properties(self):
41 # begin wxGlade: wxgMeasurementsAsTablePnl.__set_properties 42 self._BTN_manage_types.SetToolTip(_("Manage test types.")) 43 self._BTN_add.SetToolTip(_("Add measurments.")) 44 self._BTN_select.SetToolTip(_("Select results according to your choice on the right.\n\nThis will override any previous selection.\n\nNote that you can also select cells, rows, or columns manually within the table.")) 45 self._RBTN_my_unsigned.SetToolTip(_("Apply selection to those unsigned results for which you are to take responsibility.")) 46 self._RBTN_all_unsigned.SetToolTip(_("Apply selection to all unsigned results.")) 47 self._BTN_review.SetToolTip(_("Invoke actions on the selected measurements."))
48 # end wxGlade 49
50 - def __do_layout(self):
51 # begin wxGlade: wxgMeasurementsAsTablePnl.__do_layout 52 __szr_main = wx.BoxSizer(wx.VERTICAL) 53 __szr_bottom = wx.BoxSizer(wx.HORIZONTAL) 54 __szr_main.Add(self._GRID_results_all, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5) 55 __hline_buttons = wx.StaticLine(self, wx.ID_ANY) 56 __szr_main.Add(__hline_buttons, 0, wx.ALL | wx.EXPAND, 5) 57 __szr_bottom.Add(self._BTN_manage_types, 0, wx.ALIGN_CENTER_VERTICAL, 0) 58 __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0) 59 __vline_buttons = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL) 60 __szr_bottom.Add(__vline_buttons, 0, wx.EXPAND | wx.RIGHT, 3) 61 __lbl_results = wx.StaticText(self, wx.ID_ANY, _("Results:")) 62 __szr_bottom.Add(__lbl_results, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 63 __szr_bottom.Add(self._BTN_add, 0, wx.ALIGN_CENTER_VERTICAL, 3) 64 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) 65 __szr_bottom.Add(self._BTN_select, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 66 __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 67 __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 68 __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0) 69 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) 70 __szr_main.Add(__szr_bottom, 0, wx.BOTTOM | wx.EXPAND | wx.LEFT | wx.RIGHT, 5) 71 self.SetSizer(__szr_main) 72 __szr_main.Fit(self) 73 self.Layout()
74 # end wxGlade 75
76 - def _on_manage_types_button_pressed(self, event): # wxGlade: wxgMeasurementsAsTablePnl.<event_handler>
77 print("Event handler '_on_manage_types_button_pressed' not implemented!") 78 event.Skip()
79
80 - def _on_add_button_pressed(self, event): # wxGlade: wxgMeasurementsAsTablePnl.<event_handler>
81 print("Event handler '_on_add_button_pressed' not implemented!") 82 event.Skip() 83
84 - def _on_select_button_pressed(self, event): # wxGlade: wxgMeasurementsAsTablePnl.<event_handler>
85 print("Event handler '_on_select_button_pressed' not implemented!") 86 event.Skip() 87
88 - def _on_review_button_pressed(self, event): # wxGlade: wxgMeasurementsAsTablePnl.<event_handler>
89 print("Event handler '_on_review_button_pressed' not implemented!") 90 event.Skip() 91 92 # end of class wxgMeasurementsAsTablePnl 93