Gnumed.wxGladeWidgets.wxgIdentityEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgIdentityEAPnl

     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 wxgIdentityEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgIdentityEAPnl.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    21                  self._LBL_info = wx.StaticText(self, wx.ID_ANY, "")
    22                  from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
    23                  self._PRW_dob = cDateInputPhraseWheel(self, wx.ID_ANY, "")
    24                  self._CHBOX_estimated_dob = wx.CheckBox(self, wx.ID_ANY, _(u"\u2248"))
    25                  self._TCTRL_tob = wx.TextCtrl(self, wx.ID_ANY, "")
    26                  from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
    27                  self._PRW_dod = cDateInputPhraseWheel(self, wx.ID_ANY, "")
    28                  from Gnumed.wxpython.gmDemographicsWidgets import cGenderSelectionPhraseWheel
    29                  self._PRW_gender = cGenderSelectionPhraseWheel(self, wx.ID_ANY, "")
    30                  self._PRW_ethnicity = wx.TextCtrl(self, wx.ID_ANY, "")
    31                  from Gnumed.wxpython.gmDemographicsWidgets import cTitlePhraseWheel
    32                  self._PRW_title = cTitlePhraseWheel(self, wx.ID_ANY, "")
    33                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE)
    34
    35                  self.__set_properties()
    36                  self.__do_layout()
    37                  # end wxGlade
    38
    39 -        def __set_properties(self):
    40                  # begin wxGlade: wxgIdentityEAPnl.__set_properties
    41                  self.SetScrollRate(10, 10)
    42                  self._PRW_dob.SetToolTip(_("The date of birth for this person."))
    43                  self._CHBOX_estimated_dob.SetToolTip(_("Check this if the date of birth is estimated rather than known precisely."))
    44                  self._TCTRL_tob.SetToolTip(_("The time of birth if known."))
    45                  self._PRW_dod.SetToolTip(_("The date of death."))
    46                  self._PRW_ethnicity.Enable(False)
    47                  self._TCTRL_comment.SetToolTip(_("A free-text comment on this person."))
    48                  # end wxGlade
    49
    50 -        def __do_layout(self):
    51                  # begin wxGlade: wxgIdentityEAPnl.__do_layout
    52                  __gzszr_main = wx.FlexGridSizer(7, 2, 1, 3)
    53                  __szr_dob = wx.BoxSizer(wx.HORIZONTAL)
    54                  __lbl_name = wx.StaticText(self, wx.ID_ANY, _("Status"))
    55                  __gzszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    56                  __gzszr_main.Add(self._LBL_info, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    57                  __lbl_dob = wx.StaticText(self, wx.ID_ANY, _("Born"))
    58                  __gzszr_main.Add(__lbl_dob, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    59                  __szr_dob.Add(self._PRW_dob, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
    60                  __szr_dob.Add(self._CHBOX_estimated_dob, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    61                  __vline_dob = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
    62                  __szr_dob.Add(__vline_dob, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 2)
    63                  __lbl_tob = wx.StaticText(self, wx.ID_ANY, _("Time:"))
    64                  __szr_dob.Add(__lbl_tob, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    65                  __szr_dob.Add(self._TCTRL_tob, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    66                  __gzszr_main.Add(__szr_dob, 1, wx.EXPAND, 0)
    67                  __lbl_dod = wx.StaticText(self, wx.ID_ANY, _("Deceased"))
    68                  __gzszr_main.Add(__lbl_dod, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    69                  __gzszr_main.Add(self._PRW_dod, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    70                  __lbl_gender = wx.StaticText(self, wx.ID_ANY, _("Gender"))
    71                  __gzszr_main.Add(__lbl_gender, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    72                  __gzszr_main.Add(self._PRW_gender, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    73                  __lbl_ethnicity = wx.StaticText(self, wx.ID_ANY, _("Ethnicity"))
    74                  __gzszr_main.Add(__lbl_ethnicity, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    75                  __gzszr_main.Add(self._PRW_ethnicity, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    76                  __lbl_title = wx.StaticText(self, wx.ID_ANY, _("Title"))
    77                  __gzszr_main.Add(__lbl_title, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    78                  __gzszr_main.Add(self._PRW_title, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    79                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    80                  __gzszr_main.Add(__lbl_comment, 0, 0, 0)
    81                  __gzszr_main.Add(self._TCTRL_comment, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    82                  self.SetSizer(__gzszr_main)
    83                  __gzszr_main.Fit(self)
    84                  __gzszr_main.AddGrowableRow(6)
    85                  __gzszr_main.AddGrowableCol(1)
    86                  self.Layout()
    87                  # end wxGlade
    88
    89  # end of class wxgIdentityEAPnl
    90