foxsi / GSE-FOXSI-4

GSE for calibration and flight operation of FOXSI-4
Other
0 stars 1 forks source link

Clean up GUI #3

Open thanasipantazides opened 1 year ago

thanasipantazides commented 1 year ago

Stuff to add

Currently, the GUI looks like this:

Screenshot 2023-02-07 at 4 55 43 PM

And it does very little. Need to add functionality to existing UI elements, plus more elements.

thanasipantazides commented 1 year ago

Also:

thanasipantazides commented 1 year ago

Ok, now it can look like this (on a laptop screen, at night):

Screenshot 2023-04-10 at 9 15 19 PM

The Focus detector yields a popup window like this:

Screenshot 2023-04-10 at 9 18 29 PM

but the tabs besides Plot show nothing. This is achieved by reparenting DetectorPanel to a new parentless widget GSEPopout which contains a QTabWidget.

Options for moving forward:

There are a couple ways to move forward with populating the table view (for strips or pixels), parameters view (for general detector parameter setting), and other detector data views:

  1. Don't reparent DetectorPanel to GSEPopout, just reparent a composite widget for its plot (possibly its QGroupBox). Then, add more composite widgets to DetectorPanel—one for each tab view in GSEPopout. Call .hide() on them on __init__() and .show() them when the popout is created. This way, all detector-specific data and interfaces are under DetectorPanel.
  2. Create standalone DetectorPlotView (e.g.), DetectorStripTableView, etc classes for each tab and instantiate them as needed from GSEPopout or DetectorGridView. They can all inherit from a common DetectorBackend which persists across the application and handles stuff like the FormatterUDPInterface and disk I/O for plotting. This may be a more layered architecture (and more inline with MVC) but a big refactor (including of Kris's code).

These really amount to the same thing (QWidgets inside an aggregate QWidget), so I'd rather bite the bullet and refactor everything under a well-designed parent (option (2)).

To do:

To implement (2), do:

thanasipantazides commented 1 year ago

And, add superclass of all Detector...Views that include self.name, self.label, other expected attributes for displaying.