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

# Source Code for Module Gnumed.wxGladeWidgets.wxgBillableEAPnl

     1  #!/usr/bin/env python
     2  # -*- coding: UTF8 -*-
     3  #
     4  # generated by wxGlade 0.6.8
     5  #
     6
     7  import wx
     8
     9  # begin wxGlade: dependencies
    10  import gettext
    11  # end wxGlade
    12
    13  # begin wxGlade: extracode
    14  from Gnumed.wxpython import gmCodingWidgets
    15  # end wxGlade
    16
    17
    18 -class wxgBillableEAPnl(wx.ScrolledWindow):
    19 -        def __init__(self, *args, **kwds):
    20                  # begin wxGlade: wxgBillableEAPnl.__init__
    21                  kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
    22                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    23                  self._TCTRL_code = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    24                  self._PRW_coding_system = gmCodingWidgets.cDataSourcePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    25                  self._TCTRL_description = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    26                  self._TCTRL_amount = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    27                  self._TCTRL_currency = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    28                  self._TCTRL_vat = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    29                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
    30                  self._CHBOX_active = wx.CheckBox(self, wx.ID_ANY, _("&Active"))
    31
    32                  self.__set_properties()
    33                  self.__do_layout()
    34                  # end wxGlade
    35
    36 -        def __set_properties(self):
    37                  # begin wxGlade: wxgBillableEAPnl.__set_properties
    38                  self.SetScrollRate(10, 10)
    39                  self._TCTRL_code.SetToolTipString(_("Mandatory: A code for this billable."))
    40                  self._PRW_coding_system.SetToolTipString(_("Mandatory: The system of billing codes this billable comes from."))
    41                  self._TCTRL_description.SetToolTipString(_("Mandatory: A description of this billable."))
    42                  self._TCTRL_amount.SetToolTipString(_("The payable amount associated with this billable.\nDefaults to 0."))
    43                  self._TCTRL_currency.SetToolTipString(_(u"The currency to apply to this billable.\\nDefaults to \u20ac."))
    44                  self._TCTRL_vat.SetToolTipString(_("Value Added Tax (VAT) in percent to apply to this billable.\nDefaults to 0 meaning \"no VAT\"."))
    45                  self._TCTRL_comment.SetToolTipString(_("Optional: A comment on this billable."))
    46                  self._CHBOX_active.SetToolTipString(_("Check here if this billable is active."))
    47                  self._CHBOX_active.SetValue(1)
    48                  # end wxGlade
    49
    50 -        def __do_layout(self):
    51                  # begin wxGlade: wxgBillableEAPnl.__do_layout
    52                  _gszr_main = wx.FlexGridSizer(5, 2, 1, 3)
    53                  __szr_amount_details = wx.BoxSizer(wx.HORIZONTAL)
    54                  __szr_code_details = wx.BoxSizer(wx.HORIZONTAL)
    55                  __lbl_code = wx.StaticText(self, wx.ID_ANY, _("Code"))
    56                  __lbl_code.SetForegroundColour(wx.Colour(255, 0, 0))
    57                  _gszr_main.Add(__lbl_code, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    58                  __szr_code_details.Add(self._TCTRL_code, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    59                  __lbl_system = wx.StaticText(self, wx.ID_ANY, _("System"))
    60                  __lbl_system.SetForegroundColour(wx.Colour(255, 0, 0))
    61                  __szr_code_details.Add(__lbl_system, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    62                  __szr_code_details.Add(self._PRW_coding_system, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    63                  _gszr_main.Add(__szr_code_details, 1, wx.EXPAND, 0)
    64                  __lbl_description = wx.StaticText(self, wx.ID_ANY, _("Description"))
    65                  __lbl_description.SetForegroundColour(wx.Colour(255, 0, 0))
    66                  _gszr_main.Add(__lbl_description, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    67                  _gszr_main.Add(self._TCTRL_description, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    68                  __lbl_brand_name = wx.StaticText(self, wx.ID_ANY, _("Value"))
    69                  __lbl_brand_name.SetForegroundColour(wx.Colour(255, 127, 0))
    70                  _gszr_main.Add(__lbl_brand_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    71                  __szr_amount_details.Add(self._TCTRL_amount, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    72                  __lbl_currency = wx.StaticText(self, wx.ID_ANY, _("Currency"))
    73                  __lbl_currency.SetForegroundColour(wx.Colour(255, 127, 0))
    74                  __szr_amount_details.Add(__lbl_currency, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    75                  __szr_amount_details.Add(self._TCTRL_currency, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    76                  __lbl_vat = wx.StaticText(self, wx.ID_ANY, _("VAT"))
    77                  __lbl_vat.SetForegroundColour(wx.Colour(255, 127, 0))
    78                  __szr_amount_details.Add(__lbl_vat, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    79                  __szr_amount_details.Add(self._TCTRL_vat, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
    80                  __lbl_percent = wx.StaticText(self, wx.ID_ANY, _("%"))
    81                  __szr_amount_details.Add(__lbl_percent, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    82                  _gszr_main.Add(__szr_amount_details, 1, wx.EXPAND, 0)
    83                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    84                  _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    85                  _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    86                  __lbl_status = wx.StaticText(self, wx.ID_ANY, _("Status"))
    87                  _gszr_main.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    88                  _gszr_main.Add(self._CHBOX_active, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    89                  self.SetSizer(_gszr_main)
    90                  _gszr_main.Fit(self)
    91                  _gszr_main.AddGrowableCol(1)
    92                  # end wxGlade
    93
    94  # end of class wxgBillableEAPnl
    95