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  # generated by wxGlade 0.6.1 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgMeasurementsPnl.wxg"
      4
      5  import wx
      6  import wx.grid
      7
      8  # begin wxGlade: extracode
      9  # end wxGlade
     10
     11
     12
     13 -class wxgMeasurementsPnl(wx.ScrolledWindow):
     14 -    def __init__(self, *args, **kwds):
     15
     16          from Gnumed.wxpython import gmMeasurementWidgets
     17
     18          # begin wxGlade: wxgMeasurementsPnl.__init__
     19          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     20          wx.ScrolledWindow.__init__(self, *args, **kwds)
     21          self._PRW_panel = gmMeasurementWidgets.cTestPanelPRW(self, -1, "", style=wx.NO_BORDER)
     22          self._TCTRL_panel_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     23          self._BTN_manage_panels = wx.Button(self, -1, _("Manage"), style=wx.BU_EXACTFIT)
     24          self.panel_data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, -1, size=(1, 1))
     25          self.data_grid = gmMeasurementWidgets.cMeasurementsGrid(self, -1, size=(1, 1))
     26          self._BTN_add = wx.Button(self, wx.ID_ADD, "")
     27          self._RBTN_my_unsigned = wx.RadioButton(self, -1, _("&Your unsigned"))
     28          self._RBTN_all_unsigned = wx.RadioButton(self, -1, _("&All unsigned"))
     29          self._BTN_select = wx.Button(self, -1, _("&Select"))
     30          self._BTN_review = wx.Button(self, -1, _("&Actions ... "))
     31
     32          self.__set_properties()
     33          self.__do_layout()
     34
     35          self.Bind(wx.EVT_BUTTON, self._on_manage_panels_button_pressed, self._BTN_manage_panels)
     36          self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
     37          self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select)
     38          self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
     39          # end wxGlade
     40
     41 -    def __set_properties(self):
     42          # begin wxGlade: wxgMeasurementsPnl.__set_properties
     43          self.SetScrollRate(10, 10)
     44          self._TCTRL_panel_comment.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     45          self._TCTRL_panel_comment.Enable(False)
     46          self._BTN_manage_panels.SetToolTipString(_("Manage test panels."))
     47          self._BTN_add.SetToolTipString(_("Add measurments."))
     48          self._RBTN_my_unsigned.SetToolTipString(_("Apply selection to those unsigned results for which you are to take responsibility."))
     49          self._RBTN_all_unsigned.SetToolTipString(_("Apply selection to all unsigned results."))
     50          self._BTN_select.SetToolTipString(_("Select results according to your choice on the left.\n\nThis will override any previous selection.\n\nNote that you can also select cells, rows, or columns manually within the table."))
     51          self._BTN_review.SetToolTipString(_("Invoke actions on the selected measurements."))
     52          # end wxGlade
     53
     54 -    def __do_layout(self):
     55          # begin wxGlade: wxgMeasurementsPnl.__do_layout
     56          __szr_main = wx.BoxSizer(wx.VERTICAL)
     57          __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
     58          __szr_grids = wx.BoxSizer(wx.VERTICAL)
     59          __szr_panel_options = wx.BoxSizer(wx.HORIZONTAL)
     60          __lbl_display = wx.StaticText(self, -1, _("Group by &panel:"))
     61          __szr_panel_options.Add(__lbl_display, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
     62          __szr_panel_options.Add(self._PRW_panel, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)
     63          __szr_panel_options.Add(self._TCTRL_panel_comment, 3, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
     64          __szr_panel_options.Add(self._BTN_manage_panels, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     65          __szr_main.Add(__szr_panel_options, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5)
     66          __szr_grids.Add(self.panel_data_grid, 0, wx.EXPAND, 5)
     67          __szr_grids.Add(self.data_grid, 1, wx.TOP | wx.EXPAND, 5)
     68          __szr_main.Add(__szr_grids, 1, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5)
     69          __hline_buttons = wx.StaticLine(self, -1)
     70          __szr_main.Add(__hline_buttons, 0, wx.ALL | wx.EXPAND, 5)
     71          __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
     72          __szr_bottom.Add(self._BTN_add, 0, wx.ALIGN_CENTER_VERTICAL, 5)
     73          __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
     74          __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     75          __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
     76          __szr_bottom.Add(self._BTN_select, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
     77          __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     78          __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
     79          __szr_main.Add(__szr_bottom, 0, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 5)
     80          self.SetSizer(__szr_main)
     81          __szr_main.Fit(self)
     82          # end wxGlade
     83
     84 -    def _on_select_unsigned_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
     85          print "Event handler `_on_select_unsigned_button_pressed' not implemented!"
     86          event.Skip()
     87
     88 -    def _on_select_your_unsigned_results_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
     89          print "Event handler `_on_select_your_unsigned_results_button_pressed' not implemented!"
     90          event.Skip()
     91
     92 -    def _on_review_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
     93          print "Event handler `_on_review_button_pressed' not implemented!"
     94          event.Skip()
     95
     96 -    def _on_select_my_unsigned_results_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
     97          print "Event handler `_on_select_my_unsigned_results_button_pressed' not implemented"
     98          event.Skip()
     99
    100 -    def _on_select_all_unsigned_results_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
    101          print "Event handler `_on_select_all_unsigned_results_button_pressed' not implemented"
    102          event.Skip()
    103
    104 -    def _on_select_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
    105          print "Event handler `_on_select_button_pressed' not implemented"
    106          event.Skip()
    107
    108 -    def _on_add_button_pressed(self, event): # wxGlade: wxgMeasurementsPnl.<event_handler>
    109          print "Event handler `_on_add_button_pressed' not implemented"
    110          event.Skip()
    111
    112 -    def _on_manage_panels_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    113          print "Event handler `_on_manage_panels_button_pressed' not implemented"
    114          event.Skip()
    115
    116  # end of class wxgMeasurementsPnl
    117