-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuadCentering_ui.py
222 lines (209 loc) · 13 KB
/
QuadCentering_ui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\Marija\Documents\workspace\tests\quad_centering\QuadCentering_v3.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(1329, 858)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.verticalLayout.setObjectName("verticalLayout")
self.widget = QtWidgets.QWidget(Form)
self.widget.setMinimumSize(QtCore.QSize(500, 0))
self.widget.setObjectName("widget")
self.graphicsView = QtWidgets.QGraphicsView(self.widget)
self.graphicsView.setGeometry(QtCore.QRect(0, 1, 491, 501))
self.graphicsView.setObjectName("graphicsView")
self.scanPlotWidget = pq.PlotWidget(useOpenGL=True)
#PlotWidget(self.widget)
self.scanPlotWidget.setGeometry(QtCore.QRect(9, 619, 481, 211))
self.scanPlotWidget.setAutoFillBackground(False)
self.scanPlotWidget.setObjectName("scanPlotWidget")
self.verticalLayout.addWidget(self.widget)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.widget_2 = QtWidgets.QWidget(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
self.widget_2.setSizePolicy(sizePolicy)
self.widget_2.setMinimumSize(QtCore.QSize(200, 0))
self.widget_2.setObjectName("widget_2")
self.horizontalLayoutWidget_3 = QtWidgets.QWidget(self.widget_2)
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 361, 391))
self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.horizontalLayoutWidget_3)
self.verticalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.DeviceSelectionBox = QtWidgets.QGroupBox(self.horizontalLayoutWidget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.DeviceSelectionBox.sizePolicy().hasHeightForWidth())
self.DeviceSelectionBox.setSizePolicy(sizePolicy)
self.DeviceSelectionBox.setMaximumSize(QtCore.QSize(350, 150))
self.DeviceSelectionBox.setObjectName("DeviceSelectionBox")
self.SectionSelectionLabel = QtWidgets.QLabel(self.DeviceSelectionBox)
self.SectionSelectionLabel.setGeometry(QtCore.QRect(20, 20, 47, 13))
self.SectionSelectionLabel.setObjectName("SectionSelectionLabel")
self.SectionSelectionCombobox = QtWidgets.QComboBox(self.DeviceSelectionBox)
self.SectionSelectionCombobox.setGeometry(QtCore.QRect(70, 20, 271, 20))
self.SectionSelectionCombobox.setObjectName("SectionSelectionCombobox")
self.quadSelectionLabel = QtWidgets.QLabel(self.DeviceSelectionBox)
self.quadSelectionLabel.setGeometry(QtCore.QRect(20, 80, 47, 13))
self.quadSelectionLabel.setObjectName("quadSelectionLabel")
self.screenSelectrionCombobox = QtWidgets.QComboBox(self.DeviceSelectionBox)
self.screenSelectrionCombobox.setGeometry(QtCore.QRect(70, 50, 271, 20))
self.screenSelectrionCombobox.setObjectName("screenSelectrionCombobox")
self.quadSelectionCombobox = QtWidgets.QComboBox(self.DeviceSelectionBox)
self.quadSelectionCombobox.setGeometry(QtCore.QRect(70, 80, 271, 20))
self.quadSelectionCombobox.setObjectName("quadSelectionCombobox")
self.screenSelectionLabel = QtWidgets.QLabel(self.DeviceSelectionBox)
self.screenSelectionLabel.setGeometry(QtCore.QRect(20, 50, 47, 16))
self.screenSelectionLabel.setObjectName("screenSelectionLabel")
self.correctorSelectrionCombobox = QtWidgets.QComboBox(self.DeviceSelectionBox)
self.correctorSelectrionCombobox.setGeometry(QtCore.QRect(70, 110, 271, 20))
self.correctorSelectrionCombobox.setObjectName("correctorSelectrionCombobox")
self.correctorSelectionLabel = QtWidgets.QLabel(self.DeviceSelectionBox)
self.correctorSelectionLabel.setGeometry(QtCore.QRect(20, 110, 47, 13))
self.correctorSelectionLabel.setObjectName("correctorSelectionLabel")
self.verticalLayout_2.addWidget(self.DeviceSelectionBox)
self.ScanSetupBox = QtWidgets.QGroupBox(self.horizontalLayoutWidget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ScanSetupBox.sizePolicy().hasHeightForWidth())
self.ScanSetupBox.setSizePolicy(sizePolicy)
self.ScanSetupBox.setMinimumSize(QtCore.QSize(150, 0))
self.ScanSetupBox.setMaximumSize(QtCore.QSize(200, 80))
self.ScanSetupBox.setObjectName("ScanSetupBox")
self.quadReadValueLabel = QtWidgets.QLabel(self.ScanSetupBox)
self.quadReadValueLabel.setGeometry(QtCore.QRect(20, 20, 41, 16))
self.quadReadValueLabel.setObjectName("quadReadValueLabel")
self.quadReadValue = QtWidgets.QLabel(self.ScanSetupBox)
self.quadReadValue.setGeometry(QtCore.QRect(80, 23, 47, 13))
self.quadReadValue.setObjectName("quadReadValue")
self.correctorReadValueLabel = QtWidgets.QLabel(self.ScanSetupBox)
self.correctorReadValueLabel.setGeometry(QtCore.QRect(20, 50, 41, 16))
self.correctorReadValueLabel.setObjectName("correctorReadValueLabel")
self.correctorReadValue = QtWidgets.QLabel(self.ScanSetupBox)
self.correctorReadValue.setGeometry(QtCore.QRect(80, 53, 47, 13))
self.correctorReadValue.setObjectName("correctorReadValue")
self.verticalLayout_2.addWidget(self.ScanSetupBox)
self.ScanSetupBox_2 = QtWidgets.QGroupBox(self.horizontalLayoutWidget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ScanSetupBox_2.sizePolicy().hasHeightForWidth())
self.ScanSetupBox_2.setSizePolicy(sizePolicy)
self.ScanSetupBox_2.setMaximumSize(QtCore.QSize(320, 150))
self.ScanSetupBox_2.setAutoFillBackground(False)
self.ScanSetupBox_2.setObjectName("ScanSetupBox_2")
self.quadNumLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.quadNumLabel.setGeometry(QtCore.QRect(20, 20, 71, 16))
self.quadNumLabel.setObjectName("quadNumLabel")
self.NumShotsLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.NumShotsLabel.setGeometry(QtCore.QRect(20, 110, 71, 16))
self.NumShotsLabel.setObjectName("NumShotsLabel")
self.quadMinLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.quadMinLabel.setGeometry(QtCore.QRect(20, 50, 71, 16))
self.quadMinLabel.setObjectName("quadMinLabel")
self.quadMaxLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.quadMaxLabel.setGeometry(QtCore.QRect(20, 80, 71, 16))
self.quadMaxLabel.setObjectName("quadMaxLabel")
self.quadNumSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.quadNumSpinbox.setGeometry(QtCore.QRect(100, 20, 42, 22))
self.quadNumSpinbox.setProperty("value", 4)
self.quadNumSpinbox.setObjectName("quadNumSpinbox")
self.numShotsSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.numShotsSpinbox.setGeometry(QtCore.QRect(100, 110, 42, 22))
self.numShotsSpinbox.setProperty("value", 1)
self.numShotsSpinbox.setObjectName("numShotsSpinbox")
self.quadMinSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.quadMinSpinbox.setGeometry(QtCore.QRect(100, 50, 42, 22))
self.quadMinSpinbox.setObjectName("quadMinSpinbox")
self.quadMaxSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.quadMaxSpinbox.setGeometry(QtCore.QRect(100, 80, 42, 22))
self.quadMaxSpinbox.setObjectName("quadMaxSpinbox")
self.numCorrSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.numCorrSpinbox.setGeometry(QtCore.QRect(250, 20, 42, 22))
self.numCorrSpinbox.setProperty("value", 5)
self.numCorrSpinbox.setObjectName("numCorrSpinbox")
self.IminLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.IminLabel.setGeometry(QtCore.QRect(180, 50, 61, 16))
self.IminLabel.setObjectName("IminLabel")
self.IminSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.IminSpinbox.setGeometry(QtCore.QRect(250, 50, 42, 22))
self.IminSpinbox.setObjectName("IminSpinbox")
self.ImaxLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.ImaxLabel.setGeometry(QtCore.QRect(180, 80, 61, 16))
self.ImaxLabel.setObjectName("ImaxLabel")
self.ImaxSpinbox = QtWidgets.QSpinBox(self.ScanSetupBox_2)
self.ImaxSpinbox.setGeometry(QtCore.QRect(250, 80, 42, 22))
self.ImaxSpinbox.setObjectName("ImaxSpinbox")
self.startScanButton = QtWidgets.QPushButton(self.ScanSetupBox_2)
self.startScanButton.setGeometry(QtCore.QRect(200, 110, 75, 23))
self.startScanButton.setObjectName("startScanButton")
self.numCorrLabel = QtWidgets.QLabel(self.ScanSetupBox_2)
self.numCorrLabel.setGeometry(QtCore.QRect(180, 20, 71, 16))
self.numCorrLabel.setObjectName("numCorrLabel")
self.verticalLayout_2.addWidget(self.ScanSetupBox_2)
self.horizontalLayout_3.addWidget(self.widget_2)
self.gridLayout_2.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
self.gridLayout.addLayout(self.gridLayout_2, 0, 1, 1, 1)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.AnalysisPlot1 = pq.PlotWidget(useOpenGL=True)
self.AnalysisPlot1.setMaximumSize(QtCore.QSize(450, 400))
self.AnalysisPlot1.setObjectName("AnalysisPlot1")
self.verticalLayout_3.addWidget(self.AnalysisPlot1)
self.AnalysisPlot2 = pq.PlotWidget(useOpenGL=True)
self.AnalysisPlot2.setMaximumSize(QtCore.QSize(450, 400))
self.AnalysisPlot2.setObjectName("AnalysisPlot2")
self.verticalLayout_3.addWidget(self.AnalysisPlot2)
self.gridLayout.addLayout(self.verticalLayout_3, 0, 2, 1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.DeviceSelectionBox.setTitle(_translate("Form", "Device Selection"))
self.SectionSelectionLabel.setText(_translate("Form", "Section"))
self.quadSelectionLabel.setText(_translate("Form", "Quad"))
self.screenSelectionLabel.setText(_translate("Form", "Screen"))
self.correctorSelectionLabel.setText(_translate("Form", "Corrector"))
self.ScanSetupBox.setTitle(_translate("Form", "Device info"))
self.quadReadValueLabel.setText(_translate("Form", "quad k"))
self.quadReadValue.setText(_translate("Form", "--"))
self.correctorReadValueLabel.setText(_translate("Form", "corr I"))
self.correctorReadValue.setText(_translate("Form", "--"))
self.ScanSetupBox_2.setTitle(_translate("Form", "Scan Setup"))
self.quadNumLabel.setText(_translate("Form", "Num quad k\'s"))
self.NumShotsLabel.setText(_translate("Form", "Num shots"))
self.quadMinLabel.setText(_translate("Form", "k quad min"))
self.quadMaxLabel.setText(_translate("Form", "k quad max"))
self.IminLabel.setText(_translate("Form", "I corr min"))
self.ImaxLabel.setText(_translate("Form", "I corr max"))
self.startScanButton.setText(_translate("Form", "Start scan"))
self.numCorrLabel.setText(_translate("Form", "Num corr I\'s"))
import pyqtgraph as pq
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
sys.exit(app.exec_())