Package Gnumed :: Package wxpython :: Package gui :: Module gmShowMedDocs
[frames] | no frames]

Source Code for Module Gnumed.wxpython.gui.gmShowMedDocs

 1  """A documents tree plugin.""" 
 2   
 3  __version__ = "$Revision: 1.78 $" 
 4  __author__ = "Karsten Hilbert <Karsten.Hilbert@gmx.net>" 
 5  #================================================================ 
 6  import os.path, sys, logging 
 7   
 8   
 9  import wx 
10   
11   
12  from Gnumed.wxpython import gmDocumentWidgets, gmPlugin 
13   
14   
15  _log = logging.getLogger('gm.ui') 
16  _log.info(__version__) 
17  #================================================================ 
18 -class gmShowMedDocs(gmPlugin.cNotebookPlugin):
19 """Plugin to encapsulate document tree.""" 20 21 tab_name = _("Documents") 22
23 - def name(self):
25 #--------------------------------------------------------
26 - def GetWidget(self, parent):
27 self._widget = gmDocumentWidgets.cSelectablySortedDocTreePnl(parent, -1) 28 return self._widget
29 #--------------------------------------------------------
30 - def MenuInfo(self):
31 return ('emr', _('&Documents'))
32 #--------------------------------------------------------
33 - def can_receive_focus(self):
34 # need patient 35 if not self._verify_patient_avail(): 36 return None 37 return 1
38 #--------------------------------------------------------
39 - def _on_raise_by_signal(self, **kwds):
40 if not gmPlugin.cNotebookPlugin._on_raise_by_signal(self, **kwds): 41 return False 42 43 try: 44 if kwds['sort_mode'] == 'review': 45 self._widget._on_sort_by_review_selected(None) 46 except KeyError: 47 pass 48 49 return True
50 #================================================================ 51 # MAIN 52 #---------------------------------------------------------------- 53 if __name__ == '__main__': 54 pass 55 #================================================================ 56