[dry run] restart after dry run works

This commit is contained in:
Jan Grewe 2020-11-19 09:26:22 +01:00
parent 0290ecb192
commit 4afe21288a
3 changed files with 8 additions and 1 deletions

View File

@ -40,6 +40,7 @@ public slots:
void setExposureTime(double newExposureTime) {
exposure = newExposureTime;
}
signals:
void terminated();
};

View File

@ -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();
}
}
}

View File

@ -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); }";