How to use the envisage.ui.action.api.Action function in envisage

To help you get started, we’ve selected a few envisage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enthought / envisage / examples / plugins / workbench / AcmeLabUsingEggs / src / acme.workbench / acme / workbench / test_action_set.py View on Github external
menus = [
        Menu(name="&Test", path="MenuBar", groups=["XGroup", "YGroup"]),
        Menu(name="Foo", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
        Menu(name="Bar", path="MenuBar/Test", groups=["XGroup", "YGroup"]),
    ]

    groups = [Group(id="Fred", path="MenuBar/Test")]

    tool_bars = [
        ToolBar(name="Fred", groups=["AToolBarGroup"]),
        ToolBar(name="Wilma"),
        ToolBar(name="Barney"),
    ]

    actions = [
        Action(
            path="MenuBar/Test",
            group="Fred",
            class_name="envisage.ui.workbench.action.api:AboutAction",
        ),
        Action(
            path="ToolBar",
            class_name="envisage.ui.workbench.action.api:AboutAction",
        ),
        Action(
            path="ToolBar",
            class_name="envisage.ui.workbench.action.api:ExitAction",
        ),
        Action(
            path="ToolBar/Fred",
            group="AToolBarGroup",
            class_name="envisage.ui.workbench.action.api:AboutAction",
github enthought / envisage / examples / plugins / workbench / AcmeLab / acme / workbench / test_action_set.py View on Github external
class_name="envisage.ui.workbench.action.api:AboutAction",
        ),
        Action(
            path="ToolBar",
            class_name="envisage.ui.workbench.action.api:ExitAction",
        ),
        Action(
            path="ToolBar/Fred",
            group="AToolBarGroup",
            class_name="envisage.ui.workbench.action.api:AboutAction",
        ),
        Action(
            path="ToolBar/Wilma",
            class_name="envisage.ui.workbench.action.api:AboutAction",
        ),
        Action(
            path="ToolBar/Barney",
            class_name="envisage.ui.workbench.action.api:ExitAction",
        ),
    ]

    #### 'WorkbenchActionSet' interface #######################################

    # The Ids of the perspectives that the action set is enabled in.
    enabled_for_perspectives = ["Foo"]

    # The Ids of the perspectives that the action set is visible in.
    visible_for_perspectives = ["Foo", "Bar"]
github LTS5 / connectomeviewer / cviewer / plugins / codeoracle / oracle_action_set.py View on Github external
# Modified BSD License

# Enthought library imports
from envisage.ui.action.api import Action, Group, Menu, ToolBar
from envisage.ui.workbench.api import WorkbenchActionSet



networkrepo = Action(
    id            = "OracleCNetworkReport",
    class_name    = "cviewer.plugins.codeoracle.actions.NetworkReport",
    name          = "Network Report",
    path          = "MenuBar/Code Oracle/Connectome/CNetwork/Analysis"
)

xnat_pushpull = Action(
    id            = "OracleXNATPushPull",
    class_name    = "cviewer.plugins.codeoracle.actions.XNATPushPull",
    name          = "XNAT Push and Pull",
    path          = "MenuBar/Code Oracle/Other/XNAT"
)

show_surface = Action(
    id            = "OracleCSurface",
    class_name    = "cviewer.plugins.codeoracle.actions.ShowSurfaces",
    name          = "Show Surface",
    path          = "MenuBar/Code Oracle/Connectome/CSurface/Visualization"
)

show_volumecre = Action(
    id            = "OracleCVolumeCre",
    class_name    = "cviewer.plugins.codeoracle.actions.ShowVolumes",
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
group = "MayaviFileGroup",
    path="MenuBar/File",
)

run_script = Action(
    id            = "RunScript",
    class_name    = ID + ".action.save_load.RunScript",
    name          = "&Run Python Script",
    group = "MayaviFileGroup",
    path="MenuBar/File",
)

########################################
# Visualize menu items.

add_mm = Action(
    id            = "AddModuleManager",
    class_name    = ID + ".action.modules.AddModuleManager",
    name          = "&Add ModuleManager",
    path="MenuBar/VisualizeMenu",
    after="FiltersMenu"
)

########################################
# Modules.

MODULE_ACTIONS = []
for module in registry.modules:
    action = Action(id=module.id,
                    class_name=ID + ".action.modules." + module.id,
                    name= module.menu_name,
                    group = "ModulesGroup",
github enthought / mayavi / tvtk / plugins / scene / ui / scene_ui_action_set.py View on Github external
save_scene_to_png = Action(
    class_name = PKG + '.actions.SaveSceneToPNG',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_jpeg = Action(
    class_name = PKG + '.actions.SaveSceneToJPEG',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_bmp = Action(
    class_name = PKG + '.actions.SaveSceneToBMP',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_tiff = Action(
    class_name = PKG + '.actions.SaveSceneToTIFF',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_ps = Action(
    class_name = PKG + '.actions.SaveSceneToPS',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_gl2ps = Action(
    class_name = PKG + '.actions.SaveSceneToGL2PS',
    path       = 'MenuBar/File/SaveSceneAs'
)

save_scene_to_rib = Action(
    class_name = PKG + '.actions.SaveSceneToRIB',
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
filters_menu = Menu(
    id     = "FiltersMenu",
    name   = "&Filters",
    path="MenuBar/VisualizeMenu",
    after="ModulesMenu",
)

########################################
# File menu items.

ID = 'mayavi'

####################
# Source actions.

open_file = Action(
    id            = "OpenFile",
    class_name    = ID + ".action.sources.OpenFile",
    name          = "&Open file ...",
    path        =  "MenuBar/File/LoadDataMenu"
)

# Automatic source generation for non-open file related sources.
SOURCE_ACTIONS = [open_file]

for src in registry.sources:
    if len(src.extensions) == 0:
        action = Action(id=src.id,
                        class_name=ID + ".action.sources." + src.id,
                        name= src.menu_name,
                        path="MenuBar/File/LoadDataMenu"
                        )
github enthought / envisage / envisage / ui / single_project / project_action_set.py View on Github external
Action(
            class_name=PKG + ".action.api:NewProjectAction",
            group="OpenGroup",
            path="MenuBar/File/ProjectMenu",
        ),
        Action(
            class_name=PKG + ".action.api:OpenProjectAction",
            group="OpenGroup",
            path="MenuBar/File/ProjectMenu",
        ),
        Action(
            class_name=PKG + ".action.api:SaveProjectAction",
            group="SaveGroup",
            path="MenuBar/File/ProjectMenu",
        ),
        Action(
            class_name=PKG + ".action.api:SaveAsProjectAction",
            group="SaveGroup",
            path="MenuBar/File/ProjectMenu",
        ),
        Action(
            class_name=PKG + ".action.api:CloseProjectAction",
            group="CloseGroup",
            path="MenuBar/File/ProjectMenu",
        ),
        # Toolbar actions.
        Action(
            class_name=PKG + ".action.api:SwitchToAction",
            group="PerspectiveGroup",
            path="ToolBar/Project",
        ),
        Action(
github enthought / mayavi / mayavi / plugins / mayavi_ui_action_set.py View on Github external
# Automatic source generation for non-open file related sources.
SOURCE_ACTIONS = [open_file]

for src in registry.sources:
    if len(src.extensions) == 0:
        action = Action(id=src.id,
                        class_name=ID + ".action.sources." + src.id,
                        name= src.menu_name,
                        path="MenuBar/File/LoadDataMenu"
                        )
        SOURCE_ACTIONS.append(action)

####################
# Save/load actions.

save_viz = Action(
    id            = "SaveVisualization",
    class_name    = ID + ".action.save_load.SaveVisualization",
    name          = "&Save Visualization",
    group = "MayaviFileGroup",
    path="MenuBar/File",
)

load_viz = Action(
    id            = "LoadVisualization",
    class_name    = ID + ".action.save_load.LoadVisualization",
    name          = "&Load Visualization",
    group = "MayaviFileGroup",
    path="MenuBar/File",
)

run_script = Action(
github LTS5 / connectomeviewer / cviewer / plugins / codeoracle / oracle_action_set.py View on Github external
simple_connection_matrix = Action(
    id            = "OracleCNetworkSimpleMat",
    class_name    = "cviewer.plugins.codeoracle.actions.SimpleConnectionMatrix",
    name          = "Simple Connection Matrix",
    path          = "MenuBar/Code Oracle/Connectome/CNetwork/Visualization"
)

writegexf = Action(
    id            = "OracleCNetworkWriteGEXF",
    class_name    = "cviewer.plugins.codeoracle.actions.WriteGEXF",
    name          = "Write Gephi GEXF",
    path          = "MenuBar/Code Oracle/Connectome/CNetwork/Analysis"
)

compute_nbs = Action(
    id            = "OracleNBS",
    class_name    = "cviewer.plugins.codeoracle.actions.ComputeNBS",
    name          = "Network-based statistic (NBS)",
    path          = "MenuBar/Code Oracle/Statistics"
)

show_tracks = Action(
    id            = "OracleShowTracks",
    class_name    = "cviewer.plugins.codeoracle.actions.ShowTracks",
    name          = "Tracks between regions",
    path          = "MenuBar/Code Oracle/Connectome/CTrack/Visualization"
)

cortico_cortico = Action(
    id            = "OracleCorticoCorticoTracks",
    class_name    = "cviewer.plugins.codeoracle.actions.CorticoCortico",
github LTS5 / connectomeviewer / cviewer / plugins / codeoracle / oracle_action_set.py View on Github external
writegexf = Action(
    id            = "OracleCNetworkWriteGEXF",
    class_name    = "cviewer.plugins.codeoracle.actions.WriteGEXF",
    name          = "Write Gephi GEXF",
    path          = "MenuBar/Code Oracle/Connectome/CNetwork/Analysis"
)

compute_nbs = Action(
    id            = "OracleNBS",
    class_name    = "cviewer.plugins.codeoracle.actions.ComputeNBS",
    name          = "Network-based statistic (NBS)",
    path          = "MenuBar/Code Oracle/Statistics"
)

show_tracks = Action(
    id            = "OracleShowTracks",
    class_name    = "cviewer.plugins.codeoracle.actions.ShowTracks",
    name          = "Tracks between regions",
    path          = "MenuBar/Code Oracle/Connectome/CTrack/Visualization"
)

cortico_cortico = Action(
    id            = "OracleCorticoCorticoTracks",
    class_name    = "cviewer.plugins.codeoracle.actions.CorticoCortico",
    name          = "Extract cortico-cortico fiber tracks",
    path          = "MenuBar/Code Oracle/Connectome/CTrack/Analysis"
)


nipype_bet = Action(
    id            = "OracleNipypeBet",