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

# Source Code for Module Gnumed.wxGladeWidgets.wxgAllergyManagerDlg

      1  #!/usr/bin/env python
      2  # -*- coding: ISO-8859-15 -*-
      3  # generated by wxGlade 0.4.1 on Thu Mar 15 15:07:14 2007
      4
      5  import wx
      6
      7 -class wxgAllergyManagerDlg(wx.Dialog):
      8 -    def __init__(self, *args, **kwds):
      9
     10          from Gnumed.wxpython import gmListWidgets, gmAllergyWidgets
     11
     12          # begin wxGlade: wxgAllergyManagerDlg.__init__
     13          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
     14          wx.Dialog.__init__(self, *args, **kwds)
     15          self.__szr_details_staticbox = wx.StaticBox(self, -1, _("Allergy details"))
     16          self.__szr_state_staticbox = wx.StaticBox(self, -1, _("Allergy state"))
     17          self._TXT_current_state = wx.StaticText(self, -1, _("<current allergy state>"))
     18          self._TXT_last_confirmed = wx.StaticText(self, -1, _("<last confirmed>"))
     19          self._RBTN_unknown = wx.RadioButton(self, -1, _("Unknown"))
     20          self._RBTN_none = wx.RadioButton(self, -1, _("No known allergies"))
     21          self._RBTN_some = wx.RadioButton(self, -1, _("Has allergies"))
     22          self._TCTRL_state_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     23          self._BTN_confirm = wx.Button(self, -1, _("&Update / Con&firm"))
     24          self._BTN_dismiss_top = wx.Button(self, wx.ID_CLOSE, "", style=wx.BU_EXACTFIT)
     25          self._LCTRL_allergies = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.NO_BORDER)
     26          self._PNL_edit_area = gmAllergyWidgets.cAllergyEditAreaPnl(self, -1, style=wx.NO_BORDER|wx.TAB_TRAVERSAL)
     27          self._BTN_save_details = wx.Button(self, wx.ID_SAVE, "", style=wx.BU_EXACTFIT)
     28          self._BTN_clear = wx.Button(self, wx.ID_CLEAR, "", style=wx.BU_EXACTFIT)
     29          self._BTN_delete = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT)
     30          self._BTN_dismiss = wx.Button(self, wx.ID_CLOSE, "", style=wx.BU_EXACTFIT)
     31
     32          self.__set_properties()
     33          self.__do_layout()
     34
     35          self.Bind(wx.EVT_BUTTON, self._on_confirm_button_pressed, self._BTN_confirm)
     36          self.Bind(wx.EVT_BUTTON, self._on_dismiss_button_pressed, self._BTN_dismiss_top)
     37          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_allergies)
     38          self.Bind(wx.EVT_BUTTON, self._on_save_details_button_pressed, self._BTN_save_details)
     39          self.Bind(wx.EVT_BUTTON, self._on_clear_button_pressed, self._BTN_clear)
     40          self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete)
     41          self.Bind(wx.EVT_BUTTON, self._on_dismiss_button_pressed, self._BTN_dismiss)
     42          # end wxGlade
     43
     44 -    def __set_properties(self):
     45          # begin wxGlade: wxgAllergyManagerDlg.__set_properties
     46          self.SetTitle(_("Allergy Manager"))
     47          self.SetSize((650, 500))
     48          self._TXT_current_state.SetToolTipString(_("This displays the current allergy state as saved in the database."))
     49          self._TXT_last_confirmed.SetToolTipString(_("When was the allergy state last confirmed."))
     50          self._RBTN_unknown.SetToolTipString(_("Select this if there is no information available on whether the patient has any allergies or not."))
     51          self._RBTN_none.SetToolTipString(_("Select this if the patient has no known allergies."))
     52          self._RBTN_some.SetToolTipString(_("Select this if the patient has known allergies."))
     53          self._TCTRL_state_comment.SetToolTipString(_("A comment on the allergy state."))
     54          self._BTN_confirm.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
     55          self._BTN_confirm.SetToolTipString(_("Save and confirm the allergy state."))
     56          self._BTN_dismiss_top.SetToolTipString(_("Close the dialag. Will discard unsaved data."))
     57          self._BTN_dismiss_top.SetDefault()
     58          self._LCTRL_allergies.SetToolTipString(_("Lists the allergies known for this patient if any."))
     59          self._BTN_save_details.SetToolTipString(_("Save the allergy details in the edit area as either a new allergy or as an update to the existing allergy selected above."))
     60          self._BTN_clear.SetToolTipString(_("Clear the fields of the edit area. Will discard unsaved data."))
     61          self._BTN_delete.SetToolTipString(_("Delete the allergy selected in the list from the database."))
     62          self._BTN_delete.Enable(False)
     63          self._BTN_dismiss.SetToolTipString(_("Close the dialag. Will discard unsaved data."))
     64          self._BTN_dismiss.SetDefault()
     65          # end wxGlade
     66
     67 -    def __do_layout(self):
     68          # begin wxGlade: wxgAllergyManagerDlg.__do_layout
     69          __szr_main = wx.BoxSizer(wx.VERTICAL)
     70          __szr_details = wx.StaticBoxSizer(self.__szr_details_staticbox, wx.VERTICAL)
     71          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     72          __szr_state = wx.StaticBoxSizer(self.__szr_state_staticbox, wx.VERTICAL)
     73          __szr_state_button = wx.BoxSizer(wx.HORIZONTAL)
     74          __gszr_state = wx.FlexGridSizer(4, 2, 2, 10)
     75          __szr_new_state = wx.BoxSizer(wx.HORIZONTAL)
     76          __szr_current_state = wx.BoxSizer(wx.HORIZONTAL)
     77          __LBL_state = wx.StaticText(self, -1, _("Currently:"))
     78          __gszr_state.Add(__LBL_state, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     79          __szr_current_state.Add(self._TXT_current_state, 1, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 15)
     80          __LBL_confirmed = wx.StaticText(self, -1, _("Last confirmed:"))
     81          __szr_current_state.Add(__LBL_confirmed, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
     82          __szr_current_state.Add(self._TXT_last_confirmed, 1, wx.ALIGN_CENTER_VERTICAL, 0)
     83          __gszr_state.Add(__szr_current_state, 1, wx.EXPAND, 0)
     84          __LBL_set_state = wx.StaticText(self, -1, _("Set to:"))
     85          __gszr_state.Add(__LBL_set_state, 0, wx.ALIGN_CENTER_VERTICAL, 15)
     86          __szr_new_state.Add(self._RBTN_unknown, 0, wx.RIGHT|wx.EXPAND, 10)
     87          __szr_new_state.Add(self._RBTN_none, 0, wx.RIGHT|wx.EXPAND, 10)
     88          __szr_new_state.Add(self._RBTN_some, 0, wx.EXPAND, 10)
     89          __gszr_state.Add(__szr_new_state, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
     90          __LBL_comment = wx.StaticText(self, -1, _("Comment:"))
     91          __gszr_state.Add(__LBL_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     92          __gszr_state.Add(self._TCTRL_state_comment, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     93          __gszr_state.AddGrowableCol(1)
     94          __szr_state.Add(__gszr_state, 1, wx.BOTTOM|wx.EXPAND, 5)
     95          __szr_state_button.Add((20, 20), 1, wx.EXPAND, 0)
     96          __szr_state_button.Add(self._BTN_confirm, 0, wx.EXPAND, 0)
     97          __szr_state_button.Add((20, 20), 1, wx.EXPAND, 0)
     98          __szr_state_button.Add(self._BTN_dismiss_top, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     99          __szr_state.Add(__szr_state_button, 0, wx.EXPAND, 0)
    100          __szr_main.Add(__szr_state, 0, wx.ALL|wx.EXPAND, 5)
    101          __szr_details.Add(self._LCTRL_allergies, 2, wx.BOTTOM|wx.EXPAND, 5)
    102          __szr_details.Add(self._PNL_edit_area, 2, wx.BOTTOM|wx.EXPAND, 5)
    103          __szr_buttons.Add(self._BTN_save_details, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    104          __szr_buttons.Add(self._BTN_clear, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    105          __szr_buttons.Add(self._BTN_delete, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    106          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
    107          __szr_buttons.Add(self._BTN_dismiss, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    108          __szr_details.Add(__szr_buttons, 0, wx.EXPAND, 5)
    109          __szr_main.Add(__szr_details, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
    110          self.SetSizer(__szr_main)
    111          self.Layout()
    112          self.Centre()
    113          # end wxGlade
    114
    115 -    def _on_save_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    116          print "Event handler `_on_save_button_pressed' not implemented!"
    117          event.Skip()
    118
    119 -    def _on_clear_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    120          print "Event handler `_on_clear_button_pressed' not implemented!"
    121          event.Skip()
    122
    123 -    def _on_delete_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    124          print "Event handler `_on_delete_button_pressed' not implemented"
    125          event.Skip()
    126
    127 -    def _on_list_item_deselected(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    128          print "Event handler `_on_list_item_deselected' not implemented"
    129          event.Skip()
    130
    131 -    def _on_list_item_selected(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    132          print "Event handler `_on_list_item_selected' not implemented"
    133          event.Skip()
    134
    135 -    def _on_list_item_activated(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    136          print "Event handler `_on_list_item_activated' not implemented"
    137          event.Skip()
    138
    139 -    def _on_list_item_focused(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    140          print "Event handler `_on_list_item_focused' not implemented"
    141          event.Skip()
    142
    143 -    def _on_dismiss_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    144          print "Event handler `_on_dismiss_button_pressed' not implemented"
    145          event.Skip()
    146
    147 -    def _on_reconfirm_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    148          print "Event handler `_on_reconfirm_button_pressed' not implemented"
    149          event.Skip()
    150
    151 -    def _on_save_state_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    152          print "Event handler `_on_save_state_button_pressed' not implemented"
    153          event.Skip()
    154
    155 -    def _on_save_details_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    156          print "Event handler `_on_save_details_button_pressed' not implemented"
    157          event.Skip()
    158
    159 -    def _on_confirm_button_pressed(self, event): # wxGlade: wxgAllergyManagerDlg.<event_handler>
    160          print "Event handler `_on_confirm_button_pressed' not implemented"
    161          event.Skip()
    162
    163  # end of class wxgAllergyManagerDlg
    164