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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPersonIdentityManagerPnl

     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 wxgPersonIdentityManagerPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgPersonIdentityManagerPnl.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    21                  from Gnumed.wxpython.gmDemographicsWidgets import cIdentityEAPnl
    22                  self._PNL_identity = cIdentityEAPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
    23                  self._BTN_save_identity = wx.Button(self, wx.ID_SAVE, "", style=wx.BU_EXACTFIT)
    24                  self._BTN_reload_identity = wx.Button(self, wx.ID_REVERT_TO_SAVED, "", style=wx.BU_EXACTFIT)
    25                  from Gnumed.wxpython.gmDemographicsWidgets import cPersonNamesManagerPnl
    26                  self._PNL_names = cPersonNamesManagerPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
    27                  from Gnumed.wxpython.gmDemographicsWidgets import cPersonIDsManagerPnl
    28                  self._PNL_ids = cPersonIDsManagerPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
    29
    30                  self.__set_properties()
    31                  self.__do_layout()
    32
    33                  self.Bind(wx.EVT_BUTTON, self._on_save_identity_details_button_pressed, self._BTN_save_identity)
    34                  self.Bind(wx.EVT_BUTTON, self._on_reload_identity_button_pressed, self._BTN_reload_identity)
    35                  # end wxGlade
    36
    37 -        def __set_properties(self):
    38                  # begin wxGlade: wxgPersonIdentityManagerPnl.__set_properties
    39                  self.SetFocus()
    40                  self.SetScrollRate(10, 10)
    41                  self._BTN_save_identity.SetToolTip(_("Save the identity details."))
    42                  self._BTN_reload_identity.SetToolTip(_("Reload identity from the database."))
    43                  # end wxGlade
    44
    45 -        def __do_layout(self):
    46                  # begin wxGlade: wxgPersonIdentityManagerPnl.__do_layout
    47                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    48                  __szr_top = wx.BoxSizer(wx.HORIZONTAL)
    49                  __szr_identity = wx.BoxSizer(wx.VERTICAL)
    50                  __szr_identity_buttons = wx.BoxSizer(wx.HORIZONTAL)
    51                  __szr_identity.Add(self._PNL_identity, 1, wx.BOTTOM | wx.EXPAND, 3)
    52                  __szr_identity_buttons.Add(self._BTN_save_identity, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
    53                  __szr_identity_buttons.Add(self._BTN_reload_identity, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    54                  __szr_identity_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    55                  __szr_identity.Add(__szr_identity_buttons, 0, wx.EXPAND, 0)
    56                  __szr_top.Add(__szr_identity, 2, wx.EXPAND | wx.RIGHT, 10)
    57                  __szr_top.Add(self._PNL_names, 4, wx.EXPAND, 5)
    58                  __szr_main.Add(__szr_top, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
    59                  __szr_main.Add(self._PNL_ids, 1, wx.ALL | wx.EXPAND, 5)
    60                  self.SetSizer(__szr_main)
    61                  __szr_main.Fit(self)
    62                  self.Layout()
    63                  # end wxGlade
    64
    65 -        def _on_save_identity_details_button_pressed(self, event):  # wxGlade: wxgPersonIdentityManagerPnl.<event_handler>
    66                  print("Event handler '_on_save_identity_details_button_pressed' not implemented!")
    67                  event.Skip()
    68
    69 -        def _on_reload_identity_button_pressed(self, event):  # wxGlade: wxgPersonIdentityManagerPnl.<event_handler>
    70                  print("Event handler '_on_reload_identity_button_pressed' not implemented!")
    71                  event.Skip()
    72
    73  # end of class wxgPersonIdentityManagerPnl
    74