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

# Source Code for Module Gnumed.wxGladeWidgets.wxgTopPnl

     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.gmPatPicWidgets import cPatientPicture
    14  from Gnumed.wxpython.gmPatSearchWidgets import cActivePatientSelector
    15  from Gnumed.wxpython.gmDemographicsWidgets import cImageTagPresenterPnl
    16  from Gnumed.wxpython.gmEncounterWidgets import cActiveEncounterPnl
    17  # end wxGlade
    18
    19
    20 -class wxgTopPnl(wx.Panel):
    21 -        def __init__(self, *args, **kwds):
    22                  # begin wxGlade: wxgTopPnl.__init__
    23                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_RAISED
    24                  wx.Panel.__init__(self, *args, **kwds)
    25                  self._BMP_patient_picture = cPatientPicture(self, wx.ID_ANY, wx.Bitmap(50, 54))
    26                  self._TCTRL_patient_selector = cActivePatientSelector(self, wx.ID_ANY, "")
    27                  self._LBL_age = wx.StaticText(self, wx.ID_ANY, _("<age>"))
    28                  self._LBL_allergies = wx.StaticText(self, wx.ID_ANY, _("Caveat"))
    29                  self._TCTRL_allergies = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
    30                  self._PNL_tags = cImageTagPresenterPnl(self, wx.ID_ANY, style=wx.BORDER_NONE)
    31                  self._LBL_lab = wx.StaticText(self, wx.ID_ANY, "")
    32                  self._PNL_enc = cActiveEncounterPnl(self, wx.ID_ANY, style=wx.BORDER_SIMPLE)
    33
    34                  self.__set_properties()
    35                  self.__do_layout()
    36                  # end wxGlade
    37
    38 -        def __set_properties(self):
    39                  # begin wxGlade: wxgTopPnl.__set_properties
    40                  self._BMP_patient_picture.SetMinSize((50, 54))
    41                  self._TCTRL_patient_selector.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    42                  self._LBL_age.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    43                  self._LBL_age.SetToolTip(_("The age."))
    44                  self._LBL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
    45                  self._LBL_allergies.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    46                  self._TCTRL_allergies.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
    47                  self._TCTRL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
    48                  self._TCTRL_allergies.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    49                  # end wxGlade
    50
    51 -        def __do_layout(self):
    52                  # begin wxGlade: wxgTopPnl.__do_layout
    53                  __szr_main = wx.BoxSizer(wx.HORIZONTAL)
    54                  __szr_stacked_rows = wx.BoxSizer(wx.VERTICAL)
    55                  __szr_bottom_row = wx.BoxSizer(wx.HORIZONTAL)
    56                  __szr_bottom_row_left = wx.BoxSizer(wx.HORIZONTAL)
    57                  __szr_top_row = wx.BoxSizer(wx.HORIZONTAL)
    58                  __szr_main.Add(self._BMP_patient_picture, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
    59                  __szr_top_row.Add(self._TCTRL_patient_selector, 2, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    60                  __szr_top_row.Add(self._LBL_age, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
    61                  __szr_top_row.Add(self._LBL_allergies, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
    62                  __szr_top_row.Add(self._TCTRL_allergies, 3, wx.ALIGN_CENTER_VERTICAL, 0)
    63                  __szr_stacked_rows.Add(__szr_top_row, 0, wx.BOTTOM | wx.EXPAND, 2)
    64                  __szr_bottom_row_left.Add(self._PNL_tags, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    65                  __szr_bottom_row_left.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    66                  __szr_bottom_row_left.Add(self._LBL_lab, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    67                  __szr_bottom_row_left.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    68                  __szr_bottom_row.Add(__szr_bottom_row_left, 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    69                  __szr_bottom_row.Add(self._PNL_enc, 1, wx.ALIGN_CENTER_VERTICAL, 0)
    70                  __szr_stacked_rows.Add(__szr_bottom_row, 0, wx.EXPAND, 0)
    71                  __szr_main.Add(__szr_stacked_rows, 1, 0, 0)
    72                  self.SetSizer(__szr_main)
    73                  __szr_main.Fit(self)
    74                  self.Layout()
    75                  # end wxGlade
    76
    77  # end of class wxgTopPnl
    78