Gnumed.wxpython.gui.gmAllergiesPlugin

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

# Source Code for Module Gnumed.wxpython.gui.gmAllergiesPlugin

      1  # -*- coding: utf-8 -*-
      2  #======================================================================
      3  # GNUmed allergies notebook plugin
      4  # --------------------------------
      5  #
      6  # @copyright: author
      7  #======================================================================
      8  # $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/client/wxpython/gui/gmAllergiesPlugin.py,v $
      9  # $Id: gmAllergiesPlugin.py,v 1.9 2009-07-12 18:46:57 ncq Exp $
     10  __version__ = "$Revision: 1.9 $"
     11  __author__ = "R.Terry, S.J.Tan, K.Hilbert"
     12  __license__ = "GPL v2 or later (details at http://www.gnu.org)"
     13
     14  import logging
     15
     16
     17  import wx
     18
     19
     20  from Gnumed.wxpython import gmPlugin, gmAllergyWidgets
     21
     22  _log = logging.getLogger('gm.ui')
     23  _log.info(__version__)
     24
     25  #======================================================================
     26 -class gmAllergiesPlugin(gmPlugin.cNotebookPlugin):
     27          """Plugin to encapsulate the allergies window."""
     28
     29          __icons = {
     30  """icon_letter_A""": 'x\xda\xd3\xc8)0\xe4\nV74S\x00"\x13\x05Cu\xae\xc4`\xf5|\x85d\x05e\x17W\x10\
     31  \x04\xf3\xf5@|77\x03 \x00\xf3\x15\x80|\xbf\xfc\xbcT0\'\x02$i\xee\x06\x82PIT@\
     32  HPO\x0f\xab`\x04\x86\xa0\x9e\x1e\\)\xaa`\x04\x9a P$\x02\xa6\x14Y0\x1f\xa6\
     33  \x14&\xa8\x07\x05h\x82\x11\x11 \xfd\x11H\x82 1\x84[\x11\x82Hn\x85i\x8f\x80\
     34  \xba&"\x82\x08\xbf\x13\x16\xd4\x03\x00\xe4\xa2I\x9c'
     35  }
     36
     37          tab_name = _('Allergies')
     38
     39 -        def name (self):
     40                  return gmAllergiesPlugin.tab_name
     41
     42 -        def GetWidget (self, parent):
     43  #               self._widget = gmAllergyWidgets.cAllergyPanel(parent, -1)
     44  #               return self._widget
     45                  return wx.Panel(parent, -1)
     46
     47 -        def MenuInfo (self):
     48                  return ('view', '&Allergies')
     49
     50 -        def can_receive_focus(self):
     51                  # need patient
     52                  if not self._verify_patient_avail():
     53                          return None
     54                  return 1
     55  #======================================================================
     56  # main
     57  #----------------------------------------------------------------------
     58  if __name__ == "__main__":
     59          app = wxPyWidgetTester(size = (600, 600))
     60          #app.SetWidget(gmAllergyWidgets.cAllergyPanel, -1)
     61          app.MainLoop()
     62  #======================================================================
     63  # $Log: gmAllergiesPlugin.py,v $
     64  # Revision 1.9  2009-07-12 18:46:57  ncq
     65  # - return empty panel as wx 2.8.7.1 segfaults without it
     66  #
     67  # Revision 1.8  2008/03/06 18:32:30  ncq
     68  # - standard lib logging only
     69  #
     70  # Revision 1.7  2007/10/12 07:28:24  ncq
     71  # - lots of import related cleanup
     72  #
     73  # Revision 1.6  2007/05/21 14:50:05  ncq
     74  # - cleanup
     75  #
     76  # Revision 1.5  2005/09/28 21:27:30  ncq
     77  # - a lot of wx2.6-ification
     78  #
     79  # Revision 1.4  2005/09/26 18:01:52  ncq
     80  # - use proper way to import wx26 vs wx2.4
     81  # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES
     82  # - time for fixup
     83  #
     84  # Revision 1.3  2004/10/11 20:12:09  ncq
     85  # - turn into new-style notebook plugin
     86  #
     87  # Revision 1.2  2004/08/04 17:16:02  ncq
     88  # - wx.NotebookPlugin -> cNotebookPlugin
     89  # - derive cNotebookPluginOld from cNotebookPlugin
     90  # - make cNotebookPluginOld warn on use and implement old
     91  #   explicit "main.notebook.raised_plugin"/ReceiveFocus behaviour
     92  # - ReceiveFocus() -> receive_focus()
     93  #
     94  # Revision 1.1  2004/07/17 21:16:39  ncq
     95  # - cleanup/refactor allergy widgets:
     96  #   - Horst space plugin added
     97  #   - Richard space plugin separated out
     98  #   - plugin independant GUI code aggregated
     99  #   - allergies edit area factor out from generic edit area file
    100  #
    101