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

# Source Code for Module Gnumed.wxGladeWidgets.wxgOrgUnitAddressPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf8 -*-
     3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgOrgUnitAddressPnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11
    12 -class wxgOrgUnitAddressPnl(wx.ScrolledWindow):
    13 -    def __init__(self, *args, **kwds):
    14
    15          from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel
    16
    17          # begin wxGlade: wxgOrgUnitAddressPnl.__init__
    18          kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
    19          wx.ScrolledWindow.__init__(self, *args, **kwds)
    20          self._LBL_message = wx.StaticText(self, -1, "", style=wx.ALIGN_CENTRE)
    21          self._PRW_address_searcher = cAddressPhraseWheel(self, -1, "", style=wx.NO_BORDER)
    22          self._BTN_save_picked_address = wx.Button(self, -1, _("&Link"), style=wx.BU_EXACTFIT)
    23          self._BTN_add_new_address = wx.Button(self, -1, _("Link &new"), style=wx.BU_EXACTFIT)
    24          self._BTN_manage_addresses = wx.Button(self, -1, _("Browse"), style=wx.BU_EXACTFIT)
    25
    26          self.__set_properties()
    27          self.__do_layout()
    28
    29          self.Bind(wx.EVT_BUTTON, self._on_save_picked_address_button_pressed, self._BTN_save_picked_address)
    30          self.Bind(wx.EVT_BUTTON, self._on_add_new_address_button_pressed, self._BTN_add_new_address)
    31          self.Bind(wx.EVT_BUTTON, self._on_manage_addresses_button_pressed, self._BTN_manage_addresses)
    32          # end wxGlade
    33
    34 -    def __set_properties(self):
    35          # begin wxGlade: wxgOrgUnitAddressPnl.__set_properties
    36          self.SetScrollRate(10, 10)
    37          self._LBL_message.Hide()
    38          self._PRW_address_searcher.SetToolTipString(_("Search for matches among existing addresses and [Link] a selection, or [Link (a) new] address."))
    39          self._BTN_save_picked_address.SetToolTipString(_("Link the selected address with the organizational unit."))
    40          self._BTN_save_picked_address.Enable(False)
    41          self._BTN_add_new_address.SetToolTipString(_("Enter a new address and link it to the organizational unit."))
    42          self._BTN_manage_addresses.SetToolTipString(_("Browse all known addresses (loading can be slow)."))
    43          # end wxGlade
    44
    45 -    def __do_layout(self):
    46          # begin wxGlade: wxgOrgUnitAddressPnl.__do_layout
    47          __szr_main = wx.BoxSizer(wx.VERTICAL)
    48          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    49          __szr_address_search = wx.BoxSizer(wx.HORIZONTAL)
    50          __szr_main.Add(self._LBL_message, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
    51          __lbl_searcher = wx.StaticText(self, -1, _("Address"))
    52          __szr_address_search.Add(__lbl_searcher, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    53          __szr_address_search.Add(self._PRW_address_searcher, 1, wx.ALIGN_CENTER_VERTICAL, 5)
    54          __szr_main.Add(__szr_address_search, 0, wx.EXPAND, 0)
    55          __szr_buttons.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
    56          __szr_buttons.Add(self._BTN_save_picked_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    57          __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    58          __szr_buttons.Add(self._BTN_add_new_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    59          __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    60          __szr_buttons.Add(self._BTN_manage_addresses, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    61          __szr_buttons.Add((20, 20), 2, wx.ALIGN_CENTER_VERTICAL, 0)
    62          __szr_main.Add(__szr_buttons, 0, wx.TOP|wx.EXPAND, 3)
    63          self.SetSizer(__szr_main)
    64          __szr_main.Fit(self)
    65          # end wxGlade
    66
    67 -    def _on_save_picked_address_button_pressed(self, event): # wxGlade: wxgOrgUnitAddressPnl.<event_handler>
    68          print "Event handler `_on_save_picked_address_button_pressed' not implemented"
    69          event.Skip()
    70
    71 -    def _on_add_new_address_button_pressed(self, event): # wxGlade: wxgOrgUnitAddressPnl.<event_handler>
    72          print "Event handler `_on_add_new_address_button_pressed' not implemented"
    73          event.Skip()
    74
    75 -    def _on_manage_addresses_button_pressed(self, event): # wxGlade: wxgOrgUnitAddressPnl.<event_handler>
    76          print "Event handler `_on_manage_addresses_button_pressed' not implemented"
    77          event.Skip()
    78
    79  # end of class wxgOrgUnitAddressPnl
    80