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.QMenu
A menu that removes the exposures matching the
path
and create a list of actions¶ Name Signature Description sig_exposure_removed
str emitted when an exposure is removed; the value is the expname
from the database¶ Name Signature Description enable_on_selection()
str, str save the first string into a path
attributeabout_to_show_slot()
dynamically adds actions to the menu just before showing it remove_exposure()
PyQt5.QtWidgets.QAction
receive 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 ¶ Signal Slot RemoveExposuresMenu.aboutToShow
about_to_show_slot()
RemoveExposuresMenu.triggered
remove_exposure()
-
sig_exposure_removed
¶
-
path
¶ Path where the exposures to remove are located. When setting a non
None
path, the menu is activated; when setting aNone
path 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.QAction
Quit action to plug in menus or toolbars.
Set the icon to
window-close
, the text toQuit
and the shortcut toCtrl+Q
.¶ Signal Slot triggered
connect_to
, if presentParameters: - connect_to : signal or slot, optional
if present connect the
triggered
- parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the menu’ bar
-
class
vdat.gui.menus_actions.
HelpMenu
(parent=None, windows_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenu
Create a menu with the various help actions.
Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the menu
- help_parent :
PyQt5.QtWidgets.QWidget
instance, 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.HelpWindow
¶ Name Signature Description show_handbook()
Create a vdat.gui.help_window.HelpWindow
and show it¶ Signal Slot triggered
show_handbook()
Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.
VDATLinksAction
(parent=None, window_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QAction
Show links with the online VDAT documentation.
¶ Name Signature Description show_links()
Create a QMessageBox
showing the links¶ Signal Slot triggered
show_links()
Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.
VDATAboutAction
(parent=None, window_parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QAction
Show a short “about” VDAT. It Shows
vdat.gui.help_window.HelpWindow
¶ Name Signature Description show_about()
Create a QMessageBox
showing some information about authors and such¶ Signal Slot triggered
show_about()
Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the action
- window_parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the help window
- parent :
-
class
vdat.gui.menus_actions.
LogAction
(fname, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QAction
Action about the log files
Parameters: - fname : string
name of the file to open
- parent :
PyQt5.QtWidgets.QWidget
instance, 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.QMainWindow
Editor window used to display log files.
¶ Name Signature Description load_file()
Load the file and disable the refresh action enable_refresh()
string Enable the refresh button ¶ Signal Slot refresh.triggered
load_file()
watcher.fileChanged
enable_refresh()
Parameters: - file_names : string
file to display
- parent :
PyQt5.QtWidgets.QWidget
or 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.QMenu
Create a menu with actions related with log files.
¶ Name Signature Description open_log_file()
LogAction
open the selected log file in a read-only window ¶ Signal Slot triggered
of the log files menuopen_log_file()
Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the menu
- parent :
-
class
vdat.gui.menus_actions.
TreeViewMenu
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMenu
Menu to collapse/expand the tree view
Create the menu with the entries to expand/collapse the menu
¶ Name Signature Description sig_collapse
emitted when the “Collapse” action is triggered sig_expand
emitted when the “Expand” action is triggered Parameters: - parent :
PyQt5.QtWidgets.QWidget
instance, optional parent of the menu
-
sig_collapse
¶
-
sig_expand
¶
- parent :