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

Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementsPnl

  1  #!/usr/bin/env python 
  2  # -*- coding: UTF-8 -*- 
  3  # 
  4  # generated by wxGlade 0.6.7+ 
  5  # 
  6   
  7  import wx 
  8  import wx.grid 
  9   
 10  # begin wxGlade: dependencies 
 11  import gettext 
 12  # end wxGlade 
 13   
 14  # begin wxGlade: extracode 
 15  # end wxGlade 
 16   
 17   
18 -class wxgMeasurementsPnl(wx.ScrolledWindow):
19 - def __init__(self, *args, **kwds):
20 21 from Gnumed.wxpython import gmMeasurementWidgets 22 23 # begin wxGlade: wxgMeasurementsPnl.__init__ 24 kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL 25 wx.ScrolledWindow.__init__(self, *args, **kwds) 26 self._PRW_panel = gmMeasurementWidgets.cTestPanelPRW(self, wx.ID_ANY, "", style=wx.NO_BORDER) 27 self._TCTRL_panel_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER) 28 self._BTN_manage_panels = wx.Button(self, wx.ID_ANY, _("Manage panels"), style=wx.BU_EXACTFIT) 29 self.panel_data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, wx.ID_ANY, size=(1, 1)) 30 self.data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, wx.ID_ANY, size=(1, 1)) 31 self._BTN_add = wx.Button(self, wx.ID_ADD, "") 32 self._BTN_list = wx.Button(self, wx.ID_ANY, _("&List")) 33 self._BTN_select = wx.Button(self, wx.ID_ANY, _("&Select:"), style=wx.BU_EXACTFIT) 34 self._RBTN_my_unsigned = wx.RadioButton(self, wx.ID_ANY, _("your unsigned (&Y)")) 35 self._RBTN_all_unsigned = wx.RadioButton(self, wx.ID_ANY, _("all unsigned (&A)")) 36 self._BTN_review = wx.Button(self, wx.ID_ANY, _("&Actions ... "), style=wx.BU_EXACTFIT) 37 38 self.__set_properties() 39 self.__do_layout() 40 41 self.Bind(wx.EVT_BUTTON, self._on_manage_panels_button_pressed, self._BTN_manage_panels) 42 self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add) 43 self.Bind(wx.EVT_BUTTON, self._on_list_button_pressed, self._BTN_list) 44 self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select) 45 self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
46 # end wxGlade 47
48 - def __set_properties(self):
49 # begin wxGlade: wxgMeasurementsPnl.__set_properties 50 self.SetScrollRate(10, 10) 51 self._TCTRL_panel_comment.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND)) 52 self._TCTRL_panel_comment.Enable(False) 53 self._BTN_manage_panels.SetToolTipString(_("Manage test panels.")) 54 self._BTN_add.SetToolTipString(_("Add measurments.")) 55 self._BTN_list.SetToolTipString(_("Show all measurements in a chronological list.")) 56 self._BTN_select.SetToolTipString(_("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.")) 57 self._RBTN_my_unsigned.SetToolTipString(_("Apply selection to those unsigned results for which you are to take responsibility.")) 58 self._RBTN_all_unsigned.SetToolTipString(_("Apply selection to all unsigned results.")) 59 self._BTN_review.SetToolTipString(_("Invoke actions on the selected measurements."))
60 # end wxGlade 61
62 - def __do_layout(self):
63 # begin wxGlade: wxgMeasurementsPnl.__do_layout 64 __szr_main = wx.BoxSizer(wx.VERTICAL) 65 __szr_bottom = wx.BoxSizer(wx.HORIZONTAL) 66 __szr_grids = wx.BoxSizer(wx.VERTICAL) 67 __szr_panel_options = wx.BoxSizer(wx.HORIZONTAL) 68 __lbl_display = wx.StaticText(self, wx.ID_ANY, _("Spotlight &Panel:")) 69 __szr_panel_options.Add(__lbl_display, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5) 70 __szr_panel_options.Add(self._PRW_panel, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10) 71 __szr_panel_options.Add(self._TCTRL_panel_comment, 3, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5) 72 __szr_panel_options.Add(self._BTN_manage_panels, 0, wx.ALIGN_CENTER_VERTICAL, 0) 73 __szr_main.Add(__szr_panel_options, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5) 74 __szr_grids.Add(self.panel_data_grid, 0, wx.EXPAND, 5) 75 __szr_grids.Add(self.data_grid, 1, wx.TOP | wx.EXPAND, 5) 76 __szr_main.Add(__szr_grids, 1, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5) 77 __hline_buttons = wx.StaticLine(self, wx.ID_ANY) 78 __szr_main.Add(__hline_buttons, 0, wx.ALL | wx.EXPAND, 5) 79 __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0) 80 __szr_bottom.Add(self._BTN_add, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3) 81 __szr_bottom.Add(self._BTN_list, 0, wx.ALIGN_CENTER_VERTICAL, 0) 82 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) 83 __szr_bottom.Add(self._BTN_select, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5) 84 __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3) 85 __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3) 86 __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0) 87 __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) 88 __szr_main.Add(__szr_bottom, 0, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 5) 89 self.SetSizer(__szr_main) 90 __szr_main.Fit(self)
91 # end wxGlade 92
93 - def _on_manage_panels_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
94 print "Event handler '_on_manage_panels_button_pressed' not implemented!" 95 event.Skip()
96
97 - def _on_add_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
98 print "Event handler '_on_add_button_pressed' not implemented!" 99 event.Skip() 100
101 - def _on_list_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
102 print "Event handler '_on_list_button_pressed' not implemented!" 103 event.Skip() 104
105 - def _on_select_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
106 print "Event handler '_on_select_button_pressed' not implemented!" 107 event.Skip() 108
109 - def _on_review_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
110 print "Event handler '_on_review_button_pressed' not implemented!" 111 event.Skip() 112 113 # end of class wxgMeasurementsPnl 114