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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementsPnl

      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 wxgMeasurementsPnl(wx.Panel):
     18 -        def __init__(self, *args, **kwds):
     19                  # begin wxGlade: wxgMeasurementsPnl.__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 cTestPanelPRW
     23                  self._PRW_panel = cTestPanelPRW(self, wx.ID_ANY, "")
     24                  self._TCTRL_panel_comment = wx.TextCtrl(self, wx.ID_ANY, "")
     25                  self._BTN_manage_panels = wx.Button(self, wx.ID_ANY, _("Manage panels"), style=wx.BU_EXACTFIT)
     26                  self._BTN_display_mode = wx.Button(self, wx.ID_ANY, _("All: by day"), style=wx.BU_EXACTFIT)
     27                  self._PNL_results_battery_grid = wx.Panel(self, wx.ID_ANY, style=wx.BORDER_NONE)
     28                  from Gnumed.wxpython.gmMeasurementWidgets import cMeasurementsGrid
     29                  self._GRID_results_battery = cMeasurementsGrid(self._PNL_results_battery_grid, wx.ID_ANY, size=(1, 1))
     30                  self._PNL_results_all_grid = wx.Panel(self, wx.ID_ANY, style=wx.BORDER_NONE)
     31                  self._GRID_results_all = cMeasurementsGrid(self._PNL_results_all_grid, wx.ID_ANY, size=(1, 1))
     32                  from Gnumed.wxpython.gmMeasurementWidgets import cMeasurementsByDayPnl
     33                  self._PNL_results_all_listed = cMeasurementsByDayPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     34                  self._BTN_manage_types = wx.Button(self, wx.ID_ANY, _("Manage types"), style=wx.BU_EXACTFIT)
     35                  self._BTN_add = wx.Button(self, wx.ID_ADD, "")
     36                  self._BTN_list = wx.Button(self, wx.ID_ANY, _("&List"))
     37                  self._BTN_select = wx.Button(self, wx.ID_ANY, _("&Select:"), style=wx.BU_EXACTFIT)
     38                  self._RBTN_my_unsigned = wx.RadioButton(self, wx.ID_ANY, _("your unsigned (&Y)"))
     39                  self._RBTN_all_unsigned = wx.RadioButton(self, wx.ID_ANY, _("all unsigned (&A)"))
     40                  self._BTN_review = wx.Button(self, wx.ID_ANY, _("&Actions ... "), style=wx.BU_EXACTFIT)
     41
     42                  self.__set_properties()
     43                  self.__do_layout()
     44
     45                  self.Bind(wx.EVT_BUTTON, self._on_manage_panels_button_pressed, self._BTN_manage_panels)
     46                  self.Bind(wx.EVT_BUTTON, self._on_display_mode_button_pressed, self._BTN_display_mode)
     47                  self.Bind(wx.EVT_BUTTON, self._on_manage_types_button_pressed, self._BTN_manage_types)
     48                  self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
     49                  self.Bind(wx.EVT_BUTTON, self._on_list_button_pressed, self._BTN_list)
     50                  self.Bind(wx.EVT_BUTTON, self._on_select_button_pressed, self._BTN_select)
     51                  self.Bind(wx.EVT_BUTTON, self._on_review_button_pressed, self._BTN_review)
     52                  # end wxGlade
     53
     54 -        def __set_properties(self):
     55                  # begin wxGlade: wxgMeasurementsPnl.__set_properties
     56                  self._TCTRL_panel_comment.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
     57                  self._TCTRL_panel_comment.Enable(False)
     58                  self._BTN_manage_panels.SetToolTip(_("Manage test panels."))
     59                  self._BTN_display_mode.SetToolTip(_("Switch between modes of the full results display."))
     60                  self._PNL_results_all_listed.Hide()
     61                  self._BTN_manage_types.SetToolTip(_("Manage test types."))
     62                  self._BTN_add.SetToolTip(_("Add measurments."))
     63                  self._BTN_list.SetToolTip(_("Show all measurements in a chronological list."))
     64                  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."))
     65                  self._RBTN_my_unsigned.SetToolTip(_("Apply selection to those unsigned results for which you are to take responsibility."))
     66                  self._RBTN_all_unsigned.SetToolTip(_("Apply selection to all unsigned results."))
     67                  self._BTN_review.SetToolTip(_("Invoke actions on the selected measurements."))
     68                  # end wxGlade
     69
     70 -        def __do_layout(self):
     71                  # begin wxGlade: wxgMeasurementsPnl.__do_layout
     72                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     73                  __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
     74                  __szr_result_displays = wx.BoxSizer(wx.VERTICAL)
     75                  __szr_results_all_grid = wx.BoxSizer(wx.HORIZONTAL)
     76                  __szr_results_battery_grid = wx.BoxSizer(wx.HORIZONTAL)
     77                  __szr_panel_options = wx.BoxSizer(wx.HORIZONTAL)
     78                  __lbl_display = wx.StaticText(self, wx.ID_ANY, _("Spotlight &Panel:"))
     79                  __szr_panel_options.Add(__lbl_display, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     80                  __szr_panel_options.Add(self._PRW_panel, 2, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
     81                  __szr_panel_options.Add(self._TCTRL_panel_comment, 3, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     82                  __szr_panel_options.Add(self._BTN_manage_panels, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     83                  __szr_panel_options.Add(self._BTN_display_mode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     84                  __szr_main.Add(__szr_panel_options, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
     85                  __szr_results_battery_grid.Add(self._GRID_results_battery, 1, wx.EXPAND, 5)
     86                  self._PNL_results_battery_grid.SetSizer(__szr_results_battery_grid)
     87                  __szr_result_displays.Add(self._PNL_results_battery_grid, 1, wx.EXPAND, 0)
     88                  __szr_results_all_grid.Add(self._GRID_results_all, 1, wx.EXPAND, 5)
     89                  self._PNL_results_all_grid.SetSizer(__szr_results_all_grid)
     90                  __szr_result_displays.Add(self._PNL_results_all_grid, 3, wx.EXPAND, 0)
     91                  __szr_result_displays.Add(self._PNL_results_all_listed, 3, wx.EXPAND, 0)
     92                  __szr_main.Add(__szr_result_displays, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
     93                  __hline_buttons = wx.StaticLine(self, wx.ID_ANY)
     94                  __szr_main.Add(__hline_buttons, 0, wx.ALL | wx.EXPAND, 5)
     95                  __szr_bottom.Add(self._BTN_manage_types, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     96                  __szr_bottom.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
     97                  __vline_buttons = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
     98                  __szr_bottom.Add(__vline_buttons, 0, wx.EXPAND | wx.RIGHT, 3)
     99                  __lbl_results = wx.StaticText(self, wx.ID_ANY, _("Results:"))
    100                  __szr_bottom.Add(__lbl_results, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    101                  __szr_bottom.Add(self._BTN_add, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    102                  __szr_bottom.Add(self._BTN_list, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    103                  __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    104                  __szr_bottom.Add(self._BTN_select, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    105                  __szr_bottom.Add(self._RBTN_my_unsigned, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    106                  __szr_bottom.Add(self._RBTN_all_unsigned, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    107                  __szr_bottom.Add(self._BTN_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    108                  __szr_bottom.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    109                  __szr_main.Add(__szr_bottom, 0, wx.BOTTOM | wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
    110                  self.SetSizer(__szr_main)
    111                  __szr_main.Fit(self)
    112                  self.Layout()
    113                  # end wxGlade
    114
    115 -        def _on_manage_panels_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    116                  print("Event handler '_on_manage_panels_button_pressed' not implemented!")
    117                  event.Skip()
    118
    119 -        def _on_display_mode_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    120                  print("Event handler '_on_display_mode_button_pressed' not implemented!")
    121                  event.Skip()
    122
    123 -        def _on_manage_types_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    124                  print("Event handler '_on_manage_types_button_pressed' not implemented!")
    125                  event.Skip()
    126
    127 -        def _on_add_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    128                  print("Event handler '_on_add_button_pressed' not implemented!")
    129                  event.Skip()
    130
    131 -        def _on_list_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    132                  print("Event handler '_on_list_button_pressed' not implemented!")
    133                  event.Skip()
    134
    135 -        def _on_select_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    136                  print("Event handler '_on_select_button_pressed' not implemented!")
    137                  event.Skip()
    138
    139 -        def _on_review_button_pressed(self, event):  # wxGlade: wxgMeasurementsPnl.<event_handler>
    140                  print("Event handler '_on_review_button_pressed' not implemented!")
    141                  event.Skip()
    142
    143  # end of class wxgMeasurementsPnl
    144