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

Source Code for Module Gnumed.wxGladeWidgets.wxgPrintMgrPluginPnl

  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 wxgPrintMgrPluginPnl(wx.Panel):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxgPrintMgrPluginPnl.__init__ 19 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 20 wx.Panel.__init__(self, *args, **kwds) 21 self._RBTN_all_patients = wx.RadioButton(self, wx.ID_ANY, _("All patients")) 22 self._RBTN_active_patient_only = wx.RadioButton(self, wx.ID_ANY, _("&Active patient only")) 23 from Gnumed.wxpython.gmListWidgets import cReportListCtrl 24 self._LCTRL_printouts = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT) 25 self._BTN_view_printout = wx.Button(self, wx.ID_ANY, _("&View"), style=wx.BU_EXACTFIT) 26 self._BTN_print_printouts = wx.Button(self, wx.ID_PRINT, "", style=wx.BU_EXACTFIT) 27 self._BTN_export_printouts = wx.Button(self, wx.ID_ANY, _("&Export"), style=wx.BU_EXACTFIT) 28 self._BTN_delete_printouts = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT) 29 30 self.__set_properties() 31 self.__do_layout() 32 33 self.Bind(wx.EVT_RADIOBUTTON, self._on_all_patients_selected, self._RBTN_all_patients) 34 self.Bind(wx.EVT_RADIOBUTTON, self._on_active_patient_only_selected, self._RBTN_active_patient_only) 35 self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_printouts) 36 self.Bind(wx.EVT_BUTTON, self._on_view_button_pressed, self._BTN_view_printout) 37 self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print_printouts) 38 self.Bind(wx.EVT_BUTTON, self._on_export_button_pressed, self._BTN_export_printouts) 39 self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete_printouts)
40 # end wxGlade 41
42 - def __set_properties(self):
43 # begin wxGlade: wxgPrintMgrPluginPnl.__set_properties 44 self._RBTN_all_patients.SetToolTip(_("Select here to show documents for all patients.")) 45 self._RBTN_all_patients.SetValue(1) 46 self._RBTN_active_patient_only.SetToolTip(_("Select here to filter to the active patient (if any).")) 47 self._RBTN_active_patient_only.Enable(False) 48 self._BTN_view_printout.SetToolTip(_("Show the topmost selected printout.")) 49 self._BTN_print_printouts.SetToolTip(_("Print selected/all printouts.")) 50 self._BTN_export_printouts.SetToolTip(_("Store selected printouts in patient export area (if applicable).")) 51 self._BTN_delete_printouts.SetToolTip(_("Delete the selected printouts"))
52 # end wxGlade 53
54 - def __do_layout(self):
55 # begin wxGlade: wxgPrintMgrPluginPnl.__do_layout 56 __szr_main = wx.BoxSizer(wx.VERTICAL) 57 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 58 __szr_top = wx.BoxSizer(wx.HORIZONTAL) 59 __lbl_patient_filter = wx.StaticText(self, wx.ID_ANY, _("Show printouts for:")) 60 __szr_top.Add(__lbl_patient_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 61 __szr_top.Add(self._RBTN_all_patients, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 62 __szr_top.Add(self._RBTN_active_patient_only, 0, wx.ALIGN_CENTER_VERTICAL, 5) 63 __szr_top.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3) 64 __szr_main.Add(__szr_top, 0, wx.BOTTOM | wx.EXPAND, 3) 65 __szr_main.Add(self._LCTRL_printouts, 1, wx.EXPAND, 5) 66 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 0) 67 __szr_buttons.Add(self._BTN_view_printout, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3) 68 __szr_buttons.Add(self._BTN_print_printouts, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3) 69 __szr_buttons.Add(self._BTN_export_printouts, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3) 70 __szr_buttons.Add(self._BTN_delete_printouts, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3) 71 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 3) 72 __szr_main.Add(__szr_buttons, 0, wx.EXPAND, 0) 73 self.SetSizer(__szr_main) 74 __szr_main.Fit(self) 75 self.Layout()
76 # end wxGlade 77
78 - def _on_all_patients_selected(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
79 print("Event handler '_on_all_patients_selected' not implemented!") 80 event.Skip()
81
82 - def _on_active_patient_only_selected(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
83 print("Event handler '_on_active_patient_only_selected' not implemented!") 84 event.Skip() 85
86 - def _on_list_item_selected(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
87 print("Event handler '_on_list_item_selected' not implemented!") 88 event.Skip() 89
90 - def _on_view_button_pressed(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
91 print("Event handler '_on_view_button_pressed' not implemented!") 92 event.Skip() 93
94 - def _on_print_button_pressed(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
95 print("Event handler '_on_print_button_pressed' not implemented!") 96 event.Skip() 97
98 - def _on_export_button_pressed(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
99 print("Event handler '_on_export_button_pressed' not implemented!") 100 event.Skip() 101
102 - def _on_delete_button_pressed(self, event): # wxGlade: wxgPrintMgrPluginPnl.<event_handler>
103 print("Event handler '_on_delete_button_pressed' not implemented!") 104 event.Skip() 105 106 # end of class wxgPrintMgrPluginPnl 107