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

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

     1  #======================================================================
     2  # GNUmed immunisation/vaccination patient plugin
     3  # ----------------------------------------------
     4  #
     5  # this plugin holds the immunisation details
     6  #
     7  # @copyright: author
     8  #======================================================================
     9  # $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/client/wxpython/gui/gmVaccinationsPlugin.py,v $
    10  # $Id: gmVaccinationsPlugin.py,v 1.8 2008-03-06 18:32:31 ncq Exp $
    11  __version__ = "$Revision: 1.8 $"
    12  __author__ = "R.Terry, S.J.Tan, K.Hilbert"
    13  __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
    14
    15  import wx
    16
    17  # panel class holding editing prompts and text boxes
    18  from Gnumed.wxpython import gmPlugin, gmVaccWidgets
    19
    20  _log = gmLog.gmDefLog
    21  _log.Log(gmLog.lInfo, __version__)
    22
    23  #======================================================================
    24 -class gmVaccinationsPlugin(gmPlugin.cNotebookPlugin):
    25          """Plugin to encapsulate the immunisation window."""
    26
    27          __icons = {
    28  """icon_syringe""": 'x\xdam\xd0\xb1\n\x80 \x10\x06\xe0\xbd\xa7\xf8\xa1\xc1\xa6\x9f$\xe8\x01\x1a\
    29  \x1a[Z\\#\x9a\x8a\xea\xfd\xa7N3\xf4\xb0C\x90\xff\xf3\x0e\xd4\xe6\xb8m5\x1b\
    30  \xdbCV\x07k\xaae6\xc4\x8a\xe1X\xd6=$H\x9a\xaes\x0b\xc1I\xa8G\xa9\xb6\x8d\x87\
    31  \xa9H\xa0@\xafe\xa7\xa8Bi\xa2\xdfs$\x19,G:\x175\xa1\x98W\x85\xc1\x9c\x1e\xcf\
    32  Mc4\x85\x9f%\xfc\xae\x93!\xd5K_\xd4\x86\xf8\xa1?\x88\x12\xf9\x00 =F\x87'
    33  }
    34
    35          tab_name = _('Vaccinations')
    36
    37 -        def name (self):
    38                  return gmVaccinationsPlugin.tab_name
    39
    40 -        def GetWidget (self, parent):
    41                  self._widget = gmVaccWidgets.cImmunisationsPanel(parent, -1)
    42                  return self._widget
    43
    44 -        def MenuInfo (self):
    45                  return ('view', _('&Vaccinations'))
    46
    47 -        def can_receive_focus(self):
    48                  # need patient
    49                  if not self._verify_patient_avail():
    50                          return None
    51                  return 1
    52  #======================================================================
    53  # main
    54  #----------------------------------------------------------------------
    55  if __name__ == "__main__":
    56          _log.SetAllLogLevels(gmLog.lData)
    57          app = wxPyWidgetTester(size = (600, 600))
    58          app.SetWidget(gmVaccWidgets.cImmunisationsPanel, -1)
    59          app.MainLoop()
    60  #======================================================================
    61  # $Log: gmVaccinationsPlugin.py,v $
    62  # Revision 1.8  2008-03-06 18:32:31  ncq
    63  # - standard lib logging only
    64  #
    65  # Revision 1.7  2007/10/12 07:28:25  ncq
    66  # - lots of import related cleanup
    67  #
    68  # Revision 1.6  2005/09/28 21:27:30  ncq
    69  # - a lot of wx2.6-ification
    70  #
    71  # Revision 1.5  2005/09/26 18:01:52  ncq
    72  # - use proper way to import wx26 vs wx2.4
    73  # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES
    74  # - time for fixup
    75  #
    76  # Revision 1.4  2004/09/18 13:56:34  ncq
    77  # - translate tab label
    78  #
    79  # Revision 1.3  2004/08/04 17:16:02  ncq
    80  # - wx.NotebookPlugin -> cNotebookPlugin
    81  # - derive cNotebookPluginOld from cNotebookPlugin
    82  # - make cNotebookPluginOld warn on use and implement old
    83  #   explicit "main.notebook.raised_plugin"/ReceiveFocus behaviour
    84  # - ReceiveFocus() -> receive_focus()
    85  #
    86  # Revision 1.2  2004/07/15 23:27:04  ncq
    87  # - typo fix
    88  #
    89  # Revision 1.1  2004/07/15 23:16:21  ncq
    90  # - refactor vaccinations GUI code into
    91  #   - gmVaccWidgets.py: layout manager independant widgets
    92  #   - gui/gmVaccinationsPlugins.py: Horst space notebook plugin
    93  #   - patient/gmPG_Immunisation.py: erstwhile Richard space patient plugin
    94  #
    95