Gnumed.wxGladeWidgets.wxgWaitingListPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgWaitingListPnl

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