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)[source]¶ Bases:
fsleyes.panel.FSLeyesPanelThe
DisplaySpaceWarningis a panel which contains a message and a button. When theDisplayContext.displaySpaceis set to a value that matches thewarnConditionpassed to__init__, the warning message and button are shown, otherwise the entire panel is hidden. When the user pushes the button, thedisplaySpaceis changed to the value specified bychangeTo.-
__init__(parent, overlayList, displayCtx, frame, msg, warnCondition, changeTo)[source]¶ Create a
DisplaySpaceWarning.- Parameters
parent –
wxparent objectoverlayList – The
OverlayListdisplayCtx – The
DisplayContextframe – The
FSLeyesFramemsg – Message to display
warnCondition – One of
'world','overlay','not overlay', or'not like overlay'changeTo – One of
'world'or'overlay'
-
destroy()[source]¶ Must be called when this
DisplaySpaceWarningis no longer needed. De-registers listeners.
-
__displaySpaceChanged(*a)¶ Called when the
DisplayContext.displaySpaceproperty 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.
-
__onChangeDS(ev)¶ Called when the Change display space button is pushed. This button is only shown if the
DisplayContext.displaySpaceis set to something which causes the transformation change to have no effect on the display. This method changes thedisplaySpaceto that specified by thechangeToargument passed to__init__().
-
__module__= 'fsleyes.controls.displayspacewarning'¶
-