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

# Source Code for Module Gnumed.wxGladeWidgets.wxgEMRListJournalPluginPnl

      1  # -*- coding: UTF-8 -*-
      2  #
      3  # generated by wxGlade
      4  #
      5
      6  import wx
      7
      8  # begin wxGlade: dependencies
      9  import gettext
     10  # end wxGlade
     11
     12  # begin wxGlade: extracode
     13  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     14  # end wxGlade
     15
     16
     17 -class wxgEMRListJournalPluginPnl(wx.ScrolledWindow):
     18 -        def __init__(self, *args, **kwds):
     19                  # begin wxGlade: wxgEMRListJournalPluginPnl.__init__
     20                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
     21                  wx.ScrolledWindow.__init__(self, *args, **kwds)
     22                  self._RBTN_by_encounter = wx.RadioButton(self, wx.ID_ANY, _("&Encounter"))
     23                  self._RBTN_by_last_modified = wx.RadioButton(self, wx.ID_ANY, _("&Modification"))
     24                  self._RBTN_by_item_time = wx.RadioButton(self, wx.ID_ANY, _("&Event"))
     25                  self._BTN_edit = wx.Button(self, wx.ID_ANY, _("&Edit"), style=wx.BU_EXACTFIT)
     26                  self._BTN_delete = wx.Button(self, wx.ID_ANY, _("&Delete"), style=wx.BU_EXACTFIT)
     27                  self._SLINE_top = wx.StaticLine(self, wx.ID_ANY)
     28                  self._LCTRL_journal = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
     29                  self._TCTRL_details = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY)
     30
     31                  self.__set_properties()
     32                  self.__do_layout()
     33
     34                  self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_encounter_selected, self._RBTN_by_encounter)
     35                  self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_last_mod_selected, self._RBTN_by_last_modified)
     36                  self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_item_time_selected, self._RBTN_by_item_time)
     37                  self.Bind(wx.EVT_BUTTON, self._on_edit_button_pressed, self._BTN_edit)
     38                  self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete)
     39                  # end wxGlade
     40
     41 -        def __set_properties(self):
     42                  # begin wxGlade: wxgEMRListJournalPluginPnl.__set_properties
     43                  self.SetScrollRate(10, 10)
     44                  self._RBTN_by_encounter.SetToolTip(_("Order by start of encounter a chart entry is linked to."))
     45                  self._RBTN_by_encounter.SetValue(1)
     46                  self._RBTN_by_last_modified.SetToolTip(_("Order by time of most recent edit of each chart entry."))
     47                  self._RBTN_by_item_time.SetToolTip(_("Order by time documented as actual occurrence of each chart entry."))
     48                  self._BTN_edit.SetToolTip(_("Edit the selected chart entry."))
     49                  self._BTN_edit.Enable(False)
     50                  self._BTN_delete.SetToolTip(_("Delete selected chart entry."))
     51                  self._BTN_delete.Enable(False)
     52                  self._LCTRL_journal.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
     53                  self._TCTRL_details.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
     54                  # end wxGlade
     55
     56 -        def __do_layout(self):
     57                  # begin wxGlade: wxgEMRListJournalPluginPnl.__do_layout
     58                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     59                  __szr_journal = wx.BoxSizer(wx.HORIZONTAL)
     60                  __szr_top = wx.BoxSizer(wx.HORIZONTAL)
     61                  __lbl_mode = wx.StaticText(self, wx.ID_ANY, _("Order by:"))
     62                  __szr_top.Add(__lbl_mode, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     63                  __szr_top.Add(self._RBTN_by_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     64                  __szr_top.Add(self._RBTN_by_last_modified, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     65                  __szr_top.Add(self._RBTN_by_item_time, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
     66                  __szr_top.Add(self._BTN_edit, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
     67                  __szr_top.Add(self._BTN_delete, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     68                  __szr_main.Add(__szr_top, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
     69                  __szr_main.Add(self._SLINE_top, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, 0)
     70                  __szr_journal.Add(self._LCTRL_journal, 3, wx.EXPAND, 0)
     71                  __szr_journal.Add(self._TCTRL_details, 2, wx.EXPAND | wx.LEFT, 3)
     72                  __szr_main.Add(__szr_journal, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
     73                  self.SetSizer(__szr_main)
     74                  __szr_main.Fit(self)
     75                  self.Layout()
     76                  # end wxGlade
     77
     78 -        def _on_order_by_encounter_selected(self, event):  # wxGlade: wxgEMRListJournalPluginPnl.<event_handler>
     79                  print("Event handler '_on_order_by_encounter_selected' not implemented!")
     80                  event.Skip()
     81
     82 -        def _on_order_by_last_mod_selected(self, event):  # wxGlade: wxgEMRListJournalPluginPnl.<event_handler>
     83                  print("Event handler '_on_order_by_last_mod_selected' not implemented!")
     84                  event.Skip()
     85
     86 -        def _on_order_by_item_time_selected(self, event):  # wxGlade: wxgEMRListJournalPluginPnl.<event_handler>
     87                  print("Event handler '_on_order_by_item_time_selected' not implemented!")
     88                  event.Skip()
     89
     90 -        def _on_edit_button_pressed(self, event):  # wxGlade: wxgEMRListJournalPluginPnl.<event_handler>
     91                  print("Event handler '_on_edit_button_pressed' not implemented!")
     92                  event.Skip()
     93
     94 -        def _on_delete_button_pressed(self, event):  # wxGlade: wxgEMRListJournalPluginPnl.<event_handler>
     95                  print("Event handler '_on_delete_button_pressed' not implemented!")
     96                  event.Skip()
     97
     98  # end of class wxgEMRListJournalPluginPnl
     99