use tabs for plots

This commit is contained in:
Brendan Haines 2025-03-08 23:11:01 -07:00
parent 97497e640e
commit 67ddbb0f90

View File

@ -21,6 +21,7 @@ from PySide6.QtWidgets import (
QMainWindow, QMainWindow,
QMenu, QMenu,
QProgressBar, QProgressBar,
QTabWidget,
QVBoxLayout, QVBoxLayout,
QWidget, QWidget,
) )
@ -108,20 +109,16 @@ class MainWindow(QMainWindow):
window_layout.addWidget(prog_sweep) window_layout.addWidget(prog_sweep)
self.prog_sweep = prog_sweep self.prog_sweep = prog_sweep
# window_widget.se plot_widget = QTabWidget()
plot_layout = QVBoxLayout()
# TODO: handle plots properly
self.plots = [] self.plots = []
for type_ in [ for type_ in [
"logmag", "logmag",
"phase", "phase",
# "vswr", "vswr",
# "smith", "smith",
]: ]:
self.plots.append(PlotWidget(type_=type_)) self.plots.append(PlotWidget(type_=type_))
plot_layout.addWidget(self.plots[-1]) plot_widget.addTab(self.plots[-1], type_)
plot_widget = QWidget()
plot_widget.setLayout(plot_layout)
window_layout.addWidget(plot_widget) window_layout.addWidget(plot_widget)
# Set the central widget of the Window. # Set the central widget of the Window.