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(*args, **kwargs)[source]
Bases:
ActionThe
ShowCommandLineActionclass is anactionwhich is used byCanvasPanelinstances 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.
- __annotations__ = {}
- __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
DisplayContextinstance.canvas – A
CanvasPanelinstance.
- 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
DisplayContextinstance.canvas – A
CanvasPanelinstance. IfNone, scene arguments are not generated.
- Returns:
A list of command line arguments.