navigate.view.main_window_content.settings_notebook.SettingsNotebook
- class navigate.view.main_window_content.settings_notebook.SettingsNotebook(frame_left: Frame, root: Tk, *args: list, **kwargs: dict)
Bases:
DockableNotebookSettings Notebook
This class is the settings notebook. It contains the following tabs: - Channels - Camera Settings - Stage Control - Multi-position Table
- __init__(frame_left: Frame, root: Tk, *args: list, **kwargs: dict) → None
Initialize the settings notebook
- Parameters:
frame_left (ttk.Frame) – Left frame of the main window
root (tk.Tk) – Root window of the main window
*args (list) – Arguments
**kwargs (dict) – Keyword arguments
Methods
__init__(frame_left, root, *args, **kwargs)Initialize the settings notebook
dismiss(tab_widget)Dismiss the popout window.
find(event)Find the widget that was clicked on.
Get absolute position of mouse.
popout()Popout the currently selected tab.
set_tablist(tab_list)Setter for tab list
Attributes
- dismiss(tab_widget)
Dismiss the popout window.
This is called when the popout window is closed. It destroys the popout window and re‐inserts the tab into the notebook.
- Parameters:
tab_widget (ttk.Frame) – The tab widget to be dismissed.
- find(event: Event) → None
Find the widget that was clicked on.
Will check if the proper widget element in the event is what we expect.
In this case its checking that the label in the tab has been selected. It then gets the proper position and calls the popup.
- Parameters:
event (tk.Event) – Tkinter event object
- get_absolute_position() → tuple
Get absolute position of mouse.
This helps the popup menu appear where the mouse is right-clicked.
- Returns:
x, y – Coordinates to be used (x, y)
- Return type:
integers
- popout() → None
Popout the currently selected tab.
Gets the currently selected tab, the tabs name and checks if the tab name is in the tab list. If the tab is in the list, it’s removed from the list, hidden, and then passed to a new Top Level window.
- set_tablist(tab_list: list) → None
Setter for tab list
- Parameters:
tab_list (list) – The list of tab variables
- camera_settings_tab
Camera settings tab
- Type:
- channels_tab
Channels tab
- Type:
- menu
Tkinter menu
- Type:
tk.Menu
- root
Tkinter root
- Type:
tk.Tk
- selected_tab_id
Selected tab id where user right-clicked.
- Type:
int
- stage_control_tab
Stage control tab
- Type:
- tab_list
List of tab variables
- Type:
list