ui_app.py 20.5 KB
Newer Older
1
2
3
4
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'ui_app.ui'
#
5
# Created by: PyQt5 UI code generator 5.14.1
6
7
8
9
10
11
12
13
14
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
Tong Zhang's avatar
Tong Zhang committed
15
        MainWindow.resize(1734, 913)
16
        icon = QtGui.QIcon()
17
18
        icon.addPixmap(QtGui.QPixmap(":/icons/default.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
19
20
21
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
22
23
24
25
26
27
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
Tong Zhang's avatar
Tong Zhang committed
28
29
        self.verticalLayout = QtWidgets.QVBoxLayout(self.tab)
        self.verticalLayout.setObjectName("verticalLayout")
Tong Zhang's avatar
Tong Zhang committed
30
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
31
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
Tong Zhang's avatar
Tong Zhang committed
32
33
34
35
36
37
38
39
40
41
42
        self.label_3 = QtWidgets.QLabel(self.tab)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_2.addWidget(self.label_3)
        self.elemlist_cbb = QtWidgets.QComboBox(self.tab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.elemlist_cbb.sizePolicy().hasHeightForWidth())
        self.elemlist_cbb.setSizePolicy(sizePolicy)
Tong Zhang's avatar
Tong Zhang committed
43
44
45
        font = QtGui.QFont()
        font.setFamily("Monospace")
        self.elemlist_cbb.setFont(font)
Tong Zhang's avatar
Tong Zhang committed
46
47
        self.elemlist_cbb.setObjectName("elemlist_cbb")
        self.horizontalLayout_2.addWidget(self.elemlist_cbb)
Tong Zhang's avatar
Tong Zhang committed
48
49
50
51
52
53
54
55
56
        self.elem_info_btn = QtWidgets.QToolButton(self.tab)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/info.png"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        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)
Tong Zhang's avatar
Tong Zhang committed
57
58
59
60
61
62
63
64
        self.pos_lineEdit = QtWidgets.QLineEdit(self.tab)
        self.pos_lineEdit.setReadOnly(True)
        self.pos_lineEdit.setObjectName("pos_lineEdit")
        self.horizontalLayout_2.addWidget(self.pos_lineEdit)
        self.family_lineEdit = QtWidgets.QLineEdit(self.tab)
        self.family_lineEdit.setReadOnly(True)
        self.family_lineEdit.setObjectName("family_lineEdit")
        self.horizontalLayout_2.addWidget(self.family_lineEdit)
Tong Zhang's avatar
Tong Zhang committed
65
        self.verticalLayout.addLayout(self.horizontalLayout_2)
Tong Zhang's avatar
Tong Zhang committed
66
67
68
69
        self.scrollArea = QtWidgets.QScrollArea(self.tab)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.ellipse_area = QtWidgets.QWidget()
70
        self.ellipse_area.setGeometry(QtCore.QRect(0, 0, 1684, 618))
Tong Zhang's avatar
Tong Zhang committed
71
72
73
        self.ellipse_area.setObjectName("ellipse_area")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.ellipse_area)
        self.gridLayout_2.setObjectName("gridLayout_2")
Tong Zhang's avatar
Tong Zhang committed
74
75
76
77
78
79
80
81
82
        self.splitter = QtWidgets.QSplitter(self.ellipse_area)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.widget = QtWidgets.QWidget(self.splitter)
        self.widget.setObjectName("widget")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.widget)
        self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.x_ellipse_plot = MatplotlibBaseWidget(self.widget)
Doerr, Kevin's avatar
Doerr, Kevin committed
83
84
85
86
87
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
88
89
90
            self.x_ellipse_plot.sizePolicy().hasHeightForWidth())
        self.x_ellipse_plot.setSizePolicy(sizePolicy)
        self.x_ellipse_plot.setFigureTitle("")
Tong Zhang's avatar
Tong Zhang committed
91
92
93
94
95
96
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(14)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
97
        self.x_ellipse_plot.setFigureXYlabelFont(font)
