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

# Source Code for Module Gnumed.wxGladeWidgets.wxgTestPanelEAPnl

     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  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
    14  from Gnumed.wxpython.gmLOINCWidgets import cLOINCPhraseWheel
    15  # end wxGlade
    16
    17
    18 -class wxgTestPanelEAPnl(wx.ScrolledWindow):
    19 -        def __init__(self, *args, **kwds):
    20                  # begin wxGlade: wxgTestPanelEAPnl.__init__
    21                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    22                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    23                  self._TCTRL_description = wx.TextCtrl(self, wx.ID_ANY, "")
    24                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")
    25                  self._PRW_loinc = cLOINCPhraseWheel(self, wx.ID_ANY, "")
    26                  self._BTN_add_loinc = wx.Button(self, wx.ID_ANY, _("&Add"), style=wx.BU_EXACTFIT)
    27                  self._LBL_loinc = wx.StaticText(self, wx.ID_ANY, "")
    28                  self._LCTRL_loincs = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
    29                  self._BTN_remove_loinc = wx.Button(self, wx.ID_ANY, _("&Remove"), style=wx.BU_EXACTFIT)
    30
    31                  self.__set_properties()
    32                  self.__do_layout()
    33
    34                  self.Bind(wx.EVT_BUTTON, self._on_add_loinc_button_pressed, self._BTN_add_loinc)
    35                  self.Bind(wx.EVT_BUTTON, self._on_remove_loinc_button_pressed, self._BTN_remove_loinc)
    36                  # end wxGlade
    37
    38 -        def __set_properties(self):
    39                  # begin wxGlade: wxgTestPanelEAPnl.__set_properties
    40                  self.SetScrollRate(10, 10)
    41                  self._TCTRL_description.SetToolTip(_("A short description for this test panel."))
    42                  self._TCTRL_comment.SetToolTip(_("A comment on, or long-form description of, this test panel."))
    43                  self._BTN_add_loinc.SetToolTip(_("Add the selected LOINC to the test panel."))
    44                  self._BTN_remove_loinc.SetToolTip(_("Remove selected LOINC from test panel."))
    45                  # end wxGlade
    46
    47 -        def __do_layout(self):
    48                  # begin wxGlade: wxgTestPanelEAPnl.__do_layout
    49                  _gszr_main = wx.FlexGridSizer(6, 2, 1, 3)
    50                  __szr_loinc = wx.BoxSizer(wx.HORIZONTAL)
    51                  __lbl_description = wx.StaticText(self, wx.ID_ANY, _("Description"))
    52                  _gszr_main.Add(__lbl_description, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    53                  _gszr_main.Add(self._TCTRL_description, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    54                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    55                  _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    56                  _gszr_main.Add(self._TCTRL_comment, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    57                  __lbl_loinc = wx.StaticText(self, wx.ID_ANY, _("LOINC"))
    58                  _gszr_main.Add(__lbl_loinc, 1, wx.ALIGN_CENTER_VERTICAL, 5)
    59                  __szr_loinc.Add(self._PRW_loinc, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
    60                  __szr_loinc.Add(self._BTN_add_loinc, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    61                  _gszr_main.Add(__szr_loinc, 1, wx.EXPAND, 0)
    62                  _gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    63                  _gszr_main.Add(self._LBL_loinc, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    64                  _gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    65                  _gszr_main.Add(self._LCTRL_loincs, 1, wx.EXPAND, 0)
    66                  _gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    67                  _gszr_main.Add(self._BTN_remove_loinc, 0, wx.ALIGN_CENTER, 0)
    68                  self.SetSizer(_gszr_main)
    69                  _gszr_main.Fit(self)
    70                  _gszr_main.AddGrowableRow(4)
    71                  _gszr_main.AddGrowableCol(1)
    72                  self.Layout()
    73                  # end wxGlade
    74
    75 -        def _on_add_loinc_button_pressed(self, event):  # wxGlade: wxgTestPanelEAPnl.<event_handler>
    76                  print("Event handler '_on_add_loinc_button_pressed' not implemented!")
    77                  event.Skip()
    78
    79 -        def _on_remove_loinc_button_pressed(self, event):  # wxGlade: wxgTestPanelEAPnl.<event_handler>
    80                  print("Event handler '_on_remove_loinc_button_pressed' not implemented!")
    81                  event.Skip()
    82
    83  # end of class wxgTestPanelEAPnl
    84