parameters: (logLevel, text, testingReturnValue, mainWindowNeeded=False, parent=None, windowTitle=None, **kwargs)
return_statement: return messageBox(text, parent=parent, windowTitle=windowTitle, **kwargs)
docstring: Displays a messagebox and logs message text; knows what to do in testing mode.
  
    :param logLevel: The level at which to log text, e.g. ``logging.INFO``, ``logging.ERROR``
    :param text: Message text
    :type text: str
    :param testingReturnValue: When the application is in testing mode, this value is returned instead of raising the message box.
    :param mainWindowNeeded: If True then the message box will not be raised if there is no mainWindow, but the text is still logged.
    :type mainWindowNeeded: bool, optional
    :param parent: The message box parent; by default it is set to main window by slicer.util.messageBox
    :type parent: QWidget, optional
    :param windowTitle: Window title; defaults to a generic title based on log level.
    :type windowTitle: str, optional
    :param kwargs: passed to :func:`messageBox`
  
    Returns:
      The output of :func:`messageBox`, with two exceptions:
      - If the application is running in testing mode, then ``testingReturnValue`` is returned.
      - Otherwise, if ``mainWindowNeeded`` is True and there is no main window, then None is returned.
docstring_summary: Displays a messagebox and logs message text; knows what to do in testing mode.
docstring_tokens: Displays a messagebox and logs message text ; knows what to do in testing mode .
function: def _messageDisplay(logLevel, text, testingReturnValue, mainWindowNeeded=False, parent=None, windowTitle=None, **kwargs):
    """Displays a messagebox and logs message text; knows what to do in testing mode.
  
    :param logLevel: The level at which to log text, e.g. ``logging.INFO``, ``logging.ERROR``
    :param text: Message text
    :type text: str
    :param testingReturnValue: When the application is in testing mode, this value is returned instead of raising the message box.
    :param mainWindowNeeded: If True then the message box will not be raised if there is no mainWindow, but the text is still logged.
    :type mainWindowNeeded: bool, optional
    :param parent: The message box parent; by default it is set to main window by slicer.util.messageBox
    :type parent: QWidget, optional
    :param windowTitle: Window title; defaults to a generic title based on log level.
    :type windowTitle: str, optional
    :param kwargs: passed to :func:`messageBox`
  
    Returns:
      The output of :func:`messageBox`, with two exceptions:
      - If the application is running in testing mode, then ``testingReturnValue`` is returned.
      - Otherwise, if ``mainWindowNeeded`` is True and there is no main window, then None is returned.
    """
    import qt, slicer, logging
    logging.log(logLevel, text)
    logLevelString = logging.getLevelName(logLevel).lower() # e.g. this is "error" when logLevel is logging.ERROR
    if not windowTitle:
      windowTitle = slicer.app.applicationName + " " + logLevelString
    if slicer.app.testingEnabled():
      logging.info("Testing mode is enabled: Returning %s and skipping message box [%s]." % (testingReturnValue, windowTitle))
      return testingReturnValue
    if mainWindowNeeded and mainWindow() is None:
      return
    return messageBox(text, parent=parent, windowTitle=windowTitle, **kwargs)
function_tokens: def _messageDisplay ( logLevel , text , testingReturnValue , mainWindowNeeded = False , parent = None , windowTitle = None , * * kwargs ) : import qt , slicer , logging logging . log ( logLevel , text ) logLevelString = logging . getLevelName ( logLevel ) . lower ( ) # e.g. this is "error" when logLevel is logging.ERROR if not windowTitle : windowTitle = slicer . app . applicationName + " " + logLevelString if slicer . app . testingEnabled ( ) : logging . info ( "Testing mode is enabled: Returning %s and skipping message box [%s]." % ( testingReturnValue , windowTitle ) ) return testingReturnValue if mainWindowNeeded and mainWindow ( ) is None : return return messageBox ( text , parent = parent , windowTitle = windowTitle , * * kwargs )