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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPersonSocialNetworkManagerPnl

      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  # end wxGlade
     14
     15
     16 -class wxgPersonSocialNetworkManagerPnl(wx.Panel):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgPersonSocialNetworkManagerPnl.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
     20                  wx.Panel.__init__(self, *args, **kwds)
     21                  from Gnumed.wxpython.gmPatSearchWidgets import cPersonSearchCtrl
     22                  self._TCTRL_person = cPersonSearchCtrl(self, wx.ID_ANY, "")
     23                  self._BTN_activate_contact = wx.Button(self, wx.ID_ANY, _("Activate"), style=wx.BU_EXACTFIT)
     24                  self._BTN_remove_contact = wx.Button(self, wx.ID_REMOVE, "", style=wx.BU_EXACTFIT)
     25                  self._TCTRL_er_contact = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_WORDWRAP)
     26                  from Gnumed.wxpython.gmStaffWidgets import cProviderPhraseWheel
     27                  self._PRW_provider = cProviderPhraseWheel(self, wx.ID_ANY, "")
     28                  self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
     29                  self._BTN_reload = wx.Button(self, wx.ID_REVERT_TO_SAVED, "")
     30                  from Gnumed.wxpython.gmExternalCareWidgets import cExternalCareMgrPnl
     31                  self._PNL_external_care = cExternalCareMgrPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
     32
     33                  self.__set_properties()
     34                  self.__do_layout()
     35
     36                  self.Bind(wx.EVT_BUTTON, self._on_button_activate_contact_pressed, self._BTN_activate_contact)
     37                  self.Bind(wx.EVT_BUTTON, self._on_remove_contact_button_pressed, self._BTN_remove_contact)
     38                  self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
     39                  self.Bind(wx.EVT_BUTTON, self._on_reload_button_pressed, self._BTN_reload)
     40                  # end wxGlade
     41
     42 -        def __set_properties(self):
     43                  # begin wxGlade: wxgPersonSocialNetworkManagerPnl.__set_properties
     44                  self._TCTRL_person.SetToolTip(_("Link another person in this database as the emergency contact:\n\nEnter person name part or identifier and hit <enter>."))
     45                  self._BTN_activate_contact.SetToolTip(_("Make the emergency contact the active patient."))
     46                  self._TCTRL_er_contact.SetToolTip(_("Notes relevant to emergency situations regarding this patient.\n\nExamples:\n - contact details of significant others\n - where to find documents on DNR decisions"))
     47                  self._PRW_provider.SetToolTip(_("Choose the provider the patient considers his or her primary provider in this praxis."))
     48                  self._BTN_save.SetDefault()
     49                  self._BTN_reload.SetToolTip(_("Reload details from the database."))
     50                  # end wxGlade
     51
     52 -        def __do_layout(self):
     53                  # begin wxGlade: wxgPersonSocialNetworkManagerPnl.__do_layout
     54                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     55                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     56                  __gzsr_details = wx.FlexGridSizer(3, 2, 1, 3)
     57                  __szr_db_link = wx.BoxSizer(wx.HORIZONTAL)
     58                  __lbl_er_contact = wx.StaticText(self, wx.ID_ANY, _("Emergency contact (in DB)"))
     59                  __gzsr_details.Add(__lbl_er_contact, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     60                  __szr_db_link.Add(self._TCTRL_person, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
     61                  __szr_db_link.Add(self._BTN_activate_contact, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
     62                  __szr_db_link.Add(self._BTN_remove_contact, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
     63                  __gzsr_details.Add(__szr_db_link, 1, wx.EXPAND, 0)
     64                  __lbl_er_notes = wx.StaticText(self, wx.ID_ANY, _("Emergency notes"))
     65                  __gzsr_details.Add(__lbl_er_notes, 0, 0, 0)
     66                  __gzsr_details.Add(self._TCTRL_er_contact, 1, wx.EXPAND, 0)
     67                  _lbl_primary_doc = wx.StaticText(self, wx.ID_ANY, _("In-praxis primary doc"))
     68                  __gzsr_details.Add(_lbl_primary_doc, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     69                  __gzsr_details.Add(self._PRW_provider, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     70                  __gzsr_details.AddGrowableCol(1)
     71                  __szr_main.Add(__gzsr_details, 0, wx.BOTTOM | wx.EXPAND, 5)
     72                  __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     73                  __szr_buttons.Add(self._BTN_save, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     74                  __szr_buttons.Add(self._BTN_reload, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     75                  __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     76                  __szr_main.Add(__szr_buttons, 0, wx.EXPAND, 0)
     77                  __szr_main.Add(self._PNL_external_care, 1, wx.EXPAND | wx.TOP, 5)
     78                  self.SetSizer(__szr_main)
     79                  __szr_main.Fit(self)
     80                  self.Layout()
     81                  # end wxGlade
     82
     83 -        def _on_button_activate_contact_pressed(self, event):  # wxGlade: wxgPersonSocialNetworkManagerPnl.<event_handler>
     84                  print("Event handler '_on_button_activate_contact_pressed' not implemented!")
     85                  event.Skip()
     86
     87 -        def _on_remove_contact_button_pressed(self, event):  # wxGlade: wxgPersonSocialNetworkManagerPnl.<event_handler>
     88                  print("Event handler '_on_remove_contact_button_pressed' not implemented!")
     89                  event.Skip()
     90
     91 -        def _on_save_button_pressed(self, event):  # wxGlade: wxgPersonSocialNetworkManagerPnl.<event_handler>
     92                  print("Event handler '_on_save_button_pressed' not implemented!")
     93                  event.Skip()
     94
     95 -        def _on_reload_button_pressed(self, event):  # wxGlade: wxgPersonSocialNetworkManagerPnl.<event_handler>
     96                  print("Event handler '_on_reload_button_pressed' not implemented!")
     97                  event.Skip()
     98
     99  # end of class wxgPersonSocialNetworkManagerPnl
    100