vdat.gui.fplane
– The fplane viewer¶
Panel with the focal plane
The FplaneWidget¶
-
class
vdat.gui.fplane.
FplaneWidget
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QTabWidget
Widget containing the tabs showing the focal plane.
¶ Name Signature Description sig_ifuToggled
str, 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_ifuSelected
str, 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_selectAllIFUs
emitted when all the IFUs are selected in a widget that contains this one sig_deselectAllIFUs
emitted when all the IFUs are deselected in a widget that contains this one ¶ 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_ifuToggled
signalifuSelected()
str, bool Emit the sig_ifuSelected
signalselectAllIFUs Emit the sig_selectAllIFUs
signaldeselectAllIFUs Emit the sig_deselectAllIFUs
signal¶ Signal Slot tab.sig_ifuToggled ifuToggled()
sig_selectAllIFUs
tab.selectAllIFUs sig_ifuSelected
tab.ifuSelected sig_deselectAllIFUs
tab.deselectAllIFUs Parameters: - parent :
PyQt5.QtWidgets.QWidget
or 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_cache
property isTrue
, save the widget in the cache - if the
use_cache
property 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
tabs
section 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_deselectAllIFUs
andsig_ifuSelected
signals 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_ifuToggled
signal. The method is also a PyQt slot.Parameters: - id_ : string
SLOTID of the ifu that is toggled
- val : bool
True
if selected,False
if deselected
-
ifuSelected
(id_, val)[source]¶ Emit the
sig_ifuSelected
signal. The method is also a PyQt slot.Parameters: - id_ : string
SLOTID of the ifu that is toggled
- val : bool
True
if selected,False
if deselected
-
selectAllIFUs
()[source]¶ Emit the
sig_selectAllIFUs
signal. The method is also a PyQt slot.
-
deselectAllIFUs
()[source]¶ Emit the
sig_selectAllIFUs
signal. 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.