Gnumed.wxGladeWidgets.wxgTopPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgTopPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgTopPnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11
    12 -class wxgTopPnl(wx.Panel):
    13 -    def __init__(self, *args, **kwds):
    14
    15          from Gnumed.wxpython.gmPatPicWidgets import cPatientPicture
    16          from Gnumed.wxpython.gmPatSearchWidgets import cActivePatientSelector
    17          from Gnumed.wxpython.gmDemographicsWidgets import cImageTagPresenterPnl
    18          from Gnumed.wxpython.gmEncounterWidgets import cActiveEncounterPnl
    19
    20          # begin wxGlade: wxgTopPnl.__init__
    21          kwds["style"] = wx.RAISED_BORDER
    22          wx.Panel.__init__(self, *args, **kwds)
    23          self._BMP_patient_picture = cPatientPicture(self, -1, wx.NullBitmap)
    24          self._TCTRL_patient_selector = cActivePatientSelector(self, -1, "")
    25          self._LBL_age = wx.StaticText(self, -1, _("<age>"))
    26          self._LBL_allergies = wx.StaticText(self, -1, _("Caveat"))
    27          self._TCTRL_allergies = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
    28          self._PNL_tags = cImageTagPresenterPnl(self, -1, style=wx.NO_BORDER)
    29          self._PNL_enc = cActiveEncounterPnl(self, -1, style=wx.SIMPLE_BORDER)
    30
    31          self.__set_properties()
    32          self.__do_layout()
    33          # end wxGlade
    34
    35 -    def __set_properties(self):
    36          # begin wxGlade: wxgTopPnl.__set_properties
    37          self._BMP_patient_picture.SetMinSize((50, 54))
    38          self._TCTRL_patient_selector.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    39          self._LBL_age.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    40          self._LBL_age.SetToolTipString(_("The age."))
    41          self._LBL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
    42          self._LBL_allergies.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    43          self._TCTRL_allergies.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
    44          self._TCTRL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
    45          self._TCTRL_allergies.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
    46          # end wxGlade
    47
    48 -    def __do_layout(self):
    49          # begin wxGlade: wxgTopPnl.__do_layout
    50          __szr_main = wx.BoxSizer(wx.HORIZONTAL)
    51          __szr_stacked_rows = wx.BoxSizer(wx.VERTICAL)
    52          __szr_bottom_row = wx.BoxSizer(wx.HORIZONTAL)
    53          __szr_top_row = wx.BoxSizer(wx.HORIZONTAL)
    54          __szr_main.Add(self._BMP_patient_picture, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
    55          __szr_top_row.Add(self._TCTRL_patient_selector, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    56          __szr_top_row.Add(self._LBL_age, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)
    57          __szr_top_row.Add(self._LBL_allergies, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
    58          __szr_top_row.Add(self._TCTRL_allergies, 3, wx.ALIGN_CENTER_VERTICAL, 0)
    59          __szr_stacked_rows.Add(__szr_top_row, 0, wx.BOTTOM | wx.EXPAND, 2)
    60          __szr_bottom_row.Add(self._PNL_tags, 1, wx.ALIGN_CENTER_VERTICAL, 0)
    61          __szr_bottom_row.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    62          __szr_bottom_row.Add(self._PNL_enc, 1, wx.ALIGN_CENTER_VERTICAL, 0)
    63          __szr_stacked_rows.Add(__szr_bottom_row, 0, wx.EXPAND, 0)
    64          __szr_main.Add(__szr_stacked_rows, 1, 0, 0)
    65          self.SetSizer(__szr_main)
    66          __szr_main.Fit(self)
    67          # end wxGlade
    68
    69  # end of class wxgTopPnl
    70