Commit eb47d53f authored by Tong Zhang's avatar Tong Zhang
Browse files

UI: Update UI.

parent e9a61830
......@@ -25,8 +25,8 @@ class Ui_MainWindow(object):
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.gridLayout_4 = QtWidgets.QGridLayout(self.tab)
self.gridLayout_4.setObjectName("gridLayout_4")
self.verticalLayout = QtWidgets.QVBoxLayout(self.tab)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_3 = QtWidgets.QLabel(self.tab)
......@@ -62,12 +62,12 @@ class Ui_MainWindow(object):
self.family_lineEdit.setReadOnly(True)
self.family_lineEdit.setObjectName("family_lineEdit")
self.horizontalLayout_2.addWidget(self.family_lineEdit)
self.gridLayout_4.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.scrollArea = QtWidgets.QScrollArea(self.tab)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName("scrollArea")
self.ellipse_area = QtWidgets.QWidget()
self.ellipse_area.setGeometry(QtCore.QRect(0, 0, 1684, 623))
self.ellipse_area.setGeometry(QtCore.QRect(0, 0, 1684, 621))
self.ellipse_area.setObjectName("ellipse_area")
self.gridLayout_2 = QtWidgets.QGridLayout(self.ellipse_area)
self.gridLayout_2.setObjectName("gridLayout_2")
......@@ -148,50 +148,62 @@ class Ui_MainWindow(object):
self.twiss_results_treeView.setObjectName("twiss_results_treeView")
self.gridLayout_2.addWidget(self.splitter, 0, 0, 1, 1)
self.scrollArea.setWidget(self.ellipse_area)
self.gridLayout_4.addWidget(self.scrollArea, 1, 0, 1, 1)
self.figure_ctls_gbox = QtWidgets.QGridLayout()
self.figure_ctls_gbox.setObjectName("figure_ctls_gbox")
self.grid_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.grid_on_chkbox.setObjectName("grid_on_chkbox")
self.figure_ctls_gbox.addWidget(self.grid_on_chkbox, 1, 0, 1, 1)
self.label_6 = QtWidgets.QLabel(self.tab)
self.label_6.setObjectName("label_6")
self.figure_ctls_gbox.addWidget(self.label_6, 0, 3, 1, 1)
self.label_7 = QtWidgets.QLabel(self.tab)
self.label_7.setObjectName("label_7")
self.figure_ctls_gbox.addWidget(self.label_7, 0, 5, 1, 1)
self.mticks_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.mticks_on_chkbox.setObjectName("mticks_on_chkbox")
self.figure_ctls_gbox.addWidget(self.mticks_on_chkbox, 1, 1, 1, 1)
self.verticalLayout.addWidget(self.scrollArea)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.label_4 = QtWidgets.QLabel(self.tab)
self.label_4.setObjectName("label_4")
self.figure_ctls_gbox.addWidget(self.label_4, 0, 0, 1, 1)
self.horizontalLayout_5.addWidget(self.label_4)
self.label_5 = QtWidgets.QLabel(self.tab)
self.label_5.setObjectName("label_5")
self.figure_ctls_gbox.addWidget(self.label_5, 0, 1, 1, 1)
self.tight_layout_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.tight_layout_on_chkbox.setObjectName("tight_layout_on_chkbox")
self.figure_ctls_gbox.addWidget(self.tight_layout_on_chkbox, 1, 2, 1,
1)
self.xlim_x2_lineEdit = QtWidgets.QLineEdit(self.tab)
self.xlim_x2_lineEdit.setObjectName("xlim_x2_lineEdit")
self.figure_ctls_gbox.addWidget(self.xlim_x2_lineEdit, 0, 4, 1, 1)
self.ylim_y1_lineEdit = QtWidgets.QLineEdit(self.tab)
self.ylim_y1_lineEdit.setObjectName("ylim_y1_lineEdit")
self.figure_ctls_gbox.addWidget(self.ylim_y1_lineEdit, 0, 7, 1, 1)
self.horizontalLayout_5.addWidget(self.label_5)
self.xlim_x1_lineEdit = QtWidgets.QLineEdit(self.tab)
self.xlim_x1_lineEdit.setObjectName("xlim_x1_lineEdit")
self.figure_ctls_gbox.addWidget(self.xlim_x1_lineEdit, 0, 2, 1, 1)
self.ylim_y2_lineEdit = QtWidgets.QLineEdit(self.tab)
self.ylim_y2_lineEdit.setObjectName("ylim_y2_lineEdit")
self.figure_ctls_gbox.addWidget(self.ylim_y2_lineEdit, 0, 9, 1, 1)
self.horizontalLayout_5.addWidget(self.xlim_x1_lineEdit)
self.label_6 = QtWidgets.QLabel(self.tab)
self.label_6.setObjectName("label_6")
self.horizontalLayout_5.addWidget(self.label_6)
self.xlim_x2_lineEdit = QtWidgets.QLineEdit(self.tab)
self.xlim_x2_lineEdit.setObjectName("xlim_x2_lineEdit")
self.horizontalLayout_5.addWidget(self.xlim_x2_lineEdit)
self.auto_xlim_btn = QtWidgets.QToolButton(self.tab)
self.auto_xlim_btn.setObjectName("auto_xlim_btn")
self.horizontalLayout_5.addWidget(self.auto_xlim_btn)
self.label_7 = QtWidgets.QLabel(self.tab)
self.label_7.setObjectName("label_7")
self.horizontalLayout_5.addWidget(self.label_7)
self.label_8 = QtWidgets.QLabel(self.tab)
self.label_8.setObjectName("label_8")
self.figure_ctls_gbox.addWidget(self.label_8, 0, 6, 1, 1)
self.horizontalLayout_5.addWidget(self.label_8)
self.ylim_y1_lineEdit = QtWidgets.QLineEdit(self.tab)
self.ylim_y1_lineEdit.setObjectName("ylim_y1_lineEdit")
self.horizontalLayout_5.addWidget(self.ylim_y1_lineEdit)
self.label_9 = QtWidgets.QLabel(self.tab)
self.label_9.setObjectName("label_9")
self.figure_ctls_gbox.addWidget(self.label_9, 0, 8, 1, 1)
self.gridLayout_4.addLayout(self.figure_ctls_gbox, 2, 0, 1, 1)
self.horizontalLayout_5.addWidget(self.label_9)
self.ylim_y2_lineEdit = QtWidgets.QLineEdit(self.tab)
self.ylim_y2_lineEdit.setObjectName("ylim_y2_lineEdit")
self.horizontalLayout_5.addWidget(self.ylim_y2_lineEdit)
self.auto_ylim_btn = QtWidgets.QToolButton(self.tab)
self.auto_ylim_btn.setObjectName("auto_ylim_btn")
self.horizontalLayout_5.addWidget(self.auto_ylim_btn)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.grid_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.grid_on_chkbox.setObjectName("grid_on_chkbox")
self.horizontalLayout_6.addWidget(self.grid_on_chkbox)
self.mticks_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.mticks_on_chkbox.setObjectName("mticks_on_chkbox")
self.horizontalLayout_6.addWidget(self.mticks_on_chkbox)
self.tight_layout_on_chkbox = QtWidgets.QCheckBox(self.tab)
self.tight_layout_on_chkbox.setObjectName("tight_layout_on_chkbox")
self.horizontalLayout_6.addWidget(self.tight_layout_on_chkbox)
spacerItem = QtWidgets.QSpacerItem(40, 20,
QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_6.addItem(spacerItem)
self.verticalLayout.addLayout(self.horizontalLayout_6)
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
......@@ -242,10 +254,10 @@ class Ui_MainWindow(object):
self.quad_info_btn.setAutoRaise(True)
self.quad_info_btn.setObjectName("quad_info_btn")
self.horizontalLayout.addWidget(self.quad_info_btn)
spacerItem = QtWidgets.QSpacerItem(40, 20,
QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
spacerItem1 = QtWidgets.QSpacerItem(40, 20,
QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.label_2 = QtWidgets.QLabel(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
QtWidgets.QSizePolicy.Preferred)
......@@ -294,6 +306,8 @@ class Ui_MainWindow(object):
self.actionAbout_Qt.triggered.connect(MainWindow.onAboutQt)
self.actionE_xit.triggered.connect(MainWindow.close)
self.action_About.triggered.connect(MainWindow.onAbout)
self.auto_xlim_btn.clicked.connect(MainWindow.on_auto_xlim)
self.auto_ylim_btn.clicked.connect(MainWindow.on_auto_ylim)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
......@@ -310,20 +324,22 @@ class Ui_MainWindow(object):
self.y_ellipse_plot.setFigureXlabel(_translate("MainWindow", "Y (mm)"))
self.y_ellipse_plot.setFigureYlabel(
_translate("MainWindow", "Y\' (mrad)"))
self.grid_on_chkbox.setText(_translate("MainWindow", "Grid"))
self.label_6.setText(_translate("MainWindow", "To"))
self.label_7.setText(_translate("MainWindow", "Y Limit:"))
self.mticks_on_chkbox.setText(_translate("MainWindow", "Minor Ticks"))
self.label_4.setText(_translate("MainWindow", "X Limit:"))
self.label_5.setText(_translate("MainWindow", "From"))
self.tight_layout_on_chkbox.setText(_translate("MainWindow",
"Compact"))
self.xlim_x2_lineEdit.setText(_translate("MainWindow", "1"))
self.ylim_y1_lineEdit.setText(_translate("MainWindow", "0"))
self.xlim_x1_lineEdit.setText(_translate("MainWindow", "0"))
self.ylim_y2_lineEdit.setText(_translate("MainWindow", "1"))
self.label_6.setText(_translate("MainWindow", "To"))
self.xlim_x2_lineEdit.setText(_translate("MainWindow", "1"))
self.auto_xlim_btn.setText(_translate("MainWindow", "Auto"))
self.label_7.setText(_translate("MainWindow", "Y Limit:"))
self.label_8.setText(_translate("MainWindow", "From"))
self.ylim_y1_lineEdit.setText(_translate("MainWindow", "0"))
self.label_9.setText(_translate("MainWindow", "To"))
self.ylim_y2_lineEdit.setText(_translate("MainWindow", "1"))
self.auto_ylim_btn.setText(_translate("MainWindow", "Auto"))
self.grid_on_chkbox.setText(_translate("MainWindow", "Grid"))
self.mticks_on_chkbox.setText(_translate("MainWindow", "Minor Ticks"))
self.tight_layout_on_chkbox.setText(_translate("MainWindow",
"Compact"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
_translate("MainWindow", "Beam Ellipse"))
self.envelope_plot.setFigureXlabel(_translate("MainWindow", "s [m]"))
......
......@@ -28,8 +28,8 @@
<attribute name="title">
<string>Beam Ellipse</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_3">
......@@ -92,7 +92,7 @@
</item>
</layout>
</item>
<item row="1" column="0">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
......@@ -103,7 +103,7 @@
<x>0</x>
<y>0</y>
<width>1684</width>
<height>623</height>
<height>621</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
......@@ -218,99 +218,130 @@
</widget>
</widget>
</item>
<item row="2" column="0">
<layout class="QGridLayout" name="figure_ctls_gbox">
<item row="1" column="0">
<widget class="QCheckBox" name="grid_on_chkbox">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Grid</string>
<string>X Limit:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_6">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>To</string>
<string>From</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QLabel" name="label_7">
<item>
<widget class="QLineEdit" name="xlim_x1_lineEdit">
<property name="text">
<string>Y Limit:</string>
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="mticks_on_chkbox">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Minor Ticks</string>
<string>To</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<item>
<widget class="QLineEdit" name="xlim_x2_lineEdit">
<property name="text">
<string>X Limit:</string>
<string>1</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_5">
<item>
<widget class="QToolButton" name="auto_xlim_btn">
<property name="text">
<string>From</string>
<string>Auto</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="tight_layout_on_chkbox">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Compact</string>
<string>Y Limit:</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLineEdit" name="xlim_x2_lineEdit">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>1</string>
<string>From</string>
</property>
</widget>
</item>
<item row="0" column="7">
<item>
<widget class="QLineEdit" name="ylim_y1_lineEdit">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="xlim_x1_lineEdit">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>0</string>
<string>To</string>
</property>
</widget>
</item>
<item row="0" column="9">
<item>
<widget class="QLineEdit" name="ylim_y2_lineEdit">
<property name="text">
<string>1</string>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QLabel" name="label_8">
<item>
<widget class="QToolButton" name="auto_ylim_btn">
<property name="text">
<string>From</string>
<string>Auto</string>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QLabel" name="label_9">
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QCheckBox" name="grid_on_chkbox">
<property name="text">
<string>To</string>
<string>Grid</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mticks_on_chkbox">
<property name="text">
<string>Minor Ticks</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="tight_layout_on_chkbox">
<property name="text">
<string>Compact</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
......@@ -572,9 +603,43 @@
</hint>
</hints>
</connection>
<connection>
<sender>auto_xlim_btn</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>on_auto_xlim()</slot>
<hints>
<hint type="sourcelabel">
<x>836</x>
<y>782</y>
</hint>
<hint type="destinationlabel">
<x>1730</x>
<y>738</y>
</hint>
</hints>
</connection>
<connection>
<sender>auto_ylim_btn</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>on_auto_ylim()</slot>
<hints>
<hint type="sourcelabel">
<x>1675</x>
<y>774</y>
</hint>
<hint type="destinationlabel">
<x>1729</x>
<y>776</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>onAbout()</slot>
<slot>onAboutQt()</slot>
<slot>on_auto_xlim()</slot>
<slot>on_auto_ylim()</slot>
</slots>
</ui>
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