Gnumed.wxGladeWidgets.wxgMeasurementTypeEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementTypeEAPnl

     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 wxgMeasurementTypeEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgMeasurementTypeEAPnl.__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.gmPhraseWheel import cPhraseWheel
    22                  self._PRW_name = cPhraseWheel(self, wx.ID_ANY, "")
    23                  self._PRW_abbrev = cPhraseWheel(self, wx.ID_ANY, "")
    24                  from Gnumed.wxpython.gmMeasurementWidgets import cUnitPhraseWheel
    25                  self._PRW_reference_unit = cUnitPhraseWheel(self, wx.ID_ANY, "")
    26                  self._PRW_loinc = cPhraseWheel(self, wx.ID_ANY, "")
    27                  self._TCTRL_loinc_info = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
    28                  self._TCTRL_comment_type = wx.TextCtrl(self, wx.ID_ANY, "")
    29                  from Gnumed.wxpython.gmMeasurementWidgets import cMeasurementOrgPhraseWheel
    30                  self._PRW_test_org = cMeasurementOrgPhraseWheel(self, wx.ID_ANY, "")
    31                  from Gnumed.wxpython.gmMeasurementWidgets import cMetaTestTypePRW
    32                  self._PRW_meta_type = cMetaTestTypePRW(self, wx.ID_ANY, "")
    33
    34                  self.__set_properties()
    35                  self.__do_layout()
    36                  # end wxGlade
    37
    38 -        def __set_properties(self):
    39                  # begin wxGlade: wxgMeasurementTypeEAPnl.__set_properties
    40                  self.SetScrollRate(10, 10)
    41                  self._PRW_name.SetToolTip(_("A descriptive name for this test type."))
    42                  self._PRW_name.SetFocus()
    43                  self._PRW_abbrev.SetToolTip(_("An abbreviation for the name of this test type."))
    44                  self._PRW_reference_unit.SetToolTip(_("The base unit to convert results from different labs into when comparing time series."))
    45                  self._PRW_loinc.SetToolTip(_("The LOINC code corresponding to this test type."))
    46                  self._TCTRL_loinc_info.Enable(False)
    47                  self._TCTRL_comment_type.SetToolTip(_("A comment on this test type, e.g. pertaining to typical context information."))
    48                  self._PRW_test_org.SetToolTip(_("The path lab/diagnostic organisation reporting on this test."))
    49                  self._PRW_meta_type.SetToolTip(_("Select the meta type as which to aggregate for display results with this test type."))
    50                  # end wxGlade
    51
    52 -        def __do_layout(self):
    53                  # begin wxGlade: wxgMeasurementTypeEAPnl.__do_layout
    54                  _gszr_main = wx.FlexGridSizer(7, 2, 1, 3)
    55                  __szr_loinc = wx.BoxSizer(wx.HORIZONTAL)
    56                  __szr_abbrev_unit = wx.BoxSizer(wx.HORIZONTAL)
    57                  __lbl_name = wx.StaticText(self, wx.ID_ANY, _("Name"))
    58                  __lbl_name.SetForegroundColour(wx.Colour(255, 0, 0))
    59                  _gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    60                  _gszr_main.Add(self._PRW_name, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    61                  __lbl_abbrev = wx.StaticText(self, wx.ID_ANY, _("Abbreviation"))
    62                  __lbl_abbrev.SetForegroundColour(wx.Colour(255, 0, 0))
    63                  _gszr_main.Add(__lbl_abbrev, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    64                  __szr_abbrev_unit.Add(self._PRW_abbrev, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10)
    65                  __lbl_unit = wx.StaticText(self, wx.ID_ANY, _("Base unit"))
    66                  __lbl_unit.SetForegroundColour(wx.Colour(255, 0, 0))
    67                  __szr_abbrev_unit.Add(__lbl_unit, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    68                  __szr_abbrev_unit.Add(self._PRW_reference_unit, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    69                  _gszr_main.Add(__szr_abbrev_unit, 1, wx.EXPAND, 0)
    70                  __lbl_loinc = wx.StaticText(self, wx.ID_ANY, _("LOINC"))
    71                  _gszr_main.Add(__lbl_loinc, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    72                  __szr_loinc.Add(self._PRW_loinc, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 10)
    73                  _gszr_main.Add(__szr_loinc, 1, wx.EXPAND, 0)
    74                  _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
    75                  _gszr_main.Add(self._TCTRL_loinc_info, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    76                  __lbl_comment_type = wx.StaticText(self, wx.ID_ANY, _("Test comment"))
    77                  _gszr_main.Add(__lbl_comment_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    78                  _gszr_main.Add(self._TCTRL_comment_type, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    79                  __lbl_test_org = wx.StaticText(self, wx.ID_ANY, _("Lab"))
    80                  _gszr_main.Add(__lbl_test_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    81                  _gszr_main.Add(self._PRW_test_org, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 10)
    82                  __lbl_meta_type = wx.StaticText(self, wx.ID_ANY, _("Meta type"))
    83                  _gszr_main.Add(__lbl_meta_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    84                  _gszr_main.Add(self._PRW_meta_type, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    85                  self.SetSizer(_gszr_main)
    86                  _gszr_main.Fit(self)
    87                  _gszr_main.AddGrowableCol(1)
    88                  self.Layout()
    89                  # end wxGlade
    90
    91  # end of class wxgMeasurementTypeEAPnl
    92