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._PRW_zone = gmWaitingListWidgets.cWaitingZonePhraseWheel(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.NO_BORDER)
     21          self._LBL_no_of_patients = wx.StaticText(self, -1, "")
     22          self._LCTRL_patients = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.SIMPLE_BORDER)
     23          self._BTN_activate = wx.Button(self, -1, _("&Activate"), style=wx.BU_EXACTFIT)
     24          self._BTN_activateplus = wx.Button(self, -1, _(u"Activate²"), style=wx.BU_EXACTFIT)
     25          self._BTN_add_patient = wx.Button(self, wx.ID_ADD, "", style=wx.BU_EXACTFIT)
     26          self._BTN_remove = wx.Button(self, wx.ID_REMOVE, "", style=wx.BU_EXACTFIT)
     27          self._BTN_edit = wx.Button(self, -1, _("&Edit"), style=wx.BU_EXACTFIT)
     28          self._BTN_up = wx.Button(self, wx.ID_UP, "", style=wx.BU_EXACTFIT)
     29          self._BTN_down = wx.Button(self, wx.ID_DOWN, "", style=wx.BU_EXACTFIT)
     30
     31          self.__set_properties()
     32          self.__do_layout()
     33
     34          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_list_item_activated, self._LCTRL_patients)
     35          self.Bind(wx.EVT_BUTTON, self._on_activate_button_pressed, self._BTN_activate)
     36          self.Bind(wx.EVT_BUTTON, self._on_activateplus_button_pressed, self._BTN_activateplus)
     37          self.Bind(wx.EVT_BUTTON, self._on_add_patient_button_pressed, self._BTN_add_patient)
     38          self.Bind(wx.EVT_BUTTON, self._on_remove_button_pressed, self._BTN_remove)
     39          self.Bind(wx.EVT_BUTTON, self._on_edit_button_pressed, self._BTN_edit)
     40          self.Bind(wx.EVT_BUTTON, self._on_up_button_pressed, self._BTN_up)
     41          self.Bind(wx.EVT_BUTTON, self._on_down_button_pressed, self._BTN_down)
     42          # end wxGlade
     43
     44 -    def __set_properties(self):
     45          # begin wxGlade: wxgWaitingListPnl.__set_properties
     46          self.SetScrollRate(10, 10)
     47          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."))
     48          self._LCTRL_patients.SetToolTipString(_("These patients are waiting.\n\nDoubleclick to activate (entry will stay in list)."))
     49          self._BTN_activate.SetToolTipString(_("Activate patient but do not remove from waiting list."))
     50          self._BTN_activate.Enable(False)
     51          self._BTN_activate.SetDefault()
     52          self._BTN_activateplus.SetToolTipString(_("Activate patient and remove from waiting list."))
     53          self._BTN_activateplus.Enable(False)
     54          self._BTN_add_patient.SetToolTipString(_("Add the active patient to the waiting list."))
     55          self._BTN_remove.SetToolTipString(_("Remove selected patient from the waiting list."))
     56          self._BTN_remove.Enable(False)
     57          self._BTN_edit.SetToolTipString(_("Edit details of the waiting list entry."))
     58          self._BTN_edit.Enable(False)
     59          self._BTN_up.SetToolTipString(_("Move patient up."))
     60          self._BTN_up.Enable(False)
     61          self._BTN_down.SetToolTipString(_("Move patient down."))
     62          self._BTN_down.Enable(False)
     63          # end wxGlade
     64
     65 -    def __do_layout(self):
     66          # begin wxGlade: wxgWaitingListPnl.__do_layout
     67          __szr_main = wx.BoxSizer(wx.VERTICAL)
     68          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     69          __szr_top = wx.BoxSizer(wx.HORIZONTAL)
     70          __lbl_filter = wx.StaticText(self, -1, _("Filter by:"))
     71          __szr_top.Add(__lbl_filter, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 10)
     72          __lbl_zone = wx.StaticText(self, -1, _("Zone"))
     73          __szr_top.Add(__lbl_zone, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     74          __szr_top.Add(self._PRW_zone, 1, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     75          __szr_top.Add(self._LBL_no_of_patients, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     76          __szr_top.Add((20, 20), 3, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     77          __szr_main.Add(__szr_top, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 3)
     78          __szr_main.Add(self._LCTRL_patients, 1, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 3)
     79          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
     80          __szr_buttons.Add(self._BTN_activate, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     81          __szr_buttons.Add(self._BTN_activateplus, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     82          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     83          __szr_buttons.Add(self._BTN_add_patient, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     84          __szr_buttons.Add(self._BTN_remove, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     85          __szr_buttons.Add(self._BTN_edit, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     86          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     87          __szr_buttons.Add(self._BTN_up, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
     88          __szr_buttons.Add(self._BTN_down, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     89          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
     90          __szr_main.Add(__szr_buttons, 0, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
     91          self.SetSizer(__szr_main)
     92          __szr_main.Fit(self)
     93          # end wxGlade
     94
     95 -    def _on_add_patient_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
     96          print "Event handler `_on_add_patient_button_pressed' not implemented!"
     97          event.Skip()
     98
     99 -    def _on_activate_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    100          print "Event handler `_on_activate_button_pressed' not implemented!"
    101          event.Skip()
    102
    103 -    def _on_activateplus_button_called(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    104          print "Event handler `_on_activateplus_button_called' not implemented!"
    105          event.Skip()
    106
    107 -    def _on_remove_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    108          print "Event handler `_on_remove_button_pressed' not implemented!"
    109          event.Skip()
    110
    111 -    def _on_edit_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    112          print "Event handler `_on_edit_button_pressed' not implemented!"
    113          event.Skip()
    114
    115 -    def _on_up_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    116          print "Event handler `_on_up_button_pressed' not implemented!"
    117          event.Skip()
    118
    119 -    def _on_down_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    120          print "Event handler `_on_down_button_pressed' not implemented!"
    121          event.Skip()
    122
    123 -    def _on_list_item_activated(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    124          print "Event handler `_on_list_item_activated' not implemented"
    125          event.Skip()
    126
    127 -    def _on_activateplus_button_pressed(self, event): # wxGlade: wxgWaitingListPnl.<event_handler>
    128          print "Event handler `_on_activateplus_button_pressed' not implemented"
    129          event.Skip()
    130
    131  # end of class wxgWaitingListPnl
    132