vdat.gui.menubar – The menu bar

class vdat.gui.menubar.VDATMenuBar(parent=None)[source]

Bases: PyQt5.QtWidgets.QMenuBar

Menu bar of the main VDAT window

Custom signals
Name Signature Description
sig_close   Emitted when the user click on the “Quit” action
sig_symlink   Emitted when the user click on the “symlink” action
sig_selectAll, sig_selectNone   Emitted when the actions to select or deselect all the IFUs are clicked
sig_remove_files list, list Emitted when one of the remove file options are clicked. The arguments are a list of directories containing the files to remove and a list of file names/wildcards to remove
sig_clear_log   Emitted when the user click ‘Clear the log window’ button
sig_collapse   emitted when the “Reduction Browser“‘s “Collapse” action is triggered
sig_expand   emitted when the “Reduction Browser“‘s “Expand” action is triggered
Custom slot
Name Signature Description
enableSymlink() bool whether to enable or not the symlink action
enable_on_selection() str, str save the first string into a path attribute and enabled all the actions disabled at startup
clear_files_slot()   If a directory is selected, get the current selected directory and the wildcards/filenames and emit the sig_remove_files signal
clear_all_files_slot()   Get all the directories from the database and the wildcards/filenames and emit the sig_remove_files signal
clear_thumb_slot()   If a directory is selected, get the thumbnail directory under it and emit the sig_remove_files signal with ‘*’ as wildcard
clear_all_thumb_slot()   Get all the thumbnail directories and emit the sig_remove_files signal with ‘*’ as wildcard
Connections between custom signals and/or slots
Signal Slot
triggered signal of the self.clear_files action clear_files_slot()
triggered signal of the self.clear_all_files action clear_all_files_slot()
triggered signal of the self.clear_thumb action clear_thumb_slot()
triggered signal of the self.clear_all_thumb action clear_all_thumb_slot()
sig_clear_log menus_actions.LogMenu.clear_log.triggered
sig_collapse menus_actions.TreeViewMenu.sig_collapse
sig_expand menus_actions.TreeViewMenu.sig_expand
Parameters:
parent : PyQt5.QtWidgets.QWidget instance

parent of the menu’ bar

sig_close
sig_selectAll
sig_selectNone
sig_remove_files
sig_clear_log
sig_collapse
sig_expand
enable_on_selection(path, typ)[source]

Save the path and the type and enable disabled actions when the path is non-null.

Parameters:
path : string

a path, usually the directory selected in three view

typ : string

type of the path

create_file()[source]

Create and fill the “File” menu

Returns:
view_menu : PyQt5.QtWidgets.QMenu

menu for the “View” entry

deletions(menu)[source]

Create deletion actions and add them to the menu

Parameters:
menu : PyQt5.QtWidgets.QMenu

menu to which the action must be added

Returns:
menu

input menu

clear_files_slot()[source]

Get the current directory and the wildcards/filenames and emit the sig_remove_files signal

clear_all_files_slot()[source]

Get all the directories and the wildcards/filenames and emit the sig_remove_files signal

clear_thumb_slot()[source]

Get the thumbnail dir under current directory and emit a sig_remove_files signal matching every file

clear_all_thumb_slot()[source]

Get all the thumbnail directories and emit the sig_remove_files signal matching every file

create_view()[source]

Create and fill the “View” menu

Returns:
view_menu : PyQt5.QtWidgets.QMenu

menu for the “View” entry

create_select()[source]

Create and fill the “Select” menu

Parameters:
fplane : vdat.gui.FplaneWidget

instance of fplate to connect to the buttons for selection

Returns:
select_menu : PyQt5.QtWidgets.QMenu

menu for the “Select” entry