diff --git a/ui/Ui_mainwindow.py b/ui/Ui_mainwindow.py
index 0bec613..31af081 100644
--- a/ui/Ui_mainwindow.py
+++ b/ui/Ui_mainwindow.py
@@ -31,6 +31,7 @@ class Ui_MainWindow(object):
sizePolicy.setHeightForWidth(self.groupBox_experiment.sizePolicy().hasHeightForWidth())
self.groupBox_experiment.setSizePolicy(sizePolicy)
self.groupBox_experiment.setMinimumSize(QtCore.QSize(100, 300))
+ self.groupBox_experiment.setSizeIncrement(QtCore.QSize(0, 0))
self.groupBox_experiment.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox_experiment.setFlat(False)
self.groupBox_experiment.setCheckable(False)
@@ -194,19 +195,32 @@ class Ui_MainWindow(object):
self.buttonBox_process.setStandardButtons(QtWidgets.QDialogButtonBox.NoButton)
self.buttonBox_process.setObjectName("buttonBox_process")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.buttonBox_process)
- self.tabWidget = QtWidgets.QTabWidget(self.splitter)
- self.tabWidget.setEnabled(True)
+ self.groupBox_results = QtWidgets.QGroupBox(self.splitter)
+ self.groupBox_results.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(6)
sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.groupBox_results.sizePolicy().hasHeightForWidth())
+ self.groupBox_results.setSizePolicy(sizePolicy)
+ self.groupBox_results.setSizeIncrement(QtCore.QSize(0, 0))
+ self.groupBox_results.setObjectName("groupBox_results")
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox_results)
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.tabWidget = QtWidgets.QTabWidget(self.groupBox_results)
+ self.tabWidget.setEnabled(True)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setMinimumSize(QtCore.QSize(300, 300))
+ self.tabWidget.setSizeIncrement(QtCore.QSize(0, 0))
self.tabWidget.setObjectName("tabWidget")
+ self.horizontalLayout_2.addWidget(self.tabWidget)
self.horizontalLayout.addWidget(self.splitter)
MainWindow.setCentralWidget(self.centralWidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
- self.menuBar.setGeometry(QtCore.QRect(0, 0, 1066, 29))
+ self.menuBar.setGeometry(QtCore.QRect(0, 0, 1066, 28))
self.menuBar.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.menuBar.setObjectName("menuBar")
self.menuFile = QtWidgets.QMenu(self.menuBar)
@@ -279,6 +293,7 @@ class Ui_MainWindow(object):
self.doubleSpinBox_cbar_start.setSuffix(_translate("MainWindow", " °C"))
self.label_cbar_end.setText(_translate("MainWindow", "En&d"))
self.doubleSpinBox_cbar_end.setSuffix(_translate("MainWindow", " °C"))
+ self.groupBox_results.setTitle(_translate("MainWindow", "Plots"))
self.menuFile.setTitle(_translate("MainWindow", "Fi&le"))
self.menuHelp.setTitle(_translate("MainWindow", "Hel&p"))
self.actionQuit.setText(_translate("MainWindow", "&Quit"))
diff --git a/ui/mainwindow.py b/ui/mainwindow.py
index 9596b38..3c100b5 100644
--- a/ui/mainwindow.py
+++ b/ui/mainwindow.py
@@ -142,6 +142,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
elif button == self.buttonBox_open_reset.button(
QDialogButtonBox.Reset):
self.listWidget_data.clear()
+ self.remove_plate_tabs()
@pyqtSlot("QString")
def on_comboBox_instrument_currentIndexChanged(self, p0):
@@ -158,28 +159,37 @@ class MainWindow(QMainWindow, Ui_MainWindow):
tab.setObjectName(name)
return tab
+ def remove_plate_tabs(self):
+ for i in range(self.tabWidget.count()):
+ try:
+ widget = self.tabWidget.widget(i)
+ widget.deleteLater()
+ except IndexError:
+ pass
+ self.tabWidget.clear()
+
def generate_plate_tabs(self, plate):
plotter = PlotResults()
if id != 'average':
tab = self.generate_plot_tab("tab_heatmap_{}".format(id))
- self.tabWidget.addTab(tab, _translate(
- "MainWindow", "Heatmap #{}".format(plate.id)))
+ title = _translate("MainWindow", "Heatmap #")
+ self.tabWidget.addTab(tab, title + str(plate.id))
plotter.plot_tm_heatmap_single(plate, tab)
tab = self.generate_plot_tab("tab_raw_{}".format(id))
- self.tabWidget.addTab(tab, _translate(
- "MainWindow", "Raw Data #{}".format(plate.id)))
+ title = _translate("MainWindow", "Raw Data #")
+ self.tabWidget.addTab(tab, title + str(plate.id))
plotter.plot_raw(plate, tab)
tab = self.generate_plot_tab("tab_derivative_{}".format(id))
- self.tabWidget.addTab(tab, _translate(
- "MainWindow", "Derivatives #{}".format(plate.id)))
+ title = _translate("MainWindow", "Derivatives #")
+ self.tabWidget.addTab(tab, title + str(plate.id))
plotter.plot_derivative(plate, tab)
else:
tab = self.generate_plot_tab("tab_heatmap_{}".format(id))
- self.tabWidget.addTab(tab, _translate(
- "MainWindow", "Heatmap ({})".format(plate.id)))
+ title = _translate("MainWindow", "Heatmap ")
+ self.tabWidget.addTab(tab, title + str(plate.id))
plotter.plot_tm_heatmap_single(plate, tab)
@pyqtSlot()
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index adce451..e1d92eb 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -48,6 +48,12 @@
300
+
+
+ 0
+ 0
+
+
Experimental Setup
@@ -465,7 +471,7 @@
-
+
true
@@ -475,15 +481,45 @@
0
-
+
- 300
- 300
+ 0
+ 0
-
- -1
+
+ Plots
+
+ -
+
+
+ true
+
+
+
+ 0
+ 0
+
+
+
+
+ 300
+ 300
+
+
+
+
+ 0
+ 0
+
+
+
+ -1
+
+
+
+
@@ -495,7 +531,7 @@
0
0
1066
- 29
+ 28