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

# Source Code for Module Gnumed.wxGladeWidgets.wxgStaffManagerPnl

      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  # end wxGlade
     14
     15
     16 -class wxgStaffManagerPnl(wx.ScrolledWindow):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgStaffManagerPnl.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_SIMPLE | wx.TAB_TRAVERSAL
     20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
     21                  self._LCTRL_users = wx.ListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_ALIGN_LEFT | wx.LC_HRULES | wx.LC_REPORT | wx.LC_SINGLE_SEL | wx.LC_SORT_ASCENDING | wx.LC_VRULES)
     22                  self._btn_edit_staff_details = wx.Button(self, wx.ID_ANY, _("Edit staff details"))
     23                  self._btn_discharge_staff = wx.Button(self, wx.ID_ANY, _("Discharge staff"))
     24                  self._btn_enlist_current_patient = wx.Button(self, wx.ID_ANY, _("Enlist current patient"))
     25                  from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
     26                  self._pwheel_db_account = cPhraseWheel(self, wx.ID_ANY, "")
     27                  self._pwheel_role = cPhraseWheel(self, wx.ID_ANY, "")
     28                  self._txt_sign = wx.TextCtrl(self, wx.ID_ANY, "")
     29                  self._txt_comment = wx.TextCtrl(self, wx.ID_ANY, "")
     30                  self.button_1 = wx.Button(self, wx.ID_ANY, _("button_1"))
     31
     32                  self.__set_properties()
     33                  self.__do_layout()
     34
     35                  self.Bind(wx.EVT_BUTTON, self._btn_edit_staff_details_pressed, self._btn_edit_staff_details)
     36                  self.Bind(wx.EVT_BUTTON, self._btn_discharge_staff_pressed, self._btn_discharge_staff)
     37                  self.Bind(wx.EVT_BUTTON, self._btn_enlist_current_patient_pressed, self._btn_enlist_current_patient)
     38                  # end wxGlade
     39
     40 -        def __set_properties(self):
     41                  # begin wxGlade: wxgStaffManagerPnl.__set_properties
     42                  self.SetScrollRate(10, 10)
     43                  self._LCTRL_users.SetToolTip(_("Lists the existing users in the GNUmed system."))
     44                  self._btn_edit_staff_details.SetToolTip(_("Edit details of selected staff member."))
     45                  self._btn_edit_staff_details.Enable(False)
     46                  self._btn_discharge_staff.SetToolTip(_("Discharge the selected person from the staff list."))
     47                  self._btn_discharge_staff.Enable(False)
     48                  self._btn_enlist_current_patient.SetToolTip(_("Add a new user to the GNUmed system."))
     49                  self._pwheel_db_account.SetFocus()
     50                  # end wxGlade
     51
     52 -        def __do_layout(self):
     53                  # begin wxGlade: wxgStaffManagerPnl.__do_layout
     54                  __szr_main = wx.BoxSizer(wx.HORIZONTAL)
     55                  __szr_right_pane = wx.BoxSizer(wx.VERTICAL)
     56                  __szr_btns_right = wx.BoxSizer(wx.HORIZONTAL)
     57                  __szr_staff_details = wx.FlexGridSizer(4, 2, 3, 2)
     58                  __szr_left_pane = wx.BoxSizer(wx.VERTICAL)
     59                  __szr_btns_left = wx.BoxSizer(wx.HORIZONTAL)
     60                  __szr_left_pane.Add(self._LCTRL_users, 1, wx.BOTTOM | wx.EXPAND, 2)
     61                  __szr_btns_left.Add(self._btn_edit_staff_details, 0, 0, 0)
     62                  __szr_btns_left.Add(self._btn_discharge_staff, 0, 0, 0)
     63                  __szr_btns_left.Add(self._btn_enlist_current_patient, 0, 0, 0)
     64                  __szr_left_pane.Add(__szr_btns_left, 0, 0, 0)
     65                  __szr_main.Add(__szr_left_pane, 1, wx.EXPAND, 0)
     66                  __line_vert_sep = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
     67                  __szr_main.Add(__line_vert_sep, 0, wx.EXPAND, 0)
     68                  __lbl_db_account = wx.StaticText(self, wx.ID_ANY, _("Account"), style=wx.ALIGN_RIGHT)
     69                  __lbl_db_account.SetToolTip(_("Required: The database account assigned to this staff member. Must exist in the database."))
     70                  __szr_staff_details.Add(__lbl_db_account, 0, 0, 0)
     71                  __szr_staff_details.Add(self._pwheel_db_account, 0, wx.EXPAND, 2)
     72                  __lbl_role = wx.StaticText(self, wx.ID_ANY, _("Role"), style=wx.ALIGN_RIGHT)
     73                  __lbl_role.SetToolTip(_("Required: The organisation role for this staff member. Currently the only supported role is \"doctor\"."))
     74                  __szr_staff_details.Add(__lbl_role, 0, 0, 0)
     75                  __szr_staff_details.Add(self._pwheel_role, 0, wx.EXPAND, 2)
     76                  __lbl_sign = wx.StaticText(self, wx.ID_ANY, _("Sign"), style=wx.ALIGN_RIGHT)
     77                  __lbl_sign.SetToolTip(_("Required: A short signature for this staff member such as the concatenated initials. Preferably not more than 5 characters."))
     78                  __szr_staff_details.Add(__lbl_sign, 0, 0, 0)
     79                  __szr_staff_details.Add(self._txt_sign, 0, wx.EXPAND, 2)
     80                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
     81                  __lbl_comment.SetToolTip(_("Optional: A free-text comment on this staff member."))
     82                  __szr_staff_details.Add(__lbl_comment, 0, 0, 0)
     83                  __szr_staff_details.Add(self._txt_comment, 0, wx.EXPAND, 0)
     84                  __szr_staff_details.AddGrowableCol(1)
     85                  __szr_right_pane.Add(__szr_staff_details, 1, wx.EXPAND, 0)
     86                  __szr_btns_right.Add(self.button_1, 0, 0, 0)
     87                  __szr_right_pane.Add(__szr_btns_right, 0, wx.EXPAND, 0)
     88                  __szr_main.Add(__szr_right_pane, 1, wx.EXPAND, 0)
     89                  self.SetSizer(__szr_main)
     90                  __szr_main.Fit(self)
     91                  self.Layout()
     92                  # end wxGlade
     93
     94 -        def _btn_edit_staff_details_pressed(self, event):  # wxGlade: wxgStaffManagerPnl.<event_handler>
     95                  print("Event handler '_btn_edit_staff_details_pressed' not implemented!")
     96                  event.Skip()
     97
     98 -        def _btn_discharge_staff_pressed(self, event):  # wxGlade: wxgStaffManagerPnl.<event_handler>
     99                  print("Event handler '_btn_discharge_staff_pressed' not implemented!")
    100                  event.Skip()
    101
    102 -        def _btn_enlist_current_patient_pressed(self, event):  # wxGlade: wxgStaffManagerPnl.<event_handler>
    103                  print("Event handler '_btn_enlist_current_patient_pressed' not implemented!")
    104                  event.Skip()
    105
    106  # end of class wxgStaffManagerPnl
    107