Commit 6a95fed9 authored by Tong Zhang's avatar Tong Zhang
Browse files

UI: Update UI and resources.

parent 7ca89f8b
This diff is collapsed.
......@@ -24,6 +24,12 @@ class Ui_MainWindow(object):
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_15 = QtWidgets.QLabel(self.centralwidget)
self.label_15.setObjectName("label_15")
self.horizontalLayout.addWidget(self.label_15)
self.elem_type_cbb = QtWidgets.QComboBox(self.centralwidget)
self.elem_type_cbb.setObjectName("elem_type_cbb")
self.horizontalLayout.addWidget(self.elem_type_cbb)
self.label = QtWidgets.QLabel(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
QtWidgets.QSizePolicy.Preferred)
......@@ -34,28 +40,48 @@ class Ui_MainWindow(object):
self.label.setSizePolicy(sizePolicy)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.quad1_name_cbb = QtWidgets.QComboBox(self.centralwidget)
self.elem_name_cbb = QtWidgets.QComboBox(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(1)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
self.quad1_name_cbb.sizePolicy().hasHeightForWidth())
self.quad1_name_cbb.setSizePolicy(sizePolicy)
self.elem_name_cbb.sizePolicy().hasHeightForWidth())
self.elem_name_cbb.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Monospace")
self.quad1_name_cbb.setFont(font)
self.quad1_name_cbb.setObjectName("quad1_name_cbb")
self.horizontalLayout.addWidget(self.quad1_name_cbb)
self.quad_info_btn = QtWidgets.QToolButton(self.centralwidget)
self.elem_name_cbb.setFont(font)
self.elem_name_cbb.setObjectName("elem_name_cbb")
self.horizontalLayout.addWidget(self.elem_name_cbb)
self.label_14 = QtWidgets.QLabel(self.centralwidget)
self.label_14.setObjectName("label_14")
self.horizontalLayout.addWidget(self.label_14)
self.field_name_cbb = QtWidgets.QComboBox(self.centralwidget)
self.field_name_cbb.setObjectName("field_name_cbb")
self.horizontalLayout.addWidget(self.field_name_cbb)
self.label_12 = QtWidgets.QLabel(self.centralwidget)
self.label_12.setObjectName("label_12")
self.horizontalLayout.addWidget(self.label_12)
self.live_cset_lineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.live_cset_lineEdit.setReadOnly(True)
self.live_cset_lineEdit.setObjectName("live_cset_lineEdit")
self.horizontalLayout.addWidget(self.live_cset_lineEdit)
self.label_13 = QtWidgets.QLabel(self.centralwidget)
self.label_13.setObjectName("label_13")
self.horizontalLayout.addWidget(self.label_13)
self.live_rd_lineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.live_rd_lineEdit.setReadOnly(True)
self.live_rd_lineEdit.setObjectName("live_rd_lineEdit")
self.horizontalLayout.addWidget(self.live_rd_lineEdit)
self.elem_info_btn = QtWidgets.QToolButton(self.centralwidget)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/info.png"), QtGui.QIcon.Normal,
QtGui.QIcon.Off)
self.quad_info_btn.setIcon(icon1)
self.quad_info_btn.setIconSize(QtCore.QSize(30, 30))
self.quad_info_btn.setAutoRaise(True)
self.quad_info_btn.setObjectName("quad_info_btn")
self.horizontalLayout.addWidget(self.quad_info_btn)
self.elem_info_btn.setIcon(icon1)
self.elem_info_btn.setIconSize(QtCore.QSize(30, 30))
self.elem_info_btn.setAutoRaise(True)
self.elem_info_btn.setObjectName("elem_info_btn")
self.horizontalLayout.addWidget(self.elem_info_btn)
spacerItem = QtWidgets.QSpacerItem(40, 20,
QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Minimum)
......@@ -70,13 +96,14 @@ class Ui_MainWindow(object):
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
self.quad1_grad_dsbox = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.quad1_grad_dsbox.setDecimals(3)
self.quad1_grad_dsbox.setMinimum(-100.0)
self.quad1_grad_dsbox.setMaximum(100.0)
self.quad1_grad_dsbox.setSingleStep(0.1)
self.quad1_grad_dsbox.setObjectName("quad1_grad_dsbox")
self.horizontalLayout.addWidget(self.quad1_grad_dsbox)
self.new_cset_dsbox = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.new_cset_dsbox.setSuffix("")
self.new_cset_dsbox.setDecimals(3)
self.new_cset_dsbox.setMinimum(-100.0)
self.new_cset_dsbox.setMaximum(100.0)
self.new_cset_dsbox.setSingleStep(0.1)
self.new_cset_dsbox.setObjectName("new_cset_dsbox")
self.horizontalLayout.addWidget(self.new_cset_dsbox)
self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setObjectName("tabWidget")
......@@ -102,12 +129,12 @@ class Ui_MainWindow(object):
self.elemlist_cbb.setFont(font)
self.elemlist_cbb.setObjectName("elemlist_cbb")
self.horizontalLayout_2.addWidget(self.elemlist_cbb)
self.elem_info_btn = QtWidgets.QToolButton(self.ellipse_tab)
self.elem_info_btn.setIcon(icon1)
self.elem_info_btn.setIconSize(QtCore.QSize(30, 30))
self.elem_info_btn.setAutoRaise(True)
self.elem_info_btn.setObjectName("elem_info_btn")
self.horizontalLayout_2.addWidget(self.elem_info_btn)
self.target_elem_info_btn = QtWidgets.QToolButton(self.ellipse_tab)
self.target_elem_info_btn.setIcon(icon1)
self.target_elem_info_btn.setIconSize(QtCore.QSize(30, 30))
self.target_elem_info_btn.setAutoRaise(True)
self.target_elem_info_btn.setObjectName("target_elem_info_btn")
self.horizontalLayout_2.addWidget(self.target_elem_info_btn)
self.pos_lineEdit = QtWidgets.QLineEdit(self.ellipse_tab)
self.pos_lineEdit.setReadOnly(True)
self.pos_lineEdit.setObjectName("pos_lineEdit")
......@@ -452,18 +479,21 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.label.setText(_translate("MainWindow", "Select quadrupole"))
self.quad_info_btn.setToolTip(
self.label_15.setText(_translate("MainWindow", "Device Type"))
self.label.setText(_translate("MainWindow", "Name List"))
self.label_14.setText(_translate("MainWindow", "Field"))
self.label_12.setText(_translate("MainWindow", "Current Setting"))
self.label_13.setText(_translate("MainWindow", "Readback"))
self.elem_info_btn.setToolTip(
_translate("MainWindow",
"Click to see the details of selected device."))
self.quad_info_btn.setText(_translate("MainWindow", "info"))
self.label_2.setText(_translate("MainWindow", "Gradient Setting"))
self.quad1_grad_dsbox.setSuffix(_translate("MainWindow", " T/m"))
self.elem_info_btn.setText(_translate("MainWindow", "info"))
self.label_2.setText(_translate("MainWindow", "Proposed Setting"))
self.label_3.setText(_translate("MainWindow", "Show results after"))
self.elem_info_btn.setToolTip(
self.target_elem_info_btn.setToolTip(
_translate("MainWindow",
"Click to see the details of selected device."))
self.elem_info_btn.setText(_translate("MainWindow", "info"))
self.target_elem_info_btn.setText(_translate("MainWindow", "info"))
self.x_ellipse_plot.setFigureXlabel(_translate("MainWindow", "X (mm)"))
self.x_ellipse_plot.setFigureYlabel(
_translate("MainWindow", "X\' (mrad)"))
......
......@@ -27,6 +27,16 @@
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_15">
<property name="text">
<string>Device Type</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="elem_type_cbb"/>
</item>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
......@@ -36,12 +46,12 @@
</sizepolicy>
</property>
<property name="text">
<string>Select quadrupole</string>
<string>Name List</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="quad1_name_cbb">
<widget class="QComboBox" name="elem_name_cbb">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
......@@ -56,7 +66,45 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="quad_info_btn">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Field</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="field_name_cbb"/>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Current Setting</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="live_cset_lineEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>Readback</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="live_rd_lineEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="elem_info_btn">
<property name="toolTip">
<string>Click to see the details of selected device.</string>
</property>
......@@ -100,14 +148,14 @@
</sizepolicy>
</property>
<property name="text">
<string>Gradient Setting</string>
<string>Proposed Setting</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="quad1_grad_dsbox">
<widget class="QDoubleSpinBox" name="new_cset_dsbox">
<property name="suffix">
<string> T/m</string>
<string/>
</property>
<property name="decimals">
<number>3</number>
......@@ -160,7 +208,7 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="elem_info_btn">
<widget class="QToolButton" name="target_elem_info_btn">
<property name="toolTip">
<string>Click to see the details of selected device.</string>
</property>
......@@ -926,8 +974,8 @@
<y>366</y>
</hint>
<hint type="destinationlabel">
<x>477</x>
<y>516</y>
<x>490</x>
<y>842</y>
</hint>
</hints>
</connection>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment