|
@@ -301,11 +301,11 @@ class timingWidget(kcgw.KCGWidgets):
|
|
|
self.layout = QtGui.QGridLayout()
|
|
|
self.outerLayout = QtGui.QVBoxLayout()
|
|
|
self.outerLayout.addLayout(self.layout)
|
|
|
- self.outerLayout.addStretch(1)
|
|
|
self.setLayout(self.outerLayout)
|
|
|
self.time_scan_enabled = False
|
|
|
|
|
|
# --------[ Create TimeScan part ]----------
|
|
|
+
|
|
|
self.coarse_scan_range_label = self.createLabel(tr("Label", "Coarse scan range"))
|
|
|
self.fine_scan_range_label = self.createLabel(tr("Label", "Fine scan range"))
|
|
|
self.coarse_scan_min_spinbox = self.createSpinbox(0, bif.bk_get_config('th_delay_max'), start_value=0)
|
|
@@ -316,8 +316,7 @@ class timingWidget(kcgw.KCGWidgets):
|
|
|
self.time_scan_button = self.createButton(tr("Button", "Start time scan"), connect=self.time_scan)
|
|
|
Elements.addButton("start_time_scan", self.time_scan_button)
|
|
|
self.timeScan = QtGui.QWidget()
|
|
|
- self.outerLayout.addWidget(self.timeScan)
|
|
|
- self.timeScan.hide()
|
|
|
+
|
|
|
self.timeScanVLayout = QtGui.QVBoxLayout()
|
|
|
self.timeScanLayout = QtGui.QGridLayout()
|
|
|
self.timeScanVLayout.addWidget(self.time_scan_progressbar)
|
|
@@ -331,7 +330,11 @@ class timingWidget(kcgw.KCGWidgets):
|
|
|
self.timeScanLayout.addWidget(self.fine_scan_max_spinbox, 3, 1)
|
|
|
self.timeScanLayout.addWidget(self.time_scan_button, 4, 0)
|
|
|
self.setTabOrder(self.fine_scan_max_spinbox, self.time_scan_button)
|
|
|
- # --------[ Create Labels and corresponding Fields ]---------
|
|
|
+
|
|
|
+ # --------[ End Time Scan Part ]-------------
|
|
|
+
|
|
|
+ # --------[ Create Labels and corresponding Fields ]---------
|
|
|
+
|
|
|
def update_delay(which, spinbox):
|
|
|
board.config.update(which, getattr(self, spinbox).value())
|
|
|
self.thdelayLabel = self.createLabel(tr("Label", "T/H Delay"))
|
|
@@ -427,6 +430,12 @@ class timingWidget(kcgw.KCGWidgets):
|
|
|
self.layout.addWidget(self.totalAdc4Box, 4, 4)
|
|
|
self.layout.addWidget(self.toggleTimeScanCheckbox, 5, 0)
|
|
|
|
|
|
+ # -------[ Add TimeScan ]---------
|
|
|
+ self.outerLayout.addWidget(self.timeScan)
|
|
|
+ self.timeScan.hide()
|
|
|
+ self.outerLayout.addStretch(1)
|
|
|
+ # -------[ End ]-----------
|
|
|
+
|
|
|
# ------[ Exclude Total Delay Boxes from Tab Order ]--------
|
|
|
self.totalAdc1Box.setFocusPolicy(QtCore.Qt.ClickFocus)
|
|
|
self.totalAdc2Box.setFocusPolicy(QtCore.Qt.ClickFocus)
|
|
@@ -444,12 +453,14 @@ class timingWidget(kcgw.KCGWidgets):
|
|
|
|
|
|
def showTimeScan(self):
|
|
|
if self.timeScan.isHidden():
|
|
|
+ # self.outerLayout.addWidget(self.timeScan)
|
|
|
self.timeScan.show()
|
|
|
- # self.parent().resize(self.outerLayout.minimumSize())
|
|
|
- self.parent().resize(self.minimumSizeHint()*1.2)
|
|
|
else:
|
|
|
self.timeScan.hide()
|
|
|
- # self.parent().resize(self.outerLayout.minimumSize())
|
|
|
+ # self.outerLayout.removeWidget(self.timeScan)
|
|
|
+ if self.parent().windowState() & QtCore.Qt.WindowMaximized:
|
|
|
+ self.parent().setWindowState(QtCore.Qt.WindowMaximized)
|
|
|
+ else:
|
|
|
self.parent().resize(self.minimumSizeHint()*1.2)
|
|
|
|
|
|
def time_scan(self):
|