vdat.gui.fplane – The fplane viewer¶
Panel with the focal plane
The FplaneWidget¶
-
class
vdat.gui.fplane.FplaneWidget(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QTabWidgetWidget containing the tabs showing the focal plane.
Custom signals¶ Name Signature Description sig_ifuToggledstr, bool emitted when an IFU is selected in a widget contained in this one; the id of the IFU and whether is selected ( True) or deselected (False) are passed as arguments.sig_ifuSelectedstr, bool emitted when an IFU is selected in a widget that contains this one; the id of the IFU and whether is selected ( True) or deselected (False) are passed as arguments.sig_selectAllIFUsemitted when all the IFUs are selected in a widget that contains this one sig_deselectAllIFUsemitted when all the IFUs are deselected in a widget that contains this one Custom slot¶ Name Signature Description change_fplane()str, dict Upon selecting a new directory or task, update the tabs for the directory passed as first argument according to the instruction in the dictionary passed as second argument. ifuToggled()str, bool Emit the sig_ifuToggledsignalifuSelected()str, bool Emit the sig_ifuSelectedsignalselectAllIFUs Emit the sig_selectAllIFUssignaldeselectAllIFUs Emit the sig_deselectAllIFUssignalConnections between custom signals and/or slots. If the signal or slot belongs to tab, it is connected inchange_fplane()and disconnected inempty_fplane()¶Signal Slot tab.sig_ifuToggled ifuToggled()sig_selectAllIFUstab.selectAllIFUs sig_ifuSelectedtab.ifuSelected sig_deselectAllIFUstab.deselectAllIFUs Parameters: - parent :
PyQt5.QtWidgets.QWidgetor derivate parent object of the tree view model
-
sig_ifuToggled¶
-
sig_ifuSelected¶
-
sig_selectAllIFUs¶
-
sig_deselectAllIFUs¶
-
empty_fplane()[source]¶ Loop through the current tabs and for each one of them:
- remove from the
FplaneWidget - disconnect all the signals connected in
change_fplane() - if the
use_cacheproperty isTrue, save the widget in the cache - if the
use_cacheproperty isFalse, mark the widget for deletion
- remove from the
-
change_fplane(target, task_dict)[source]¶ Clear the old tabs and create a set of new ones.
It loops through the list in the
tabssection oftask_dict, load and call the plugins implementing eachtab_type. If the plugin exists and the execution succeed, for each widget returned:- connect the
sig_selectAllIFUs,sig_deselectAllIFUsandsig_ifuSelectedsignals and theifuToggled()slot - add it as a tab
All errors when loading and calling the plugins are collected and shown before return the method. If no tab is found or no tab could be plugged in because of errors, show an overlay to notify the user.
Parameters: - target : string
path of the selected directory
- task_dict : dict
dictionary with the configuration for the tabs and buttons to display
- connect the
-
show_tab_errors(errors)[source]¶ Shows the errors into a QErrorMessage window.
Parameters: - errors : list of strings
errors to report
-
ifuToggled(id_, val)[source]¶ Emit the
sig_ifuToggledsignal. The method is also a PyQt slot.Parameters: - id_ : string
SLOTID of the ifu that is toggled
- val : bool
Trueif selected,Falseif deselected
-
ifuSelected(id_, val)[source]¶ Emit the
sig_ifuSelectedsignal. The method is also a PyQt slot.Parameters: - id_ : string
SLOTID of the ifu that is toggled
- val : bool
Trueif selected,Falseif deselected
-
selectAllIFUs()[source]¶ Emit the
sig_selectAllIFUssignal. The method is also a PyQt slot.
-
deselectAllIFUs()[source]¶ Emit the
sig_selectAllIFUssignal. The method is also a PyQt slot.
- parent :
The cache¶
-
class
vdat.gui.fplane.FplaneCache[source]¶ Cache of fplane objects.
This object allows to store and retrieve objects in dictionary of lists. Each entry has the type of the object (as provided by the user) as key and a list of object as value.