Gnumed.wxpython.gui.gmMeasurementsGridPlugin

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

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

     1  # -*- coding: utf-8 -*-
     2  #======================================================================
     3  # GNUmed patient measurements plugin
     4  #
     5  # @copyright: author
     6  #======================================================================
     7  __author__ = "Karsten Hilbert"
     8  __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
     9
    10  import logging
    11
    12
    13  from Gnumed.wxpython import gmPlugin, gmMeasurementWidgets
    14  from Gnumed.pycommon import gmI18N
    15  from Gnumed.wxpython import gmAccessPermissionWidgets
    16
    17
    18  _log = logging.getLogger('gm.ui')
    19  #======================================================================
    20 -class gmMeasurementsGridPlugin(gmPlugin.cNotebookPlugin):
    21          """Plugin to encapsulate patient measurements."""
    22
    23          tab_name = _('Measurements')
    24          required_minimum_role = 'full clinical access'
    25
    26          @gmAccessPermissionWidgets.verify_minimum_required_role (
    27                  required_minimum_role,
    28                  activity = _('loading plugin <%s>') % tab_name,
    29                  return_value_on_failure = False,
    30                  fail_silently = False
    31          )
    32 -        def register(self):
    33                  gmPlugin.cNotebookPlugin.register(self)
    34          #-------------------------------------------------
    35 -        def name (self):
    36                  return gmMeasurementsGridPlugin.tab_name
    37
    38 -        def GetWidget (self, parent):
    39                  self._widget = gmMeasurementWidgets.cMeasurementsPnl(parent, -1)
    40                  return self._widget
    41
    42 -        def MenuInfo (self):
    43                  return ('emr', _('&Measurements'))
    44
    45 -        def can_receive_focus(self):
    46                  if not self._verify_patient_avail():
    47                          return None
    48                  return 1
    49  #======================================================================
    50  # main
    51  #----------------------------------------------------------------------
    52  if __name__ == "__main__":
    53          print "no test code"
    54
    55  #======================================================================
    56