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

# Source Code for Module Gnumed.wxGladeWidgets.wxgBillEAPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf8 -*-
     3  # generated by wxGlade 0.6.5 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgBillEAPnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11 -class wxgBillEAPnl(wx.ScrolledWindow):
    12 -    def __init__(self, *args, **kwds):
    13
    14          from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
    15          from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel
    16
    17          # begin wxGlade: wxgBillEAPnl.__init__
    18          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
    19          wx.ScrolledWindow.__init__(self, *args, **kwds)
    20          self._TCTRL_invoice_id = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
    21          self._PRW_close_date = cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER)
    22          self._TCTRL_address = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
    23          self._BTN_select_address = wx.Button(self, -1, _("&Select"), style=wx.BU_EXACTFIT)
    24          self._TCTRL_value = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
    25          self._CHBOX_vat_applies = wx.CheckBox(self, -1, _("&VAT applies"))
    26          self._TCTRL_value_with_vat = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
    27          self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
    28
    29          self.__set_properties()
    30          self.__do_layout()
    31
    32          self.Bind(wx.EVT_BUTTON, self._on_select_address_button_pressed, self._BTN_select_address)
    33          self.Bind(wx.EVT_CHECKBOX, self._on_vat_applies_box_checked, self._CHBOX_vat_applies)
    34          # end wxGlade
    35
    36 -    def __set_properties(self):
    37          # begin wxGlade: wxgBillEAPnl.__set_properties
    38          self.SetScrollRate(10, 10)
    39          self._TCTRL_invoice_id.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
    40          self._TCTRL_invoice_id.SetToolTipString(_("The invoice ID.\n\nNote that in most jurisdictions this must be a unique entity.\n\nGNUmed will create one for you."))
    41          self._PRW_close_date.SetToolTipString(_("The close date of the bill.\n\nWhen a bill is closed items shall not be added to it anymore."))
    42          self._TCTRL_address.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
    43          self._TCTRL_address.SetToolTipString(_("Where to send the bill."))
    44          self._BTN_select_address.SetToolTipString(_("Select the address where to send the bill."))
    45          self._TCTRL_value.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
    46          self._TCTRL_value.SetToolTipString(_("The total value of this bill without VAT applied."))
    47          self._CHBOX_vat_applies.SetToolTipString(_("Select here whether or not to apply VAT when creating an invoice for this bill."))
    48          self._TCTRL_value_with_vat.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
    49          self._TCTRL_value_with_vat.SetToolTipString(_("The total value of this bill after VAT has been applied."))
    50          self._TCTRL_comment.SetToolTipString(_("Add an arbitrary comment on this bill."))
    51          # end wxGlade
    52
    53 -    def __do_layout(self):
    54          # begin wxGlade: wxgBillEAPnl.__do_layout
    55          _gszr_main = wx.FlexGridSizer(5, 2, 1, 3)
    56          __szr_value_details = wx.BoxSizer(wx.HORIZONTAL)
    57          __szr_address_details = wx.BoxSizer(wx.HORIZONTAL)
    58          __lbl_invoice_id = wx.StaticText(self, -1, _("Invoice ID"))
    59          __lbl_invoice_id.SetForegroundColour(wx.Colour(255, 0, 0))
    60          _gszr_main.Add(__lbl_invoice_id, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    61          _gszr_main.Add(self._TCTRL_invoice_id, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    62          __close_date = wx.StaticText(self, -1, _("Close date"))
    63          __close_date.SetForegroundColour(wx.Colour(255, 127, 0))
    64          _gszr_main.Add(__close_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    65          _gszr_main.Add(self._PRW_close_date, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    66          __lbl_address = wx.StaticText(self, -1, _("Address"))
    67          __lbl_address.SetForegroundColour(wx.Colour(255, 127, 0))
    68          _gszr_main.Add(__lbl_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    69          __szr_address_details.Add(self._TCTRL_address, 1, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
    70          __szr_address_details.Add(self._BTN_select_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    71          _gszr_main.Add(__szr_address_details, 1, wx.EXPAND, 0)
    72          __lbl_value = wx.StaticText(self, -1, _("Value"))
    73          _gszr_main.Add(__lbl_value, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    74          __szr_value_details.Add(self._TCTRL_value, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    75          __szr_value_details.Add(self._CHBOX_vat_applies, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
    76          __szr_value_details.Add(self._TCTRL_value_with_vat, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    77          _gszr_main.Add(__szr_value_details, 1, wx.EXPAND, 0)
    78          __lbl_comment = wx.StaticText(self, -1, _("Comment"))
    79          _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    80          _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    81          self.SetSizer(_gszr_main)
    82          _gszr_main.Fit(self)
    83          _gszr_main.AddGrowableCol(1)
    84          # end wxGlade
    85
    86 -    def _on_vat_applies_box_checked(self, event):  # wxGlade: wxgBillEAPnl.<event_handler>
    87          print "Event handler `_on_vat_applies_box_checked' not implemented!"
    88          event.Skip()
    89
    90 -    def _on_select_address_button_pressed(self, event):  # wxGlade: wxgBillEAPnl.<event_handler>
    91          print "Event handler `_on_select_address_button_pressed' not implemented"
    92          event.Skip()
    93
    94  # end of class wxgBillEAPnl
    95