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

# Source Code for Module Gnumed.wxGladeWidgets.wxgBillingPluginPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  # generated by wxGlade 0.6.5 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgBillingPluginPnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11 -class wxgBillingPluginPnl(wx.ScrolledWindow):
    12 -    def __init__(self, *args, **kwds):
    13
    14          from Gnumed.wxpython import gmBillingWidgets
    15
    16          # begin wxGlade: wxgBillingPluginPnl.__init__
    17          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
    18          wx.ScrolledWindow.__init__(self, *args, **kwds)
    19          self._CHBOX_show_non_invoiced_only = wx.CheckBox(self, -1, _("Show non-invoiced only"))
    20          self._PNL_bill_items = gmBillingWidgets.cPersonBillItemsManagerPnl(self, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
    21          self._PRW_billable = gmBillingWidgets.cBillablePhraseWheel(self, -1, "", style=wx.NO_BORDER)
    22          self._TCTRL_factor = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
    23          self._TCTRL_details = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
    24          self._BTN_insert_item = wx.Button(self, -1, _("&Insert"), style=wx.BU_EXACTFIT)
    25          self.__szr_add_item_staticbox = wx.StaticBox(self, -1, _("Add billing item to current encounter"))
    26
    27          self.__set_properties()
    28          self.__do_layout()
    29
    30          self.Bind(wx.EVT_CHECKBOX, self._on_non_invoiced_only_checkbox_toggled, self._CHBOX_show_non_invoiced_only)
    31          self.Bind(wx.EVT_BUTTON, self._on_insert_bill_item_button_pressed, self._BTN_insert_item)
    32          # end wxGlade
    33
    34 -    def __set_properties(self):
    35          # begin wxGlade: wxgBillingPluginPnl.__set_properties
    36          self.SetScrollRate(10, 10)
    37          self._CHBOX_show_non_invoiced_only.SetValue(1)
    38          self._PRW_billable.SetToolTipString(_("Select - by code or part of the description - a billable item to add to the patient."))
    39          self._TCTRL_factor.SetToolTipString(_("Modify the factor to apply to the item price."))
    40          self._TCTRL_factor.Enable(False)
    41          self._TCTRL_details.SetToolTipString(_("Optional: Add a short patient specific comment on this item. Will be shown on the bill."))
    42          self._TCTRL_details.Enable(False)
    43          self._BTN_insert_item.SetToolTipString(_("Add the selected billing item to the patient."))
    44          self._BTN_insert_item.Enable(False)
    45          # end wxGlade
    46
    47 -    def __do_layout(self):
    48          # begin wxGlade: wxgBillingPluginPnl.__do_layout
    49          __szr_main = wx.BoxSizer(wx.VERTICAL)
    50          self.__szr_add_item_staticbox.Lower()
    51          __szr_add_item = wx.StaticBoxSizer(self.__szr_add_item_staticbox, wx.HORIZONTAL)
    52          __szr_list_options = wx.BoxSizer(wx.HORIZONTAL)
    53          __szr_list_options.Add(self._CHBOX_show_non_invoiced_only, 0, wx.ALIGN_CENTER_VERTICAL, 5)
    54          __szr_list_options.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    55          __szr_main.Add(__szr_list_options, 0, wx.BOTTOM | wx.EXPAND, 2)
    56          __szr_main.Add(self._PNL_bill_items, 1, wx.BOTTOM | wx.EXPAND, 2)
    57          __lbl_item = wx.StaticText(self, -1, _("Item:"))
    58          __szr_add_item.Add(__lbl_item, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
    59          __szr_add_item.Add(self._PRW_billable, 1, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    60          __lbl_factor = wx.StaticText(self, -1, _("Factor:"))
    61          __szr_add_item.Add(__lbl_factor, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
    62          __szr_add_item.Add(self._TCTRL_factor, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    63          __lbl_details = wx.StaticText(self, -1, _("Comment:"))
    64          __szr_add_item.Add(__lbl_details, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
    65          __szr_add_item.Add(self._TCTRL_details, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    66          __szr_add_item.Add(self._BTN_insert_item, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    67          __szr_main.Add(__szr_add_item, 0, wx.EXPAND, 0)
    68          self.SetSizer(__szr_main)
    69          __szr_main.Fit(self)
    70          # end wxGlade
    71
    72 -    def _on_non_invoiced_only_checkbox_toggled(self, event):  # wxGlade: wxgBillingPluginPnl.<event_handler>
    73          print "Event handler `_on_non_invoiced_only_checkbox_toggled' not implemented!"
    74          event.Skip()
    75
    76 -    def _on_create_invoice_button_pressed(self, event):  # wxGlade: wxgBillingPluginPnl.<event_handler>
    77          print "Event handler `_on_create_invoice_button_pressed' not implemented!"
    78          event.Skip()
    79
    80 -    def _on_insert_bill_item_button_pressed(self, event):  # wxGlade: wxgBillingPluginPnl.<event_handler>
    81          print "Event handler `_on_insert_bill_item_button_pressed' not implemented!"
    82          event.Skip()
    83
    84  # end of class wxgBillingPluginPnl
    85  if __name__ == "__main__":
    86      import gettext
    87      gettext.install("app") # replace with the appropriate catalog name
    88
    89      app = wx.PySimpleApp(0)
    90      wx.InitAllImageHandlers()
    91      dialog_1 = (None, -1, "")
    92      app.SetTopWindow(dialog_1)
    93      dialog_1.Show()
    94      app.MainLoop()
    95