Initial Reference optics done
This commit is contained in:
+10
-6
@@ -4,7 +4,7 @@ import webbrowser
|
||||
import subprocess
|
||||
from argparse import ArgumentParser
|
||||
|
||||
from PyQt5 import QtWidgets,QtGui
|
||||
from PyQt5 import QtWidgets,QtGui,QtCore
|
||||
|
||||
from ui.OpticsToolsGui import Ui_OpticsGUI
|
||||
from plot import OpticsPlot
|
||||
@@ -15,7 +15,10 @@ from sandbox import Sandbox
|
||||
from matchmaker import MatchMaker
|
||||
|
||||
|
||||
class OpticsTools(QtWidgets.QMainWindow, Ui_OpticsGUI):
|
||||
|
||||
class OpticsTools(QtWidgets.QMainWindow, QtCore.QObject, Ui_OpticsGUI):
|
||||
sigStatus = QtCore.pyqtSignal(str)
|
||||
|
||||
def __init__(self,phase=0, office= 1):
|
||||
super(OpticsTools, self).__init__()
|
||||
self.setupUi(self)
|
||||
@@ -34,7 +37,7 @@ class OpticsTools(QtWidgets.QMainWindow, Ui_OpticsGUI):
|
||||
self.model = Model(phase=phase,parent=self)
|
||||
|
||||
# initialize modeling
|
||||
self.match = MatchMaker()
|
||||
self.match = MatchMaker(signal=self.sigStatus)
|
||||
self.UIMatchOpticsSelect.clear()
|
||||
for key in self.match.matchlist.keys():
|
||||
self.UIMatchOpticsSelect.addItem(key)
|
||||
@@ -65,7 +68,7 @@ class OpticsTools(QtWidgets.QMainWindow, Ui_OpticsGUI):
|
||||
self.actionHelp.triggered.connect(self.openGit)
|
||||
self.actionAbout.triggered.connect(self.about)
|
||||
self.actionOpenScriptEditor.triggered.connect(self.editMatchingScript)
|
||||
|
||||
self.sigStatus.connect(self.status)
|
||||
|
||||
def doMatch(self):
|
||||
"""
|
||||
@@ -166,7 +169,7 @@ class OpticsTools(QtWidgets.QMainWindow, Ui_OpticsGUI):
|
||||
"Json Files (*.json)", options=options)
|
||||
if not fileName:
|
||||
return
|
||||
self.saveSettingDirect(fileName)
|
||||
self.saveSettingdirect(fileName)
|
||||
|
||||
|
||||
def loadSettings(self):
|
||||
@@ -197,7 +200,8 @@ class OpticsTools(QtWidgets.QMainWindow, Ui_OpticsGUI):
|
||||
self.sandbox.updateSandbox()
|
||||
self.status('Machine Settings')
|
||||
|
||||
def status(self,msg=''):
|
||||
@QtCore.pyqtSlot(str)
|
||||
def status(self,msg):
|
||||
self.UIStatus.setText(msg)
|
||||
# --------------------------------
|
||||
# Main routine
|
||||
|
||||
Reference in New Issue
Block a user