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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPersonSocialNetworkManagerPnl

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