fsleyes.controls.displayspacewarning

This module provides the DisplaySpaceWarning, a FSLeyes control widget which displays a warning when the DisplayContext.displaySpace has a value which is preventing the user from seeing or doing something.

class fsleyes.controls.displayspacewarning.DisplaySpaceWarning(parent, overlayList, displayCtx, frame, msg, warnCondition, changeTo)

Bases: fsleyes.panel.FSLeyesPanel

The DisplaySpaceWarning is a panel which contains a message and a button. When the DisplayContext.displaySpace is set to a value that matches the warnCondition passed to __init__, the warning message and button are shown, otherwise the entire panel is hidden. When the user pushes the button, the displaySpace is changed to the value specified by changeTo.

__init__(parent, overlayList, displayCtx, frame, msg, warnCondition, changeTo)

Create a DisplaySpaceWarning.

Parameters
  • parentwx parent object

  • overlayList – The OverlayList

  • displayCtx – The DisplayContext

  • frame – The FSLeyesFrame

  • msg – Message to display

  • warnCondition – One of 'world', 'overlay', 'not overlay', or 'not like overlay'

  • changeTo – One of 'world' or 'overlay'

destroy()

Must be called when this DisplaySpaceWarning is no longer needed. De-registers listeners.

_DisplaySpaceWarning__displaySpaceChanged(*a)

Called when the DisplayContext.displaySpace property changes. If it has been given a setting that would cause the transformation changes to have no effect on the display, a warning message is shown.

_DisplaySpaceWarning__onChangeDS(ev)

Called when the Change display space button is pushed. This button is only shown if the DisplayContext.displaySpace is set to something which causes the transformation change to have no effect on the display. This method changes the displaySpace to that specified by the changeTo argument passed to __init__().

__module__ = 'fsleyes.controls.displayspacewarning'