1
0
Fork 0
mirror of https://github.com/Athemis/PyDSF.git synced 2025-04-05 14:46:03 +00:00

Plot widget and options are resizable against each other.

This commit is contained in:
Alexander Minges 2015-01-31 19:23:13 +01:00
parent cf75c8ee09
commit c3c172c59a
3 changed files with 541 additions and 456 deletions

View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created: Fri Jan 30 19:20:59 2015
# Created: Sat Jan 31 19:20:48 2015
# by: PyQt5 UI code generator 5.4
#
# WARNING! All changes made in this file will be lost!
@ -12,19 +12,31 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(808, 646)
MainWindow.resize(1066, 795)
MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.centralWidget.setObjectName("centralWidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralWidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.groupBox_experiment = QtWidgets.QGroupBox(self.centralWidget)
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralWidget)
self.horizontalLayout.setObjectName("horizontalLayout")
self.splitter = QtWidgets.QSplitter(self.centralWidget)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setHandleWidth(2)
self.splitter.setChildrenCollapsible(True)
self.splitter.setObjectName("splitter")
self.groupBox_experiment = QtWidgets.QGroupBox(self.splitter)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_experiment.sizePolicy().hasHeightForWidth())
self.groupBox_experiment.setSizePolicy(sizePolicy)
self.groupBox_experiment.setMinimumSize(QtCore.QSize(100, 300))
self.groupBox_experiment.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox_experiment.setFlat(False)
self.groupBox_experiment.setCheckable(False)
self.groupBox_experiment.setObjectName("groupBox_experiment")
self.formLayout_3 = QtWidgets.QFormLayout(self.groupBox_experiment)
self.formLayout_3.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
self.formLayout_3.setObjectName("formLayout_3")
self.label_instrument = QtWidgets.QLabel(self.groupBox_experiment)
self.label_instrument.setObjectName("label_instrument")
@ -43,6 +55,18 @@ class Ui_MainWindow(object):
self.groupBox_data.setObjectName("groupBox_data")
self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_data)
self.gridLayout_4.setObjectName("gridLayout_4")
self.buttonBox_open_reset = QtWidgets.QDialogButtonBox(self.groupBox_data)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox_open_reset.sizePolicy().hasHeightForWidth())
self.buttonBox_open_reset.setSizePolicy(sizePolicy)
self.buttonBox_open_reset.setLayoutDirection(QtCore.Qt.LeftToRight)
self.buttonBox_open_reset.setOrientation(QtCore.Qt.Vertical)
self.buttonBox_open_reset.setStandardButtons(QtWidgets.QDialogButtonBox.Open|QtWidgets.QDialogButtonBox.Reset)
self.buttonBox_open_reset.setCenterButtons(False)
self.buttonBox_open_reset.setObjectName("buttonBox_open_reset")
self.gridLayout_4.addWidget(self.buttonBox_open_reset, 0, 1, 1, 1)
self.groupBox_replicates = QtWidgets.QGroupBox(self.groupBox_data)
self.groupBox_replicates.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox_replicates.setCheckable(True)
@ -56,24 +80,18 @@ class Ui_MainWindow(object):
self.radioButton_rep_files.setObjectName("radioButton_rep_files")
self.gridLayout_3.addWidget(self.radioButton_rep_files, 0, 0, 1, 1)
self.gridLayout_4.addWidget(self.groupBox_replicates, 2, 0, 1, 2)
self.buttonBox_open_reset = QtWidgets.QDialogButtonBox(self.groupBox_data)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox_open_reset.sizePolicy().hasHeightForWidth())
self.buttonBox_open_reset.setSizePolicy(sizePolicy)
self.buttonBox_open_reset.setLayoutDirection(QtCore.Qt.LeftToRight)
self.buttonBox_open_reset.setOrientation(QtCore.Qt.Vertical)
self.buttonBox_open_reset.setStandardButtons(QtWidgets.QDialogButtonBox.Open|QtWidgets.QDialogButtonBox.Reset)
self.buttonBox_open_reset.setCenterButtons(False)
self.buttonBox_open_reset.setObjectName("buttonBox_open_reset")
self.gridLayout_4.addWidget(self.buttonBox_open_reset, 0, 1, 1, 1)
self.listWidget_data = QtWidgets.QListWidget(self.groupBox_data)
self.listWidget_data.setAlternatingRowColors(True)
self.listWidget_data.setObjectName("listWidget_data")
self.gridLayout_4.addWidget(self.listWidget_data, 0, 0, 2, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout_4.addItem(spacerItem, 1, 1, 1, 1)
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.groupBox_data)
self.groupBox_temp = QtWidgets.QGroupBox(self.groupBox_experiment)
self.groupBox_processing = QtWidgets.QGroupBox(self.groupBox_experiment)
self.groupBox_processing.setObjectName("groupBox_processing")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox_processing)
self.gridLayout.setObjectName("gridLayout")
self.groupBox_temp = QtWidgets.QGroupBox(self.groupBox_processing)
self.groupBox_temp.setEnabled(True)
self.groupBox_temp.setAutoFillBackground(False)
self.groupBox_temp.setCheckable(False)
@ -108,8 +126,8 @@ class Ui_MainWindow(object):
self.doubleSpinBox_dt.setProperty("value", 1.0)
self.doubleSpinBox_dt.setObjectName("doubleSpinBox_dt")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.doubleSpinBox_dt)
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.groupBox_temp)
self.groupBox_cutoff = QtWidgets.QGroupBox(self.groupBox_experiment)
self.gridLayout.addWidget(self.groupBox_temp, 0, 0, 1, 1)
self.groupBox_cutoff = QtWidgets.QGroupBox(self.groupBox_processing)
self.groupBox_cutoff.setEnabled(True)
self.groupBox_cutoff.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox_cutoff.setCheckable(True)
@ -135,8 +153,8 @@ class Ui_MainWindow(object):
self.doubleSpinBox_lower.setDecimals(1)
self.doubleSpinBox_lower.setObjectName("doubleSpinBox_lower")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.doubleSpinBox_lower)
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.groupBox_cutoff)
self.groupBox_signal_threshold = QtWidgets.QGroupBox(self.groupBox_experiment)
self.gridLayout.addWidget(self.groupBox_cutoff, 0, 1, 1, 1)
self.groupBox_signal_threshold = QtWidgets.QGroupBox(self.groupBox_processing)
self.groupBox_signal_threshold.setEnabled(True)
self.groupBox_signal_threshold.setCheckable(True)
self.groupBox_signal_threshold.setChecked(False)
@ -147,8 +165,8 @@ class Ui_MainWindow(object):
self.spinBox_signal_threshold.setMaximum(1000000)
self.spinBox_signal_threshold.setObjectName("spinBox_signal_threshold")
self.verticalLayout.addWidget(self.spinBox_signal_threshold)
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.groupBox_signal_threshold)
self.groupBox_cbar = QtWidgets.QGroupBox(self.groupBox_experiment)
self.gridLayout.addWidget(self.groupBox_signal_threshold, 1, 0, 1, 1)
self.groupBox_cbar = QtWidgets.QGroupBox(self.groupBox_processing)
self.groupBox_cbar.setEnabled(True)
self.groupBox_cbar.setCheckable(True)
self.groupBox_cbar.setChecked(False)
@ -170,13 +188,19 @@ class Ui_MainWindow(object):
self.doubleSpinBox_cbar_end.setDecimals(1)
self.doubleSpinBox_cbar_end.setObjectName("doubleSpinBox_cbar_end")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.doubleSpinBox_cbar_end)
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.groupBox_cbar)
self.gridLayout.addWidget(self.groupBox_cbar, 1, 1, 1, 1)
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.SpanningRole, self.groupBox_processing)
self.buttonBox_process = QtWidgets.QDialogButtonBox(self.groupBox_experiment)
self.buttonBox_process.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox_process.setStandardButtons(QtWidgets.QDialogButtonBox.NoButton)
self.buttonBox_process.setObjectName("buttonBox_process")
self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.buttonBox_process)
self.gridLayout_2.addWidget(self.groupBox_experiment, 0, 0, 1, 1)
self.tabWidget = QtWidgets.QTabWidget(self.centralWidget)
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.buttonBox_process)
self.tabWidget = QtWidgets.QTabWidget(self.splitter)
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.setObjectName("tabWidget")
self.tab_raw = MplWidget()
self.tab_raw.setObjectName("tab_raw")
@ -191,10 +215,10 @@ class Ui_MainWindow(object):
self.tab_heatmap_avg.setEnabled(False)
self.tab_heatmap_avg.setObjectName("tab_heatmap_avg")
self.tabWidget.addTab(self.tab_heatmap_avg, "")
self.gridLayout_2.addWidget(self.tabWidget, 0, 1, 1, 1)
self.horizontalLayout.addWidget(self.splitter)
MainWindow.setCentralWidget(self.centralWidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 808, 29))
self.menuBar.setGeometry(QtCore.QRect(0, 0, 1066, 29))
self.menuBar.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.menuBar.setObjectName("menuBar")
self.menuFile = QtWidgets.QMenu(self.menuBar)
@ -231,7 +255,7 @@ class Ui_MainWindow(object):
self.label_cbar_end.setBuddy(self.doubleSpinBox_cbar_end)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(3)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
@ -244,6 +268,7 @@ class Ui_MainWindow(object):
self.groupBox_data.setTitle(_translate("MainWindow", "Data File"))
self.groupBox_replicates.setTitle(_translate("MainWindow", "Replicates"))
self.radioButton_rep_files.setText(_translate("MainWindow", "Files"))
self.groupBox_processing.setTitle(_translate("MainWindow", "Processing Options"))
self.groupBox_temp.setToolTip(_translate("MainWindow", "<html><head/><body><p>Temperature range of the data points. Only applies, if the data file does not contain any temperature information.</p></body></html>"))
self.groupBox_temp.setTitle(_translate("MainWindow", "Temperature settings"))
self.label_tmin.setText(_translate("MainWindow", "<html><head/><body><p>T<span style=\" vertical-align:sub;\">min</span></p></body></html>"))
@ -259,10 +284,10 @@ class Ui_MainWindow(object):
self.label_cutoff_low.setText(_translate("MainWindow", "Lower"))
self.doubleSpinBox_lower.setSuffix(_translate("MainWindow", " °C"))
self.groupBox_signal_threshold.setToolTip(_translate("MainWindow", "<html><head/><body><p>If the signal exceeds this threshold, the coresponding well is assumed to be denatured.</p></body></html>"))
self.groupBox_signal_threshold.setTitle(_translate("MainWindow", "Si&gnal Threshold"))
self.groupBox_signal_threshold.setTitle(_translate("MainWindow", "Signal &Threshold"))
self.groupBox_cbar.setToolTip(_translate("MainWindow", "<html><head/><body><p>Defines the range of the colorbar used for the T<span style=\" vertical-align:sub;\">m</span> heatmap.</p></body></html>"))
self.groupBox_cbar.setTitle(_translate("MainWindow", "Colorbar"))
self.label_cbar_start.setText(_translate("MainWindow", "Start"))
self.groupBox_cbar.setTitle(_translate("MainWindow", "&Colorbar"))
self.label_cbar_start.setText(_translate("MainWindow", "S&tart"))
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"))