Tong Zhang's avatar
Tong Zhang committed
98
99
100
101
102
103
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(16)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
104
        self.x_ellipse_plot.setFigureTitleFont(font)
Tong Zhang's avatar
Tong Zhang committed
105
106
107
108
109
110
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(12)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
111
112
113
        self.x_ellipse_plot.setFigureXYticksFont(font)
        self.x_ellipse_plot.setProperty("figureToolbarToggle", False)
        self.x_ellipse_plot.setObjectName("x_ellipse_plot")
Tong Zhang's avatar
Tong Zhang committed
114
115
        self.horizontalLayout_4.addWidget(self.x_ellipse_plot)
        self.y_ellipse_plot = MatplotlibBaseWidget(self.widget)
Doerr, Kevin's avatar
Doerr, Kevin committed
116
117
118
119
120
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
121
122
            self.y_ellipse_plot.sizePolicy().hasHeightForWidth())
        self.y_ellipse_plot.setSizePolicy(sizePolicy)
Doerr, Kevin's avatar
Doerr, Kevin committed
123
124
125
126
127
128
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(14)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
129
        self.y_ellipse_plot.setFigureXYlabelFont(font)
Doerr, Kevin's avatar
Doerr, Kevin committed
130
131
132
133
134
135
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(16)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
136
        self.y_ellipse_plot.setFigureTitleFont(font)
Doerr, Kevin's avatar
Doerr, Kevin committed
137
138
139
140
141
142
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(12)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
143
144
145
        self.y_ellipse_plot.setFigureXYticksFont(font)
        self.y_ellipse_plot.setProperty("figureToolbarToggle", False)
        self.y_ellipse_plot.setObjectName("y_ellipse_plot")
Tong Zhang's avatar
Tong Zhang committed
146
147
148
149
        self.horizontalLayout_4.addWidget(self.y_ellipse_plot)
        self.twiss_results_treeView = QtWidgets.QTreeView(self.splitter)
        self.twiss_results_treeView.setObjectName("twiss_results_treeView")
        self.gridLayout_2.addWidget(self.splitter, 0, 0, 1, 1)
Tong Zhang's avatar
Tong Zhang committed
150
        self.scrollArea.setWidget(self.ellipse_area)
Tong Zhang's avatar
Tong Zhang committed
151
152
153
        self.verticalLayout.addWidget(self.scrollArea)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
Tong Zhang's avatar
Tong Zhang committed
154
155
        self.label_4 = QtWidgets.QLabel(self.tab)
        self.label_4.setObjectName("label_4")
Tong Zhang's avatar
Tong Zhang committed
156
        self.horizontalLayout_5.addWidget(self.label_4)
Tong Zhang's avatar
Tong Zhang committed
157
158
        self.label_5 = QtWidgets.QLabel(self.tab)
        self.label_5.setObjectName("label_5")
Tong Zhang's avatar
Tong Zhang committed
159
        self.horizontalLayout_5.addWidget(self.label_5)
Tong Zhang's avatar
Tong Zhang committed
160
161
        self.xlim_x1_lineEdit = QtWidgets.QLineEdit(self.tab)
        self.xlim_x1_lineEdit.setObjectName("xlim_x1_lineEdit")
Tong Zhang's avatar
Tong Zhang committed
162
163
164
165
166
167
168
169
170
171
172
173
174
        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)
Tong Zhang's avatar
Tong Zhang committed
175
176
        self.label_8 = QtWidgets.QLabel(self.tab)
        self.label_8.setObjectName("label_8")
Tong Zhang's avatar
Tong Zhang committed
177
178
179
180
        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)
Tong Zhang's avatar
Tong Zhang committed
181
182
        self.label_9 = QtWidgets.QLabel(self.tab)
        self.label_9.setObjectName("label_9")
