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:
Generates command line arguments which can be used to re-create the scene shown on the given |
|
Called by the |
-
class
fsleyes.actions.showcommandline.
ShowCommandLineAction
(overlayList, displayCtx, panel)[source]¶ 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)[source]¶ Create a
ShowCommandLineAction
.- Parameters
overlayList – The
OverlayList
.displayCtx – The
DisplayContext
.panel – The
CanvasPanel
.
-
__showCommandLineArgs
()¶ Called when this action is executed. Calls the
showCommandLineArgs()
function.
-
__module__
= 'fsleyes.actions.showcommandline'¶
-
-
fsleyes.actions.showcommandline.
showCommandLineArgs
(overlayList, displayCtx, canvas)[source]¶ 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.
-
fsleyes.actions.showcommandline.
genCommandLineArgs
(overlayList, displayCtx, canvas=None)[source]¶ 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.