vdat.gui.menus_actions – Custom menus and actions¶
Module that implements custom menus and action
-
class
vdat.gui.menus_actions.RemoveExposuresMenu(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenuA menu that removes the exposures matching the
pathand create a list of actionsCustom signals¶ Name Signature Description sig_exposure_removedstr emitted when an exposure is removed; the value is the expnamefrom the databaseCustom slot¶ Name Signature Description enable_on_selection()str, str save the first string into a pathattributeabout_to_show_slot()dynamically adds actions to the menu just before showing it remove_exposure()PyQt5.QtWidgets.QActionreceive the triggered action, using its object name find the basename, remove files with that basename and the corresponding entry in the database and in the exposure file Connections between custom signals and/or slots¶ Signal Slot RemoveExposuresMenu.aboutToShowabout_to_show_slot()RemoveExposuresMenu.triggeredremove_exposure()-
sig_exposure_removed¶
-
path¶ Path where the exposures to remove are located. When setting a non
Nonepath, the menu is activated; when setting aNonepath or the path gets deleted, the menu is deactivated
-
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, ignored
-
-
class
vdat.gui.menus_actions.QuitAction(connect_to=None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QActionQuit action to plug in menus or toolbars.
Set the icon to
window-close, the text toQuitand the shortcut toCtrl+Q.Connections between custom signals and/or slots¶ Signal Slot triggeredconnect_to, if presentParameters: - connect_to : signal or slot, optional
if present connect the
triggered- parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the menu’ bar
-
class
vdat.gui.menus_actions.HelpMenu(parent=None, windows_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenuCreate a menu with the various help actions.
Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the menu
- help_parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the windows opened by the actions in this menu
- parent :
-
class
vdat.gui.menus_actions.HandbookAction(parent=None, window_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QAction“Show Handbook” action. It Shows
vdat.gui.help_window.HelpWindowCustom slot¶ Name Signature Description show_handbook()Create a vdat.gui.help_window.HelpWindowand show itConnections between custom signals and/or slots¶ Signal Slot triggeredshow_handbook()Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.VDATLinksAction(parent=None, window_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QActionShow links with the online VDAT documentation.
Custom slot¶ Name Signature Description show_links()Create a QMessageBoxshowing the linksConnections between custom signals and/or slots¶ Signal Slot triggeredshow_links()Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.VDATAboutAction(parent=None, window_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QActionShow a short “about” VDAT. It Shows
vdat.gui.help_window.HelpWindowCustom slot¶ Name Signature Description show_about()Create a QMessageBoxshowing some information about authors and suchConnections between custom signals and/or slots¶ Signal Slot triggeredshow_about()Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.LogAction(fname, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QActionAction about the log files
Parameters: - fname : string
name of the file to open
- parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the menu
Attributes: - fname : string
name of the file to open
-
class
vdat.gui.menus_actions.LogViewerWindow(file_name, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindowEditor window used to display log files.
Custom slot¶ Name Signature Description load_file()Load the file and disable the refresh action enable_refresh()string Enable the refresh button Connections between custom signals and/or slots.¶ Signal Slot refresh.triggeredload_file()watcher.fileChangedenable_refresh()Parameters: - file_names : string
file to display
- parent :
PyQt5.QtWidgets.QWidgetor derivate parent object of the tree view model
Attributes: - file_name : string
name of the file to display
- text_edit :
PyQt5.QtWidgets.QTextEdit display the text
- refresh :
PyQt5.QtWidgets.QAction action to refresh the content
- watcher :
PyQt5.QtCore.QFileSystemWatcher file watcher
-
class
vdat.gui.menus_actions.LogMenu(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenuCreate a menu with actions related with log files.
Custom slot¶ Name Signature Description open_log_file()LogActionopen the selected log file in a read-only window Connections between custom signals and/or slots.¶ Signal Slot triggeredof the log files menuopen_log_file()Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the menu
- parent :
-
class
vdat.gui.menus_actions.TreeViewMenu(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenuMenu to collapse/expand the tree view
Create the menu with the entries to expand/collapse the menu
Custom signals¶ Name Signature Description sig_collapseemitted when the “Collapse” action is triggered sig_expandemitted when the “Expand” action is triggered Parameters: - parent :
PyQt5.QtWidgets.QWidgetinstance, optional parent of the menu
-
sig_collapse¶
-
sig_expand¶
- parent :