fsleyes.actions.showcommandline
¶
This module provides the ShowCommandLineAction
class, an action
used by the CanvasPanel
class. A couple of stand-alone functions
are also defined here:
showCommandLineArgs |
Generates command line arguments which can be used to re-create the scene shown on the given CanvasPanel , and displays them to the user with a TextEditDialog . |
genCommandLineArgs |
Called by the showCommandLineArgs() function. |
-
class
fsleyes.actions.showcommandline.
ShowCommandLineAction
(overlayList, displayCtx, panel)¶ Bases:
fsleyes.actions.base.Action
The
ShowCommandLineAction
class is anaction
which is used byCanvasPanel
instances to generate a FSLeyes command line string which can be used to re-create the scene shown in the panel.-
__init__
(overlayList, displayCtx, panel)¶ Create a
ShowCommandLineAction
.Parameters: - overlayList – The
OverlayList
. - displayCtx – The
DisplayContext
. - panel – The
CanvasPanel
.
- overlayList – The
-
_ShowCommandLineAction__showCommandLineArgs
()¶ Called when this action is executed. Calls the
showCommandLineArgs()
function.
-
__module__
= 'fsleyes.actions.showcommandline'¶
-
-
fsleyes.actions.showcommandline.
showCommandLineArgs
(overlayList, displayCtx, canvas)¶ Generates command line arguments which can be used to re-create the scene shown on the given
CanvasPanel
, and displays them to the user with aTextEditDialog
.Parameters: - overlayList – A
OverlayList
. - displayCtx – A
DisplayContext
instance. - canvas – A
CanvasPanel
instance.
- overlayList – A
-
fsleyes.actions.showcommandline.
genCommandLineArgs
(overlayList, displayCtx, canvas=None)¶ Called by the
showCommandLineArgs()
function. Generates command line arguments which can be used to re-create the scene currently shown on the givenCanvasPanel
.Parameters: - overlayList – A
OverlayList
. - displayCtx – A
DisplayContext
instance. - canvas – A
CanvasPanel
instance. IfNone
, scene arguments are not generated.
Returns: A list of command line arguments.
- overlayList – A