GUI: Make more consistent interface to load image after rotation scan
This commit is contained in:
1 parent
2bd3c9d242
commit
29b1ee85bd
3 files changed
+3
-16
No files matched your search
@@ -316,7 +316,7 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.status_bar.close_shutter.connect(self.daq.close_shutter)
|
||||
self.status_bar.open_shutter.connect(self.daq.open_shutter)
|
||||
self.rotation.file_ready.connect(self.viewer.load_file)
|
||||
self.rotation.file_ready.connect(self.viewer.load_image)
|
||||
self.raster.image_selected.connect(self.viewer.load_image)
|
||||
|
||||
self.raster.viewer_track_online.connect(self.viewer.load_online)
|
||||
|
||||
@@ -4,9 +4,10 @@ from aaredaqlib.rotation_scan import CompletedRotationScan
|
||||
|
||||
|
||||
class RotationScanManager(QObject):
|
||||
file_ready = Signal(str)
|
||||
file_ready = Signal(str, int)
|
||||
|
||||
@Slot(CompletedRotationScan)
|
||||
def scan_completed(self, r: CompletedRotationScan):
|
||||
if r.result.file_prefix is not None:
|
||||
self.file_ready.emit("http://sls-gpu-001:8080")
|
||||
self.file_ready.emit("http://sls-gpu-001:8080", 0)
|
||||
@@ -44,20 +44,6 @@ class JFJochDBusClient(QObject):
|
||||
return False
|
||||
|
||||
return True
|
||||
#TODO tidy up load functions
|
||||
@Slot(str)
|
||||
def load_file(self, name: str):
|
||||
if not self.__dbus_available:
|
||||
print("D-Bus not available, cannot load file in JFJoch viewer")
|
||||
return
|
||||
|
||||
if name.startswith("http://"):
|
||||
path = name
|
||||
else:
|
||||
path = "/sls/mx/data/" + name + "_master.h5"
|
||||
print(f"load {path}")
|
||||
if self._ensure_interface():
|
||||
reply = self.__interface.call("LoadFile", path, 0, 1)
|
||||
|
||||
@Slot(str, int)
|
||||
def load_image(self, name: str, number: int):
|
||||
|
||||
Reference in new issue
Block a user