View file

@ -33,6 +33,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.statusBar.addPermanentWidget(self.progressBar)
self.statusBar.showMessage("Welcome to PyDSF")
self.buttonBox_process.addButton("&Start Processing", QDialogButtonBox.AcceptRole)
@pyqtSlot("QAbstractButton*")

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>808</width>
<height>646</height>
<width>1066</width>
<height>795</height>
</rect>
</property>
<property name="windowTitle">
@ -20,9 +20,31 @@
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="handleWidth">
<number>2</number>
</property>
<property name="childrenCollapsible">
<bool>true</bool>
</property>
<widget class="QGroupBox" name="groupBox_experiment">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>300</height>
</size>
</property>
<property name="title">
<string>Experimental Setup</string>
</property>
@ -36,6 +58,9 @@
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_instrument">
<property name="text">
@ -73,6 +98,28 @@
<string>Data File</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<widget class="QDialogButtonBox" name="buttonBox_open_reset">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Open|QDialogButtonBox::Reset</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_replicates">
<property name="title">
@ -104,28 +151,6 @@
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QDialogButtonBox" name="buttonBox_open_reset">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Open|QDialogButtonBox::Reset</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QListWidget" name="listWidget_data">
<property name="alternatingRowColors">
@ -133,10 +158,29 @@
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_processing">
<property name="title">
<string>Processing Options</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_temp">
<property name="enabled">
<bool>true</bool>
@ -238,7 +282,7 @@
</layout>
</widget>
</item>
<item row="2" column="1">
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_cutoff">
<property name="enabled">
<bool>true</bool>
@ -314,7 +358,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_signal_threshold">
<property name="enabled">
<bool>true</bool>
@ -323,7 +367,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If the signal exceeds this threshold, the coresponding well is assumed to be denatured.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="title">
<string>Si&amp;gnal Threshold</string>
<string>Signal &amp;Threshold</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -342,7 +386,7 @@
</layout>
</widget>
</item>
<item row="3" column="1">
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_cbar">
<property name="enabled">
<bool>true</bool>
@ -351,7 +395,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Defines the range of the colorbar used for the T&lt;span style=&quot; vertical-align:sub;&quot;&gt;m&lt;/span&gt; heatmap.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="title">
<string>Colorbar</string>
<string>&amp;Colorbar</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -366,7 +410,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_cbar_start">
<property name="text">
<string>Start</string>
<string>S&amp;tart</string>
</property>
<property name="buddy">
<cstring>doubleSpinBox_cbar_start</cstring>
@ -406,20 +450,33 @@
</layout>
</widget>
</item>
<item row="4" column="1">
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QDialogButtonBox" name="buttonBox_process">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::NoButton</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="MplWidget" name="tab_raw">
<attribute name="title">
@ -445,6 +502,7 @@
</attribute>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
@ -453,7 +511,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>808</width>
<width>1066</width>
<height>29</height>
</rect>
</property>