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

Source Code for Module Gnumed.wxpython.gui.gmShowMedDocs

 1  """ 
 2  This is a no-frills document display handler for the 
 3  GNUmed medical document database. 
 4   
 5  It knows nothing about the documents itself. All it does 
 6  is to let the user select a page to display and tries to 
 7  hand it over to an appropriate viewer. 
 8   
 9  For that it relies on proper mime type handling at the OS level. 
10  """ 
11  # $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/client/wxpython/gui/gmShowMedDocs.py,v $ 
12  __version__ = "$Revision: 1.78 $" 
13  __author__ = "Karsten Hilbert <Karsten.Hilbert@gmx.net>" 
14  #================================================================ 
15  import os.path, sys, logging 
16   
17   
18  import wx 
19   
20   
21  from Gnumed.wxpython import gmDocumentWidgets, gmPlugin, images_Archive_plugin 
22   
23   
24  _log = logging.getLogger('gm.ui') 
25  _log.info(__version__) 
26  #================================================================ 
27 -class gmShowMedDocs(gmPlugin.cNotebookPlugin):
28 """Plugin to encapsulate document tree.""" 29 30 tab_name = _("Documents") 31
32 - def name(self):
34 #--------------------------------------------------------
35 - def GetWidget(self, parent):
36 self._widget = gmDocumentWidgets.cSelectablySortedDocTreePnl(parent, -1) 37 return self._widget
38 #--------------------------------------------------------
39 - def MenuInfo(self):
40 return ('emr', _('&Documents review'))
41 #--------------------------------------------------------
42 - def can_receive_focus(self):
43 # need patient 44 if not self._verify_patient_avail(): 45 return None 46 return 1
47 #--------------------------------------------------------
48 - def _on_raise_by_signal(self, **kwds):
49 if not gmPlugin.cNotebookPlugin._on_raise_by_signal(self, **kwds): 50 return False 51 52 try: 53 if kwds['sort_mode'] == 'review': 54 self._widget._on_sort_by_review_selected(None) 55 except KeyError: 56 pass 57 58 return True
59 #-------------------------------------------------------- 60 # def populate_toolbar (self, tb, widget): 61 # wxID_TB_BTN_show_page = wx.NewId() 62 # tool1 = tb.AddTool( 63 # wxID_TB_BTN_show_page, 64 # images_Archive_plugin.getreportsBitmap(), 65 # shortHelpString=_("show document"), 66 # isToggle=False 67 # ) 68 # wx.EVT_TOOL(tb, wxID_TB_BTN_show_page, self._widget._doc_tree.display_selected_part) 69 # tb.AddControl(wx.StaticBitmap( 70 # tb, 71 # -1, 72 # images_Archive_plugin.getvertical_separator_thinBitmap(), 73 # wx.DefaultPosition, 74 # wx.DefaultSize 75 # )) 76 #================================================================ 77 # MAIN 78 #---------------------------------------------------------------- 79 if __name__ == '__main__': 80 pass 81 #================================================================ 82