[recorder] add check bo for no saving
This commit is contained in:
parent
f31d6d4119
commit
a27908adda
@ -385,6 +385,11 @@ void PylonRecorder::createActions() {
|
||||
buffersizeSpinner->setFixedSize(120, 25);
|
||||
buffersizeSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}");
|
||||
|
||||
dryRunCheckBox = new QCheckBox("Dry run, no writing");
|
||||
dryRunCheckBox->setChecked(false);
|
||||
dryRunCheckBox->setFixedSize(150, 25);
|
||||
dryRunCheckBox->setStyleSheet("QCheckBox{font-size: 12px;font-family: Arial;color: rgb(0, 0, 0);}");
|
||||
|
||||
QToolBar *toolbar = addToolBar("main toolbar");
|
||||
toolbar->addAction(exitAct);
|
||||
toolbar->addSeparator();
|
||||
@ -400,6 +405,8 @@ void PylonRecorder::createActions() {
|
||||
toolbar->addSeparator();
|
||||
toolbar->addWidget(new QLabel("buffer size:"));
|
||||
toolbar->addWidget(buffersizeSpinner);
|
||||
toolbar->addSeparator();
|
||||
toolbar->addWidget(dryRunCheckBox);
|
||||
}
|
||||
|
||||
void PylonRecorder::updateActions() {
|
||||
@ -493,16 +500,17 @@ void PylonRecorder::startRecording() {
|
||||
writer->setVideoSpecs(specs);
|
||||
buffer->clear();
|
||||
grabber->start();
|
||||
writer->start();
|
||||
if (!dryRunCheckBox->isChecked()) {
|
||||
writer->start();
|
||||
writing = true;
|
||||
}
|
||||
grabbing = true;
|
||||
writing = true;
|
||||
stopRequest = false;
|
||||
|
||||
preassureTimer->start(50);
|
||||
frameTimer->start(50);
|
||||
labelTimer->start(650);
|
||||
updateActions();
|
||||
|
||||
}
|
||||
|
||||
void PylonRecorder::stopRecording() {
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QMainWindow>
|
||||
#include <QTimer>
|
||||
#include <QSpinBox>
|
||||
#include <QCheckBox>
|
||||
|
||||
#include "pylonwrapper.h"
|
||||
#include "imagebuffer.h"
|
||||
@ -79,6 +80,7 @@ private:
|
||||
QImage image;
|
||||
QTimer *frameTimer, *preassureTimer, *labelTimer;
|
||||
QLabel *imageLabel, *writingLabel, *grabbingLabel, *cameraConnectedLabel, *fileLabel;
|
||||
QCheckBox *dryRunCheckBox;
|
||||
QProgressBar *preassureBar;
|
||||
QProgressBar *loadBar;
|
||||
QScrollArea *scrollArea;
|
||||
|
Loading…
Reference in New Issue
Block a user