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

Source Code for Module Gnumed.wxGladeWidgets.wxgWaitingListPnl

  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.gmWaitingListWidgets import cWaitingZonePhraseWheel 
 14  from Gnumed.wxpython.gmListWidgets import cReportListCtrl 
 15  # end wxGlade 
 16   
 17   
18 -class wxgWaitingListPnl(wx.ScrolledWindow):
19 - def __init__(self, *args, **kwds):
20 # begin wxGlade: wxgWaitingListPnl.__init__ 21 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 22 wx.ScrolledWindow.__init__(self, *args, **kwds) 23 self._CHBOX_active_patient_only = wx.CheckBox(self, wx.ID_ANY, _("Active &patient")) 24 self._PRW_zone = cWaitingZonePhraseWheel(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) 25 self._LBL_no_of_patients = wx.StaticText(self, wx.ID_ANY, "") 26 self._LCTRL_patients = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_SIMPLE | wx.LC_REPORT) 27 self._BTN_activate = wx.Button(self, wx.ID_ANY, _("&Activate"), style=wx.BU_EXACTFIT) 28 self._BTN_activateplus = wx.Button(self, wx.ID_ANY, _(u"Activate\u00b2"), style=wx.BU_EXACTFIT) 29 self._BTN_add_patient = wx.Button(self, wx.ID_ADD, "", style=wx.BU_EXACTFIT) 30 self._BTN_remove = wx.Button(self, wx.ID_REMOVE, "", style=wx.BU_EXACTFIT) 31 self._BTN_edit = wx.Button(self, wx.ID_ANY, _("&Edit"), style=wx.BU_EXACTFIT) 32 self._BTN_up = wx.Button(self, wx.ID_UP, "", style=wx.BU_EXACTFIT) 33 self._BTN_down = wx.Button(self, wx.ID_DOWN, "", style=wx.BU_EXACTFIT) 34 35 self.__set_properties() 36 self.__do_layout() 37 38 self.Bind(wx.EVT_CHECKBOX, self._on_active_patient_only_checked, self._CHBOX_active_patient_only) 39 self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_list_item_activated, self._LCTRL_patients) 40 self.Bind(wx.EVT_BUTTON, self._on_activate_button_pressed, self._BTN_activate) 41 self.Bind(wx.EVT_BUTTON, self._on_activateplus_button_pressed, self._BTN_activateplus) 42 self.Bind(wx.EVT_BUTTON, self._on_add_patient_button_pressed, self._BTN_add_patient) 43 self.Bind(wx.EVT_BUTTON, self._on_remove_button_pressed, self._BTN_remove) 44 self.Bind(wx.EVT_BUTTON, self._on_edit_button_pressed, self._BTN_edit) 45 self.Bind(wx.EVT_BUTTON, self._on_up_button_pressed, self._BTN_up) 46 self.Bind(wx.EVT_BUTTON, self._on_down_button_pressed, self._BTN_down)
47 # end wxGlade 48
49 - def __set_properties(self):
50 # begin wxGlade: wxgWaitingListPnl.__set_properties 51 self.SetScrollRate(10, 10) 52 self._CHBOX_active_patient_only.SetToolTip(_("Check this if you want to see entries for the active patient only.")) 53 self._CHBOX_active_patient_only.Enable(False) 54 self._PRW_zone.SetToolTip(_("Enter the waiting zone you want to filter by here.\nIf you leave this empty all waiting patients will be shown regardless of which zone they are waiting in.")) 55 self._LCTRL_patients.SetToolTip(_("These patients are waiting.\n\nDoubleclick to activate (entry will stay in list).")) 56 self._BTN_activate.SetToolTip(_("Activate patient but do not remove from waiting list.")) 57 self._BTN_activate.Enable(False) 58 self._BTN_activate.SetDefault() 59 self._BTN_activateplus.SetToolTip(_("Activate patient and remove from waiting list.")) 60 self._BTN_activateplus.Enable(False) 61 self._BTN_add_patient.SetToolTip(_("Add the active patient to the waiting list.")) 62 self._BTN_remove.SetToolTip(_("Remove selected patient from the waiting list.")) 63 self._BTN_remove.Enable(False) 64 self._BTN_edit.SetToolTip(_("Edit details of the waiting list entry.")) 65 self._BTN_edit.Enable(False) 66 self._BTN_up.SetToolTip(_("Move patient up.")) 67 self._BTN_up.Enable(False) 68 self._BTN_down.SetToolTip(_("Move patient down.")) 69 self._BTN_down.Enable(False)
70 # end wxGlade 71
72 - def __do_layout(self):
73 # begin wxGlade: wxgWaitingListPnl.__do_layout 74 __szr_main = wx.BoxSizer(wx.VERTICAL) 75 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 76 __szr_top = wx.BoxSizer(wx.HORIZONTAL) 77 __lbl_filter = wx.StaticText(self, wx.ID_ANY, _("Filters:")) 78 __szr_top.Add(__lbl_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10) 79 __szr_top.Add(self._CHBOX_active_patient_only, 0, wx.ALIGN_CENTER_VERTICAL, 10) 80 __VLINE_patient_zone = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL) 81 __szr_top.Add(__VLINE_patient_zone, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 3) 82 __lbl_zone = wx.StaticText(self, wx.ID_ANY, _("Zone")) 83 __szr_top.Add(__lbl_zone, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 84 __szr_top.Add(self._PRW_zone, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 85 __szr_top.Add(self._LBL_no_of_patients, 0, wx.ALIGN_CENTER_VERTICAL, 5) 86 __szr_top.Add((20, 20), 3, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 87 __szr_main.Add(__szr_top, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3) 88 __szr_main.Add(self._LCTRL_patients, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3) 89 __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0) 90 __szr_buttons.Add(self._BTN_activate, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 91 __szr_buttons.Add(self._BTN_activateplus, 0, wx.ALIGN_CENTER_VERTICAL, 0) 92 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0) 93 __szr_buttons.Add(self._BTN_add_patient, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 94 __szr_buttons.Add(self._BTN_remove, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 95 __szr_buttons.Add(self._BTN_edit, 0, wx.ALIGN_CENTER_VERTICAL, 0) 96 __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0) 97 __szr_buttons.Add(self._BTN_up, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 98 __szr_buttons.Add(self._BTN_down, 0, wx.ALIGN_CENTER_VERTICAL, 0) 99 __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0) 100 __szr_main.Add(__szr_buttons, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 5) 101 self.SetSizer(__szr_main) 102 __szr_main.Fit(self) 103 self.Layout()
104 # end wxGlade 105
106 - def _on_active_patient_only_checked(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
107 print("Event handler '_on_active_patient_only_checked' not implemented!") 108 event.Skip()
109
110 - def _on_list_item_activated(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
111 print("Event handler '_on_list_item_activated' not implemented!") 112 event.Skip() 113
114 - def _on_activate_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
115 print("Event handler '_on_activate_button_pressed' not implemented!") 116 event.Skip() 117
118 - def _on_activateplus_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
119 print("Event handler '_on_activateplus_button_pressed' not implemented!") 120 event.Skip() 121
122 - def _on_add_patient_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
123 print("Event handler '_on_add_patient_button_pressed' not implemented!") 124 event.Skip() 125
126 - def _on_remove_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
127 print("Event handler '_on_remove_button_pressed' not implemented!") 128 event.Skip() 129
130 - def _on_edit_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
131 print("Event handler '_on_edit_button_pressed' not implemented!") 132 event.Skip() 133
134 - def _on_up_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
135 print("Event handler '_on_up_button_pressed' not implemented!") 136 event.Skip() 137
138 - def _on_down_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
139 print("Event handler '_on_down_button_pressed' not implemented!") 140 event.Skip() 141 142 # end of class wxgWaitingListPnl 143