Public Member Functions | |
def | __init__ |
def | request_viewport |
def | clear_layout |
def | populate_menu |
def | get_parents |
def | add_menu_item |
Public Attributes | |
layout | |
log | |
translate | |
ext_mgr | |
Static Public Attributes | |
tuple | viewport_requested = QtCore.pyqtSignal(str) |
Member Function Documentation
def commotion_client.GUI.menu_bar.MenuBar.add_menu_item | ( | self, | |
parent | |||
) |
Creates and returns a single top level menu item with cascading sub-menu items. Args: parent (string): The "parent" the top level menu item that is being requested. Returns: A tuple containing a top level button and its hidden sub-menu items.
References commotion_client.GUI.menu_bar.MenuBar.request_viewport(), commotion_client.GUI.menu_bar.MenuBar.translate, commotion_client.extensions.config_editor.main.ViewPort.translate, commotion_client.GUI.main_window.MainWindow.translate, commotion_client.GUI.extension_toolbar.ExtensionToolBar.translate, commotion_client.GUI.extension_toolbar.MenuItem.translate, and commotion_client.commotion_client.CommotionClientApplication.translate.
Referenced by commotion_client.GUI.menu_bar.MenuBar.populate_menu().
def commotion_client.GUI.menu_bar.MenuBar.clear_layout | ( | self, | |
layout | |||
) |
Clears a layout of all widgets. Args: layout (QLayout): A QLayout object that needs to be cleared of all objects.
References commotion_client.GUI.menu_bar.MenuBar.clear_layout().
Referenced by commotion_client.GUI.menu_bar.MenuBar.clear_layout(), and commotion_client.GUI.menu_bar.MenuBar.populate_menu().
def commotion_client.GUI.menu_bar.MenuBar.get_parents | ( | self, | |
extension_list | |||
) |
Gets all unique parents from a list of extensions. This function gets the "parent" menu items from a list of extensions and returns a list of the unique members. Args: extension_list (list): A list containing a set of strings that list the names of extensions. Returns: A list of all the unique parents of the given extensions. ['parent item 01', 'parent item 02']
References commotion_client.GUI.menu_bar.MenuBar.translate, commotion_client.extensions.config_editor.main.ViewPort.translate, commotion_client.GUI.main_window.MainWindow.translate, commotion_client.GUI.extension_toolbar.ExtensionToolBar.translate, commotion_client.GUI.extension_toolbar.MenuItem.translate, and commotion_client.commotion_client.CommotionClientApplication.translate.
Referenced by commotion_client.GUI.menu_bar.MenuBar.populate_menu().