Gnumed.wxGladeWidgets.wxgStaffManagerPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgStaffManagerPnl

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