Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions ulc_mm_package/QtGUI/dev_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
QtWidgets.QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)

# Qt GUI Files
os.chdir(os.path.dirname(__file__))
_UI_FILE_DIR = os.path.join(os.path.dirname(__file__), "dev_run.ui")


Expand Down Expand Up @@ -473,6 +474,8 @@ def __init__(self, *args, **kwargs):
)
if retval == QtWidgets.QMessageBox.Ok:
quit()
else:
self.external_dir = None

# List hardware components
self.acquisitionThread = None
Expand Down Expand Up @@ -682,6 +685,15 @@ def checkBoxMaxFPSHandler(self):
self.acquisitionThread.update_liveview = 1

def btnSnapHandler(self):
if self.external_dir is None:
_ = self._displayMessageBox(
QtWidgets.QMessageBox.Icon.Critical,
"Error - no external harddrive detected.",
"ERROR! No external harddrive / SSD detected. Connect an SSD and restart the application if you want to save images.",
cancel=False,
)
return

if self.recording:
self.recording = False
self.acquisitionThread.continuous_save = False
Expand Down Expand Up @@ -945,6 +957,15 @@ def focusTextBoxHandler(self):
self.acquisitionThread.updateMotorPos = True

def btnFullZStackHandler(self):
if self.external_dir is None:
_ = self._displayMessageBox(
QtWidgets.QMessageBox.Icon.Critical,
"Error - no external harddrive detected.",
"ERROR! No external harddrive / SSD detected. Connect an SSD and restart the application if you want to save z-stacks.",
cancel=False,
)
return

retval = self._displayMessageBox(
QtWidgets.QMessageBox.Icon.Information,
"Full Range ZStack",
Expand All @@ -957,6 +978,14 @@ def btnFullZStackHandler(self):
self.acquisitionThread.runFullZStack()

def btnLocalZStackHandler(self):
if self.external_dir is None:
_ = self._displayMessageBox(
QtWidgets.QMessageBox.Icon.Critical,
"Error - no external harddrive detected.",
"ERROR! No external harddrive / SSD detected. Connect an SSD and restart the application if you want to save images.",
cancel=False,
)
return
retval = self._displayMessageBox(
QtWidgets.QMessageBox.Icon.Information,
"Local Vicinity ZStack",
Expand Down