rework config/parameter setting part 2

This commit is contained in:
2022-09-05 15:34:40 +02:00
parent 8fc532d3ae
commit d263c09028
3 changed files with 365 additions and 329 deletions

View File

@@ -114,7 +114,7 @@ import pyqtgraph.exporters
pg.setConfigOptions(antialias=True,imageAxisOrder='row-major')
ts.log('Import part 6/8:')
import app_utils
from app_config import AppCfg #settings, option, toggle_option
from app_config import AppCfg,WndParameter #settings, option, toggle_option
import epics
from epics.ca import pend_event
@@ -568,40 +568,41 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
self.shortcut.activated.connect(self._OLD_camera_pause_toggle)
# adding a menu entry to one of the menus
action = QAction("geometry", self)
action.setToolTip("Update optical center, beam marker size etc.")
action.setStatusTip("Update optical center, beam marker size etc.")
action.triggered.connect(lambda x: cfg.dlg_geometry(self))
self.menuAdvanced.addAction(action)
#action = QAction("geometry", self)
#action.setToolTip("Update optical center, beam marker size etc.")
#action.setStatusTip("Update optical center, beam marker size etc.")
#action.triggered.connect(lambda x: cfg.dlg_geometry(self))
#self.menuAdvanced.addAction(action)
action = QAction("Backlight Reference Positions", self)
action.setToolTip("Update the reference positions for the backlight")
action.setStatusTip("Update the reference positions for the backlight")
action.triggered.connect(cfg.dlg_backlight_positions)
self.menuAdvanced.addAction(action)
#action = QAction("Backlight Reference Positions", self)
#action.setToolTip("Update the reference positions for the backlight")
#action.setStatusTip("Update the reference positions for the backlight")
#action.triggered.connect(cfg.dlg_backlight_positions)
#self.menuAdvanced.addAction(action)
action = QAction("Collimator Reference Positions", self)
action.setToolTip("Update the reference positions for the collimator")
action.setStatusTip("Update the reference positions for the collimator")
action.triggered.connect(cfg.dlg_collimator_reference_positions)
self.menuAdvanced.addAction(action)
#action = QAction("Collimator Reference Positions", self)
#action.setToolTip("Update the reference positions for the collimator")
#action.setStatusTip("Update the reference positions for the collimator")
#action.triggered.connect(cfg.dlg_collimator_reference_positions)
#self.menuAdvanced.addAction(action)
action = QAction("Post sample tube Reference Positions", self)
action.setToolTip("Update the reference positions for the post tube")
action.setStatusTip("Update the reference positions for the post tube")
action.triggered.connect(cfg.dlg_posttube_references)
self.menuAdvanced.addAction(action)
#action = QAction("Post sample tube Reference Positions", self)
#action.setToolTip("Update the reference positions for the post tube")
#action.setStatusTip("Update the reference positions for the post tube")
#action.triggered.connect(cfg.dlg_posttube_references)
#self.menuAdvanced.addAction(action)
action = QAction("Delta Tau Parameters", self)
action.setToolTip("Parameters affecting the Delta Tau")
action.setStatusTip("Parameters affecting the Delta Tau")
action.triggered.connect(cfg.dlg_deltatau_parameters)
self.menuAdvanced.addAction(action)
#action = QAction("Delta Tau Parameters", self)
#action.setToolTip("Parameters affecting the Delta Tau")
#action.setStatusTip("Parameters affecting the Delta Tau")
#action.triggered.connect(cfg.dlg_deltatau_parameters)
#self.menuAdvanced.addAction(action)
action = QAction("parameters", self)
action.setToolTip("modify application parameters")
action.setStatusTip("modify application parameters")
action.triggered.connect(lambda x: cfg.dlg_parameters(self))
action.triggered.connect(self.cb_modify_app_param)
self.menuAdvanced.addAction(action)
@@ -1321,6 +1322,10 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
#imgPos=self._goImg.mapFromScene(event.scenePos())
#x=imgPos.x();y=imgPos.y()
def cb_modify_app_param(self):
wnd=WndParameter(self)
wnd.show()
@pyqtSlot()
def cb_save_cam_image(self,overlays=False):
app=QApplication.instance()