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

# Source Code for Module Gnumed.wxGladeWidgets.wxgWaitingListEntryEditAreaPnl

     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.gmPatSearchWidgets import cPersonSearchCtrl
    14  from Gnumed.wxpython.gmWaitingListWidgets import cWaitingZonePhraseWheel
    15  # end wxGlade
    16
    17
    18 -class wxgWaitingListEntryEditAreaPnl(wx.Panel):
    19 -        def __init__(self, *args, **kwds):
    20                  # begin wxGlade: wxgWaitingListEntryEditAreaPnl.__init__
    21                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    22                  wx.Panel.__init__(self, *args, **kwds)
    23                  self._PRW_patient = cPersonSearchCtrl(self, wx.ID_ANY, "")
    24                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_WORDWRAP)
    25                  self._PRW_zone = cWaitingZonePhraseWheel(self, wx.ID_ANY, "")
    26                  self._SPCTRL_urgency = wx.SpinCtrl(self, wx.ID_ANY, "0", min=0, max=10, style=0)
    27
    28                  self.__set_properties()
    29                  self.__do_layout()
    30                  # end wxGlade
    31
    32 -        def __set_properties(self):
    33                  # begin wxGlade: wxgWaitingListEntryEditAreaPnl.__set_properties
    34                  self._PRW_patient.SetToolTip(_("Waiting list details for this patient."))
    35                  self._TCTRL_comment.SetToolTip(_("What is the patient here for. Could be the Reason for Encounter."))
    36                  self._TCTRL_comment.SetFocus()
    37                  self._PRW_zone.SetToolTip(_("Select or enter the zone the patient is waiting in."))
    38                  self._SPCTRL_urgency.SetToolTip(_("Select the urgency for this patient.\n\nDefault is 0. Range is 0-10.\nHigher values mean higher urgency."))
    39                  # end wxGlade
    40
    41 -        def __do_layout(self):
    42                  # begin wxGlade: wxgWaitingListEntryEditAreaPnl.__do_layout
    43                  _gszr_main = wx.FlexGridSizer(3, 2, 3, 5)
    44                  __szr_options = wx.BoxSizer(wx.HORIZONTAL)
    45                  __lbl_patient = wx.StaticText(self, wx.ID_ANY, _("Patient"))
    46                  _gszr_main.Add(__lbl_patient, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    47                  _gszr_main.Add(self._PRW_patient, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    48                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    49                  _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    50                  _gszr_main.Add(self._TCTRL_comment, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    51                  __lbl_options = wx.StaticText(self, wx.ID_ANY, "")
    52                  _gszr_main.Add(__lbl_options, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    53                  __lbl_zone = wx.StaticText(self, wx.ID_ANY, _("&Zone:"))
    54                  __szr_options.Add(__lbl_zone, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    55                  __szr_options.Add(self._PRW_zone, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
    56                  __lbl_urgency = wx.StaticText(self, wx.ID_ANY, _("&Urgency:"))
    57                  __szr_options.Add(__lbl_urgency, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    58                  __szr_options.Add(self._SPCTRL_urgency, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    59                  __szr_options.Add((20, 20), 1, wx.EXPAND, 0)
    60                  _gszr_main.Add(__szr_options, 1, wx.EXPAND, 0)
    61                  self.SetSizer(_gszr_main)
    62                  _gszr_main.Fit(self)
    63                  _gszr_main.AddGrowableRow(1)
    64                  _gszr_main.AddGrowableCol(1)
    65                  self.Layout()
    66                  # end wxGlade
    67
    68  # end of class wxgWaitingListEntryEditAreaPnl
    69