Commit 127a348d authored by Paolo Cinquegrana's avatar Paolo Cinquegrana
Browse files

modificato layout tiptilt

parent 49d8643e
......@@ -292,9 +292,13 @@ class MainWindow(QDialog):
self.feedback0x = QProgressBar()
self.feedback0x.setRange(0, 100)
self.feedback0x.setValue(0)
self.feedback0x.setToolTip('Horizontal')
self.feedback0x.setAlignment(Qt.AlignCenter)
self.feedback0y = QProgressBar()
self.feedback0y.setRange(0, 100)
self.feedback0y.setValue(0)
self.feedback0y.setToolTip('Vertical')
self.feedback0y.setAlignment(Qt.AlignCenter)
self.feedback0corrector = QPushButton("tiptilt")
self.feedback0corrector.clicked.connect(self.apritiptilt0)
self.feedback0monitor = QPushButton("CCD")
......@@ -311,10 +315,12 @@ class MainWindow(QDialog):
self.feedback1x.setRange(0, 100)
self.feedback1x.setValue(0)
self.feedback1x.setToolTip('Horizontal')
self.feedback1x.setAlignment(Qt.AlignCenter)
self.feedback1y = QProgressBar()
self.feedback1y.setRange(0, 100)
self.feedback1y.setValue(0)
self.feedback1y.setToolTip('Vertical')
self.feedback1y.setAlignment(Qt.AlignCenter)
self.feedback1corrector = QPushButton("tiptilt")
self.feedback1corrector.clicked.connect(self.apritiptilt1)
self.feedback1monitor = QPushButton("CCD")
......@@ -325,10 +331,12 @@ class MainWindow(QDialog):
self.feedback2x.setRange(0, 100)
self.feedback2x.setValue(0)
self.feedback2x.setToolTip('Horizontal')
self.feedback2x.setAlignment(Qt.AlignCenter)
self.feedback2y = QProgressBar()
self.feedback2y.setRange(0, 100)
self.feedback2y.setValue(0)
self.feedback2y.setToolTip('Vertical')
self.feedback2y.setAlignment(Qt.AlignCenter)
self.feedback2corrector = QPushButton("tiptilt")
self.feedback2corrector.clicked.connect(self.apritiptilt2)
self.feedback2monitor = QPushButton("CCD")
......@@ -339,10 +347,12 @@ class MainWindow(QDialog):
self.feedback3x.setRange(0, 100)
self.feedback3x.setValue(0)
self.feedback3x.setToolTip('Horizontal')
self.feedback3x.setAlignment(Qt.AlignCenter)
self.feedback3y = QProgressBar()
self.feedback3y.setRange(0, 100)
self.feedback3y.setValue(0)
self.feedback3y.setToolTip('Vertical')
self.feedback3y.setAlignment(Qt.AlignCenter)
self.feedback3corrector = QPushButton("tiptilt")
self.feedback3corrector.clicked.connect(self.apritiptilt3)
self.feedback3monitor = QPushButton("CCD")
......@@ -353,10 +363,12 @@ class MainWindow(QDialog):
self.feedback4x.setRange(0, 100)
self.feedback4x.setValue(0)
self.feedback4x.setToolTip('Horizontal')
self.feedback4x.setAlignment(Qt.AlignCenter)
self.feedback4y = QProgressBar()
self.feedback4y.setRange(0, 100)
self.feedback4y.setValue(0)
self.feedback4y.setToolTip('Vertical')
self.feedback4y.setAlignment(Qt.AlignCenter)
self.feedback4corrector = QPushButton("tiptilt")
self.feedback4corrector.clicked.connect(self.apritiptilt4)
self.feedback4monitor = QPushButton("CCD")
......@@ -378,30 +390,30 @@ class MainWindow(QDialog):
lofeedback.addWidget(self.feedbackstopothersccds, 1, 4)
lofeedback.addWidget(self.feedbackstopothers, 1, 5)
lofeedback.addWidget(self.feedback0L, 2, 0, 1, 2)
lofeedback.addWidget(self.feedback0x, 3, 0)
lofeedback.addWidget(self.feedback0y, 3, 1)
lofeedback.addWidget(self.feedback0monitor, 5, 1)
lofeedback.addWidget(self.feedback0corrector, 5, 0)
lofeedback.addWidget(self.feedback0monitor, 3, 0, 1, 2)
lofeedback.addWidget(self.feedback0corrector, 4, 0, 1, 2)
lofeedback.addWidget(self.feedback0x, 5, 0)
lofeedback.addWidget(self.feedback0y, 5, 1)
lofeedback.addWidget(self.feedback1L, 2, 2, 1, 2)
lofeedback.addWidget(self.feedback1x, 3, 2)
lofeedback.addWidget(self.feedback1y, 3, 3)
lofeedback.addWidget(self.feedback1monitor, 5, 3)
lofeedback.addWidget(self.feedback1corrector, 5, 2)
lofeedback.addWidget(self.feedback1monitor, 3, 2, 1, 2)
lofeedback.addWidget(self.feedback1corrector, 4, 2, 1, 2)
lofeedback.addWidget(self.feedback1x, 5, 2)
lofeedback.addWidget(self.feedback1y, 5, 3)
lofeedback.addWidget(self.feedback2L, 2, 4, 1, 2)
lofeedback.addWidget(self.feedback2x, 3, 4)
lofeedback.addWidget(self.feedback2y, 3, 5)
lofeedback.addWidget(self.feedback2monitor, 5, 5)
lofeedback.addWidget(self.feedback2corrector, 5, 4)
lofeedback.addWidget(self.feedback2monitor, 3, 4, 1, 2)
lofeedback.addWidget(self.feedback2corrector, 4, 4, 1, 2)
lofeedback.addWidget(self.feedback2x, 5, 4)
lofeedback.addWidget(self.feedback2y, 5, 5)
lofeedback.addWidget(self.feedback3L, 2, 6, 1, 2)
lofeedback.addWidget(self.feedback3x, 3, 6)
lofeedback.addWidget(self.feedback3y, 3, 7)
lofeedback.addWidget(self.feedback3monitor, 5, 7)
lofeedback.addWidget(self.feedback3corrector, 5, 6)
lofeedback.addWidget(self.feedback3monitor, 3, 6, 1, 2)
lofeedback.addWidget(self.feedback3corrector, 4, 6, 1, 2)
lofeedback.addWidget(self.feedback3x, 5, 6)
lofeedback.addWidget(self.feedback3y, 5, 7)
lofeedback.addWidget(self.feedback4L, 2, 8, 1, 2)
lofeedback.addWidget(self.feedback4x, 3, 8)
lofeedback.addWidget(self.feedback4y, 3, 9)
lofeedback.addWidget(self.feedback4monitor, 5, 9)
lofeedback.addWidget(self.feedback4corrector, 5, 8)
lofeedback.addWidget(self.feedback4monitor, 3, 8, 1, 2)
lofeedback.addWidget(self.feedback4corrector, 4, 8, 1, 2)
lofeedback.addWidget(self.feedback4x, 5, 8)
lofeedback.addWidget(self.feedback4y, 5, 9)
self.gruppofeedback.setLayout(lofeedback)
### delay
self.gruppodelay = QGroupBox()
......@@ -797,7 +809,7 @@ class MainWindow(QDialog):
perc_x = eval("np.abs(sacco['piezo" + str(kkkk) + "'].VoltageHor - 131000)/1310")
eval("self.feedback" + str(kkkk) + "y.setValue(perc_y)")
eval("self.feedback" + str(kkkk) + "y.setTextVisible(1)")
eval("self.feedback" + str(kkkk) + "x.setValue(perc_y)")
eval("self.feedback" + str(kkkk) + "x.setValue(perc_x)")
eval("self.feedback" + str(kkkk) + "x.setTextVisible(1)")
if perc_y > 80:
eval("self.feedback" + str(kkkk) + "y.setStyleSheet('background-color: rgb(255, 0, 0)')")
......
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