Tong Zhang's avatar
Tong Zhang committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
        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)
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
        self.line = QtWidgets.QFrame(self.tab)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout_6.addWidget(self.line)
        self.label_10 = QtWidgets.QLabel(self.tab)
        self.label_10.setObjectName("label_10")
        self.horizontalLayout_6.addWidget(self.label_10)
        self.size_factor_sbox = QtWidgets.QSpinBox(self.tab)
        self.size_factor_sbox.setSuffix("")
        self.size_factor_sbox.setMinimum(1)
        self.size_factor_sbox.setMaximum(6)
        self.size_factor_sbox.setObjectName("size_factor_sbox")
        self.horizontalLayout_6.addWidget(self.size_factor_sbox)
        self.label_11 = QtWidgets.QLabel(self.tab)
        self.label_11.setObjectName("label_11")
        self.horizontalLayout_6.addWidget(self.label_11)
Tong Zhang's avatar
Tong Zhang committed
219
220
221
222
223
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem)
        self.verticalLayout.addLayout(self.horizontalLayout_6)
224
225
226
227
228
229
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.tab_2)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.envelope_plot = MatplotlibCurveWidget(self.tab_2)
Tong Zhang's avatar
Tong Zhang committed
230
        self.envelope_plot.setFigureAutoScale(True)
231
232
233
234
235
236
237
238
239
240
241
242
        font = QtGui.QFont()
        font.setFamily("sans-serif")
        font.setPointSize(14)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.envelope_plot.setFigureXYlabelFont(font)
        self.envelope_plot.setProperty("figureLegendToggle", True)
        self.envelope_plot.setObjectName("envelope_plot")
        self.horizontalLayout_3.addWidget(self.envelope_plot)
        self.tabWidget.addTab(self.tab_2, "")
        self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
Tong Zhang's avatar
Tong Zhang committed
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.quad1_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)
        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.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)
Tong Zhang's avatar
Tong Zhang committed
274
275
276
277
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
Tong Zhang's avatar
Tong Zhang committed
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_2.sizePolicy().hasHeightForWidth())
        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.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
296
297
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
Tong Zhang's avatar
Tong Zhang committed
298
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1734, 30))
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
        self.menubar.setObjectName("menubar")
        self.menu_File = QtWidgets.QMenu(self.menubar)
        self.menu_File.setObjectName("menu_File")
        self.menu_Help = QtWidgets.QMenu(self.menubar)
        self.menu_Help.setObjectName("menu_Help")
        MainWindow.setMenuBar(self.menubar)
        self.action_About = QtWidgets.QAction(MainWindow)
        self.action_About.setObjectName("action_About")
        self.actionAbout_Qt = QtWidgets.QAction(MainWindow)
        self.actionAbout_Qt.setObjectName("actionAbout_Qt")
        self.actionE_xit = QtWidgets.QAction(MainWindow)
        self.actionE_xit.setObjectName("actionE_xit")
        self.actionContents = QtWidgets.QAction(MainWindow)
        self.actionContents.setObjectName("actionContents")
        self.menu_File.addAction(self.actionE_xit)
        self.menu_Help.addAction(self.actionContents)
        self.menu_Help.addSeparator()
        self.menu_Help.addAction(self.action_About)
        self.menu_Help.addAction(self.actionAbout_Qt)
        self.menubar.addAction(self.menu_File.menuAction())
        self.menubar.addAction(self.menu_Help.menuAction())

        self.retranslateUi(MainWindow)
322
        self.tabWidget.setCurrentIndex(0)
323
324
325
        self.actionAbout_Qt.triggered.connect(MainWindow.onAboutQt)
        self.actionE_xit.triggered.connect(MainWindow.close)
        self.action_About.triggered.connect(MainWindow.onAbout)
Tong Zhang's avatar
Tong Zhang committed
326
327
        self.auto_xlim_btn.clicked.connect(MainWindow.on_auto_xlim)
        self.auto_ylim_btn.clicked.connect(MainWindow.on_auto_ylim)
