diff --git a/grabber.h b/grabber.h index 5c7683a..cbc0ec3 100644 --- a/grabber.h +++ b/grabber.h @@ -40,6 +40,7 @@ public slots: void setExposureTime(double newExposureTime) { exposure = newExposureTime; } + signals: void terminated(); }; diff --git a/pylonrecorder.cpp b/pylonrecorder.cpp index 4810c4a..47deaee 100644 --- a/pylonrecorder.cpp +++ b/pylonrecorder.cpp @@ -33,6 +33,7 @@ PylonRecorder::PylonRecorder(QWidget *parent) : QMainWindow(parent), imageLabel(new QLabel), scrollArea(new QScrollArea) { + dryRun = false; imageLabel->setBackgroundRole(QPalette::Base); imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); imageLabel->setScaledContents(true); @@ -516,6 +517,7 @@ void PylonRecorder::startRecording() { writer->start(); writing = true; } + dryRun = dryRunCheckBox->isChecked(); grabbing = true; stopRequest = false; @@ -533,6 +535,10 @@ void PylonRecorder::stopRecording() { grabbing = false; stopRequest = true; grab_stop_action->setEnabled(false); + if(dryRun) { + buffer->clear(); + writerDone(); + } } } diff --git a/pylonrecorder.h b/pylonrecorder.h index 7bbbf06..6d195e4 100644 --- a/pylonrecorder.h +++ b/pylonrecorder.h @@ -89,7 +89,7 @@ private: ImageBuffer *buffer; Grabber *grabber; Writer *writer; - bool grabbing, stopRequest, writing, labelSwitch; + bool grabbing, stopRequest, writing, labelSwitch, dryRun; QPalette progressPalette; QString activeLabelStyleHigh = "QLabel { font-size: 10px;font-family: Arial; color : red; }"; QString activeLabelStyleLow = "QLabel { font-size: 10px;font-family: Arial; color : cmyk(0, 255, 255, 0, 50); }";