mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2024-11-09 12:30:01 +00:00
Made UI resizeable.
This commit is contained in:
parent
9eb4999246
commit
5a12f27fa2
3 changed files with 75 additions and 34 deletions
|
@ -10,33 +10,47 @@
|
|||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QStackedWidget" name="stackedWidgetPulseProgrammer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>860</x>
|
||||
<y>0</y>
|
||||
<width>1061</width>
|
||||
<height>1081</height>
|
||||
</rect>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidgetSettings">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_3"/>
|
||||
<widget class="QWidget" name="page_4"/>
|
||||
</widget>
|
||||
<widget class="QStackedWidget" name="stackedWidgetSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>831</width>
|
||||
<height>1081</height>
|
||||
</rect>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidgetPulseProgrammer">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="page"/>
|
||||
<widget class="QWidget" name="page_2"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
|
@ -24,6 +24,14 @@ class SpectrometerView(ModuleView):
|
|||
|
||||
self.blank = QWidget()
|
||||
|
||||
self._ui_form.stackedWidgetSettings.setStyleSheet(
|
||||
"QStackedWidget { background-color: #fafafa; border: 2px solid #000; }"
|
||||
)
|
||||
|
||||
self._ui_form.stackedWidgetPulseProgrammer.setStyleSheet(
|
||||
"QStackedWidget { background-color: #fafaaa; border: 2px solid #000; }"
|
||||
)
|
||||
|
||||
def on_active_spectrometer_changed(self, module):
|
||||
"""This method is called when the active spectrometer is changed.
|
||||
It changes the active view in the stacked widget to the one that was just activated.
|
||||
|
|
|
@ -13,24 +13,43 @@ class Ui_Form(object):
|
|||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(1920, 1080)
|
||||
self.stackedWidgetPulseProgrammer = QtWidgets.QStackedWidget(parent=Form)
|
||||
self.stackedWidgetPulseProgrammer.setGeometry(QtCore.QRect(860, 0, 1061, 1081))
|
||||
self.stackedWidgetPulseProgrammer.setObjectName("stackedWidgetPulseProgrammer")
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
|
||||
Form.setSizePolicy(sizePolicy)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.stackedWidgetSettings = QtWidgets.QStackedWidget(parent=Form)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.stackedWidgetSettings.sizePolicy().hasHeightForWidth())
|
||||
self.stackedWidgetSettings.setSizePolicy(sizePolicy)
|
||||
self.stackedWidgetSettings.setAutoFillBackground(True)
|
||||
self.stackedWidgetSettings.setObjectName("stackedWidgetSettings")
|
||||
self.page_3 = QtWidgets.QWidget()
|
||||
self.page_3.setObjectName("page_3")
|
||||
self.stackedWidgetPulseProgrammer.addWidget(self.page_3)
|
||||
self.stackedWidgetSettings.addWidget(self.page_3)
|
||||
self.page_4 = QtWidgets.QWidget()
|
||||
self.page_4.setObjectName("page_4")
|
||||
self.stackedWidgetPulseProgrammer.addWidget(self.page_4)
|
||||
self.stackedWidgetSettings = QtWidgets.QStackedWidget(parent=Form)
|
||||
self.stackedWidgetSettings.setGeometry(QtCore.QRect(10, 0, 831, 1081))
|
||||
self.stackedWidgetSettings.setObjectName("stackedWidgetSettings")
|
||||
self.stackedWidgetSettings.addWidget(self.page_4)
|
||||
self.horizontalLayout.addWidget(self.stackedWidgetSettings)
|
||||
self.stackedWidgetPulseProgrammer = QtWidgets.QStackedWidget(parent=Form)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.stackedWidgetPulseProgrammer.sizePolicy().hasHeightForWidth())
|
||||
self.stackedWidgetPulseProgrammer.setSizePolicy(sizePolicy)
|
||||
self.stackedWidgetPulseProgrammer.setAutoFillBackground(True)
|
||||
self.stackedWidgetPulseProgrammer.setObjectName("stackedWidgetPulseProgrammer")
|
||||
self.page = QtWidgets.QWidget()
|
||||
self.page.setObjectName("page")
|
||||
self.stackedWidgetSettings.addWidget(self.page)
|
||||
self.stackedWidgetPulseProgrammer.addWidget(self.page)
|
||||
self.page_2 = QtWidgets.QWidget()
|
||||
self.page_2.setObjectName("page_2")
|
||||
self.stackedWidgetSettings.addWidget(self.page_2)
|
||||
self.stackedWidgetPulseProgrammer.addWidget(self.page_2)
|
||||
self.horizontalLayout.addWidget(self.stackedWidgetPulseProgrammer)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
|
Loading…
Reference in a new issue