PyLeftMenu#
- class ansys.aedt.toolkits.common.ui.utils.widgets.py_left_menu.py_left_menu.PyLeftMenu(parent=None, app_parent=None, dark_one='#1b1e23', dark_three='#21252d', dark_four='#272c36', bg_one='#2c313c', icon_color='#c3ccdf', icon_color_hover='#dce1ec', icon_color_pressed='#edf0f5', icon_color_active='#f5f6f9', context_color='#568af2', text_foreground='#8a95aa', text_active='#dce1ec', radius=8, minimum_width=50, maximum_width=240, icon_path='icon_menu.svg', icon_path_close='icon_menu_close.svg', toggle_text='Hide Menu', toggle_tooltip='Show menu')[source]#
Custom widget representing a left menu with toggle button, top and bottom layouts, and animated toggle behavior.
- Parameters:
- parent: QWidget, optional
The parent widget.
- app_parent: QWidget, optional
The parent widget of the application.
- dark_one: str, optional
Color representing a dark shade.
- dark_three: str, optional
Color representing a darker shade.
- dark_four: str, optional
Color representing an even darker shade.
- bg_one: str, optional
Background color of the left menu.
- icon_color: str, optional
Color of the icons in the left menu.
- icon_color_hover: str, optional
Color of the icons when hovered.
- icon_color_pressed: str, optional
Color of the icons when pressed.
- icon_color_active: str, optional
Color of the icons in an active state.
- context_color: str, optional
Color representing a context or active state.
- text_foreground: str, optional
Color of the text in the left menu.
- text_active: str, optional
Color of the text in an active state.
- radius: int, optional
Border radius of the left menu.
- minimum_width: int, optional
Minimum width of the left menu. The default is
50
.- maximum_width: int, optional
Maximum width of the left menu. The default is
240
.- icon_path: str, optional
Path to the icon image file for the toggle button.
- icon_path_close: str, optional
Path to the icon image file for the toggle button when the menu is closed.
- toggle_text: str, optional
Text for the toggle button.
- toggle_tooltip: str, optional
Tooltip text for the toggle button.
- add_menus(parameters)[source]#
Add menus to the left menu.
- Parameters:
- parameters: list
List of dictionaries containing parameters for each menu item.
- select_only_one(widget: str)[source]#
Set the active state for a specific menu button and deactivate others.
- Parameters:
- widget
str
ID of the menu button to set as active.
- widget