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

Source Code for Module Gnumed.wxGladeWidgets.wxgEMRTimelinePluginPnl

  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  from Gnumed.wxpython.gmEMRTimelineWidgets import cEMRTimelinePnl 
 14  # end wxGlade 
 15   
 16   
17 -class wxgEMRTimelinePluginPnl(wx.ScrolledWindow):
18 - def __init__(self, *args, **kwds):
19 # begin wxGlade: wxgEMRTimelinePluginPnl.__init__ 20 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 21 wx.ScrolledWindow.__init__(self, *args, **kwds) 22 self._PNL_timeline = cEMRTimelinePnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL) 23 self._BTN_refresh = wx.Button(self, wx.ID_REFRESH, "") 24 self._BTN_save = wx.Button(self, wx.ID_SAVEAS, "") 25 self._BTN_export_area = wx.Button(self, wx.ID_ANY, _("E&xport area")) 26 self._BTN_print = wx.Button(self, wx.ID_PRINT, "") 27 self._BTN_zoom_in = wx.Button(self, wx.ID_ZOOM_IN, "", style=wx.BU_EXACTFIT) 28 self._BTN_zoom_out = wx.Button(self, wx.ID_ZOOM_OUT, "", style=wx.BU_EXACTFIT) 29 self._BTN_fit_care_period = wx.Button(self, wx.ID_ANY, _("Care"), style=wx.BU_EXACTFIT) 30 self._BTN_fit_last_year = wx.Button(self, wx.ID_ANY, _("12 mo"), style=wx.BU_EXACTFIT) 31 self._BTN_go2day = wx.Button(self, wx.ID_ANY, _("Today"), style=wx.BU_EXACTFIT) 32 self._BTN_fit_all = wx.Button(self, wx.ID_ANY, _("All"), style=wx.BU_EXACTFIT) 33 34 self.__set_properties() 35 self.__do_layout() 36 37 self.Bind(wx.EVT_BUTTON, self._on_refresh_button_pressed, self._BTN_refresh) 38 self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save) 39 self.Bind(wx.EVT_BUTTON, self._on_export_area_button_pressed, self._BTN_export_area) 40 self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print) 41 self.Bind(wx.EVT_BUTTON, self._on_zoom_in_button_pressed, self._BTN_zoom_in) 42 self.Bind(wx.EVT_BUTTON, self._on_zoom_out_button_pressed, self._BTN_zoom_out) 43 self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_care_period_button_pressed, self._BTN_fit_care_period) 44 self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_last_year_button_pressed, self._BTN_fit_last_year) 45 self.Bind(wx.EVT_BUTTON, self._on_go2day_button_pressed, self._BTN_go2day) 46 self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_all_button_pressed, self._BTN_fit_all)
47 # end wxGlade 48
49 - def __set_properties(self):
50 # begin wxGlade: wxgEMRTimelinePluginPnl.__set_properties 51 self.SetScrollRate(10, 10) 52 self._BTN_refresh.SetToolTip(_("Refresh display from the patient's chart.")) 53 self._BTN_save.SetToolTip(_("Save timeline as images.")) 54 self._BTN_export_area.SetToolTip(_("Put timeline into export area.")) 55 self._BTN_print.SetToolTip(_("Print timeline.")) 56 self._BTN_fit_care_period.SetToolTip(_("Fit timeline to the Care Period.")) 57 self._BTN_fit_last_year.SetToolTip(_("Fit timeline to the the last 12 months.")) 58 self._BTN_go2day.SetToolTip(_("Center timeline on today.")) 59 self._BTN_fit_all.SetToolTip(_("Zoom to fit all events."))
60 # end wxGlade 61
62 - def __do_layout(self):
63 # begin wxGlade: wxgEMRTimelinePluginPnl.__do_layout 64 __szr_main = wx.BoxSizer(wx.VERTICAL) 65 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 66 __szr_main.Add(self._PNL_timeline, 1, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.EXPAND, 3) 67 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 68 __szr_buttons.Add(self._BTN_refresh, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 69 __szr_buttons.Add(self._BTN_save, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 70 __szr_buttons.Add(self._BTN_export_area, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 71 __szr_buttons.Add(self._BTN_print, 0, wx.ALIGN_CENTER_VERTICAL, 0) 72 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 73 __szr_buttons.Add(self._BTN_zoom_in, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 74 __szr_buttons.Add(self._BTN_zoom_out, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 75 _lbl_fit = wx.StaticText(self, wx.ID_ANY, _("Show:")) 76 __szr_buttons.Add(_lbl_fit, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 77 __szr_buttons.Add(self._BTN_fit_care_period, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 78 __szr_buttons.Add(self._BTN_fit_last_year, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 79 __szr_buttons.Add(self._BTN_go2day, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 80 __szr_buttons.Add(self._BTN_fit_all, 0, wx.ALIGN_CENTER_VERTICAL, 0) 81 __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 82 __szr_main.Add(__szr_buttons, 0, wx.EXPAND, 0) 83 self.SetSizer(__szr_main) 84 __szr_main.Fit(self) 85 self.Layout()
86 # end wxGlade 87
88 - def _on_refresh_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
89 print("Event handler '_on_refresh_button_pressed' not implemented!") 90 event.Skip()
91
92 - def _on_save_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
93 print("Event handler '_on_save_button_pressed' not implemented!") 94 event.Skip() 95
96 - def _on_export_area_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
97 print("Event handler '_on_export_area_button_pressed' not implemented!") 98 event.Skip() 99
100 - def _on_print_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
101 print("Event handler '_on_print_button_pressed' not implemented!") 102 event.Skip() 103
104 - def _on_zoom_in_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
105 print("Event handler '_on_zoom_in_button_pressed' not implemented!") 106 event.Skip() 107
108 - def _on_zoom_out_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
109 print("Event handler '_on_zoom_out_button_pressed' not implemented!") 110 event.Skip() 111
112 - def _on_zoom_fit_care_period_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
113 print("Event handler '_on_zoom_fit_care_period_button_pressed' not implemented!") 114 event.Skip() 115
116 - def _on_zoom_fit_last_year_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
117 print("Event handler '_on_zoom_fit_last_year_button_pressed' not implemented!") 118 event.Skip() 119
120 - def _on_go2day_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
121 print("Event handler '_on_go2day_button_pressed' not implemented!") 122 event.Skip() 123
124 - def _on_zoom_fit_all_button_pressed(self, event): # wxGlade: wxgEMRTimelinePluginPnl.<event_handler>
125 print("Event handler '_on_zoom_fit_all_button_pressed' not implemented!") 126 event.Skip() 127 128 # end of class wxgEMRTimelinePluginPnl 129