Gnumed.wxGladeWidgets.wxgExternalCareEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgExternalCareEAPnl

     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 wxgExternalCareEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgExternalCareEAPnl.__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.gmEMRStructWidgets import cIssueSelectionPhraseWheel
    22                  self._PRW_issue = cIssueSelectionPhraseWheel(self, wx.ID_ANY, "")
    23                  from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
    24                  self._PRW_care_location = cOrgUnitPhraseWheel(self, wx.ID_ANY, "")
    25                  self._BTN_manage_orgs = wx.Button(self, wx.ID_ANY, _("&Manage"), style=wx.BU_EXACTFIT)
    26                  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
    27                  self._TCTRL_provider = cTextCtrl(self, wx.ID_ANY, "")
    28                  self._TCTRL_comment = cTextCtrl(self, wx.ID_ANY, "")
    29                  self._CHBOX_inactive = wx.CheckBox(self, wx.ID_ANY, _("&Inactive"), style=wx.CHK_2STATE)
    30
    31                  self.__set_properties()
    32                  self.__do_layout()
    33
    34                  self.Bind(wx.EVT_BUTTON, self._on_manage_orgs_button_pressed, self._BTN_manage_orgs)
    35                  # end wxGlade
    36
    37 -        def __set_properties(self):
    38                  # begin wxGlade: wxgExternalCareEAPnl.__set_properties
    39                  self.SetScrollRate(10, 10)
    40                  self._PRW_issue.SetToolTip(_("Mandatory: Select a health issue or enter a new reason for which care is rendered."))
    41                  self._PRW_care_location.SetToolTip(_("Mandatory: The location care is rendered at."))
    42                  self._BTN_manage_orgs.SetToolTip(_("Manage organizations and units thereof."))
    43                  self._TCTRL_provider.SetToolTip(_("Optional: A specific, named provider rendering care at the care location."))
    44                  self._TCTRL_comment.SetToolTip(_("Optional: A comment on this external care relationship."))
    45                  self._CHBOX_inactive.SetToolTip(_("Check this if the external care entry is inactive (IOW, historic)."))
    46                  # end wxGlade
    47
    48 -        def __do_layout(self):
    49                  # begin wxGlade: wxgExternalCareEAPnl.__do_layout
    50                  _gszr_main = wx.FlexGridSizer(5, 2, 1, 3)
    51                  __szr_location_details = wx.BoxSizer(wx.HORIZONTAL)
    52                  __lbl_issue = wx.StaticText(self, wx.ID_ANY, _("Reason"))
    53                  __lbl_issue.SetForegroundColour(wx.Colour(255, 0, 0))
    54                  _gszr_main.Add(__lbl_issue, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    55                  _gszr_main.Add(self._PRW_issue, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    56                  __lbl_org_unit = wx.StaticText(self, wx.ID_ANY, _("Location"))
    57                  __lbl_org_unit.SetForegroundColour(wx.Colour(255, 0, 0))
    58                  _gszr_main.Add(__lbl_org_unit, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    59                  __szr_location_details.Add(self._PRW_care_location, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
    60                  __szr_location_details.Add(self._BTN_manage_orgs, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    61                  _gszr_main.Add(__szr_location_details, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    62                  __lbl_provider = wx.StaticText(self, wx.ID_ANY, _("Provider"))
    63                  _gszr_main.Add(__lbl_provider, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    64                  _gszr_main.Add(self._TCTRL_provider, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    65                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    66                  _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    67                  _gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    68                  _gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    69                  _gszr_main.Add(self._CHBOX_inactive, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    70                  self.SetSizer(_gszr_main)
    71                  _gszr_main.Fit(self)
    72                  _gszr_main.AddGrowableCol(1)
    73                  self.Layout()
    74                  # end wxGlade
    75
    76 -        def _on_manage_orgs_button_pressed(self, event):  # wxGlade: wxgExternalCareEAPnl.<event_handler>
    77                  print("Event handler '_on_manage_orgs_button_pressed' not implemented!")
    78                  event.Skip()
    79
    80  # end of class wxgExternalCareEAPnl
    81