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

# Source Code for Module Gnumed.wxGladeWidgets.wxgAllergyEditAreaDlg

     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 wxgAllergyEditAreaDlg(wx.Dialog):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgAllergyEditAreaDlg.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
    20                  wx.Dialog.__init__(self, *args, **kwds)
    21                  self.SetSize((400, 190))
    22                  from Gnumed.wxpython.gmAllergyWidgets import cAllergyEditAreaPnl
    23                  self._PNL_edit_area = cAllergyEditAreaPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
    24                  self._BTN_save = wx.Button(self, wx.ID_SAVE, "")
    25                  self._BTN_clear = wx.Button(self, wx.ID_CLEAR, "")
    26                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
    27
    28                  self.__set_properties()
    29                  self.__do_layout()
    30
    31                  self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
    32                  self.Bind(wx.EVT_BUTTON, self._on_clear_button_pressed, self._BTN_clear)
    33                  # end wxGlade
    34
    35 -        def __set_properties(self):
    36                  # begin wxGlade: wxgAllergyEditAreaDlg.__set_properties
    37                  self.SetTitle(_("Edit Allergy/Intolerance"))
    38                  self.SetSize((400, 190))
    39                  self._BTN_save.SetToolTip(_("Save the allergy/intolerance in the database."))
    40                  self._BTN_clear.SetToolTip(_("Clear all fields or reset to database values."))
    41                  self._BTN_cancel.SetToolTip(_("Cancel editing the allergy/intolerance."))
    42                  self._BTN_cancel.SetDefault()
    43                  # end wxGlade
    44
    45 -        def __do_layout(self):
    46                  # begin wxGlade: wxgAllergyEditAreaDlg.__do_layout
    47                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    48                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    49                  __szr_main.Add(self._PNL_edit_area, 1, wx.ALL | wx.EXPAND, 2)
    50                  __szr_buttons.Add(self._BTN_save, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    51                  __szr_buttons.Add(self._BTN_clear, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    52                  __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    53                  __szr_buttons.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    54                  __szr_main.Add(__szr_buttons, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.TOP, 15)
    55                  self.SetSizer(__szr_main)
    56                  self.Layout()
    57                  self.Centre()
    58                  # end wxGlade
    59
    60 -        def _on_save_button_pressed(self, event):  # wxGlade: wxgAllergyEditAreaDlg.<event_handler>
    61                  print("Event handler '_on_save_button_pressed' not implemented!")
    62                  event.Skip()
    63
    64 -        def _on_clear_button_pressed(self, event):  # wxGlade: wxgAllergyEditAreaDlg.<event_handler>
    65                  print("Event handler '_on_clear_button_pressed' not implemented!")
    66                  event.Skip()
    67
    68  # end of class wxgAllergyEditAreaDlg
    69