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 theDisplayContext.displaySpace
is set to a value that matches thewarnCondition
passed to__init__
, the warning message and button are shown, otherwise the entire panel is hidden. When the user pushes the button, thedisplaySpace
is changed to the value specified bychangeTo
.-
__init__
(parent, overlayList, displayCtx, frame, msg, warnCondition, changeTo)¶ Create a
DisplaySpaceWarning
.- Parameters
parent –
wx
parent objectoverlayList – 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 thedisplaySpace
to that specified by thechangeTo
argument passed to__init__()
.
-
__module__
= 'fsleyes.controls.displayspacewarning'¶
-