open_viewmin.filter_tree_plot_Qt.menus.menu_utilities

open_viewmin.filter_tree_plot_Qt.menus.menu_utilities#

Utilities for using and editing Qt menus

Functions#

get_menu(parent, title)

Get menu by title

get_menu_action(parent, label)

Get menu action by label

get_menus(plotter)

Get list of plotter's menus

remove_menu_action(parent, label)

Remove action from menu

Module Contents#

get_menu(parent, title)#

Get menu by title

Parameters:
  • parent (qtpy.QtWidgets.QWidget)

  • title (str)

Return type:

qtpy.QtWidgets.QMenu

get_menu_action(parent, label)#

Get menu action by label

Parameters:
  • parent (qtpy.QtWidgets.QMenu)

  • label (str)

Return type:

qtpy.QtWidgets.QMenu | qtpy.QtWidgets.QAction

get_menus(plotter)#

Get list of plotter’s menus

Parameters:

plotter (FilterTreePlotQt)

Return type:

list[qtpy.QtWidgets.QMenu]

remove_menu_action(parent, label)#

Remove action from menu

Parameters:
  • parent (qtpy.QtWidgets.QMenu)

  • label (str) – menu action’s label