328
329
        self.size_factor_sbox.valueChanged['int'].connect(
            MainWindow.on_ellipse_size_changed)
330
331
332
333
334
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
Tong Zhang's avatar
Tong Zhang committed
335
        self.label_3.setText(_translate("MainWindow", "Show results after"))
Tong Zhang's avatar
Tong Zhang committed
336
337
338
339
        self.elem_info_btn.setToolTip(
            _translate("MainWindow",
                       "Click to see the details of selected device."))
        self.elem_info_btn.setText(_translate("MainWindow", "info"))
340
341
        self.x_ellipse_plot.setFigureXlabel(_translate("MainWindow", "X (mm)"))
        self.x_ellipse_plot.setFigureYlabel(
Doerr, Kevin's avatar
Doerr, Kevin committed
342
            _translate("MainWindow", "X\' (mrad)"))
343
344
345
        self.y_ellipse_plot.setFigureXlabel(_translate("MainWindow", "Y (mm)"))
        self.y_ellipse_plot.setFigureYlabel(
            _translate("MainWindow", "Y\' (mrad)"))
Tong Zhang's avatar
Tong Zhang committed
346
347
348
        self.label_4.setText(_translate("MainWindow", "X Limit:"))
        self.label_5.setText(_translate("MainWindow", "From"))
        self.xlim_x1_lineEdit.setText(_translate("MainWindow", "0"))
Tong Zhang's avatar
Tong Zhang committed
349
350
351
352
        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:"))
Tong Zhang's avatar
Tong Zhang committed
353
        self.label_8.setText(_translate("MainWindow", "From"))
Tong Zhang's avatar
Tong Zhang committed
354
        self.ylim_y1_lineEdit.setText(_translate("MainWindow", "0"))
Tong Zhang's avatar
Tong Zhang committed
355
        self.label_9.setText(_translate("MainWindow", "To"))
Tong Zhang's avatar
Tong Zhang committed
356
357
358
359
360
361
        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"))
362
363
364
365
        self.label_10.setText(_translate("MainWindow", "Ellipse Size"))
        self.label_11.setText(
            _translate("MainWindow",
                       "<html><head/><body><p>&sigma;</p></body></html>"))
366
367
368
369
370
371
372
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
                                  _translate("MainWindow", "Beam Ellipse"))
        self.envelope_plot.setFigureXlabel(_translate("MainWindow", "s [m]"))
        self.envelope_plot.setFigureYlabel(
            _translate("MainWindow", "Envelop [mm]"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),
                                  _translate("MainWindow", "Beam Envelope"))
Tong Zhang's avatar
Tong Zhang committed
373
374
375
376
377
378
379
        self.label.setText(_translate("MainWindow", "Select quadrupole"))
        self.quad_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"))
380
381
382
383
384
385
386
387
388
389
390
        self.menu_File.setTitle(_translate("MainWindow", "&File"))
        self.menu_Help.setTitle(_translate("MainWindow", "&Help"))
        self.action_About.setText(_translate("MainWindow", "&About"))
        self.action_About.setShortcut(_translate("MainWindow", "Ctrl+A"))
        self.actionAbout_Qt.setText(_translate("MainWindow", "About Qt"))
        self.actionE_xit.setText(_translate("MainWindow", "E&xit"))
        self.actionE_xit.setShortcut(_translate("MainWindow", "Ctrl+W"))
        self.actionContents.setText(_translate("MainWindow", "Contents"))
        self.actionContents.setShortcut(_translate("MainWindow", "F1"))


Tong Zhang's avatar
Tong Zhang committed
391
from mpl4qt.widgets.mplbasewidget import MatplotlibBaseWidget
392
from mpl4qt.widgets.mplcurvewidget import MatplotlibCurveWidget
393
394
395
396
397
398
399
400
401
402
from . import resources_rc

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())