mirror of
https://github.com/vale981/Taevitas
synced 2025-03-05 09:31:42 -05:00
write t'll it is over
This commit is contained in:
parent
f0438b8430
commit
91509a35e4
1 changed files with 11 additions and 12 deletions
|
@ -34,7 +34,7 @@ MainWindow::MainWindow( QWidget * parent ) :
|
|||
ui->projectName->setText( "Taevitas_Rec_" + QDateTime::currentDateTime().toString( "dd_MM_yyyy_hh_mm_ss" ) );
|
||||
|
||||
// Set default dir
|
||||
recorder.setProjectDir(QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ));
|
||||
recorder.setProjectDir( QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ) );
|
||||
|
||||
// Connect Frame Counts, Time Captured LCD
|
||||
connect( &recorder, &Recorder::frameSaved, this, [this] {
|
||||
|
@ -269,7 +269,7 @@ void MainWindow::startStopRecording() {
|
|||
} catch ( RecorderError ) {
|
||||
showError( "Could not start Recording!" );
|
||||
ui->saveFrames->setProperty( "enabled", true );
|
||||
stopCapture();
|
||||
resetCapture();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ void MainWindow::startStopRecording() {
|
|||
}
|
||||
|
||||
if ( !stopped ) {
|
||||
setStatus(STOPPING);
|
||||
setStatus( STOPPING );
|
||||
// We just wait...
|
||||
return;
|
||||
}
|
||||
|
@ -298,21 +298,14 @@ void MainWindow::startStopRecording() {
|
|||
return;
|
||||
}
|
||||
|
||||
// Restart Preview
|
||||
if ( ui->preview_button->isChecked() ) {
|
||||
try {
|
||||
camMan.startCapture();
|
||||
} catch ( FlyCapture2::Error e ) {
|
||||
showError( e );
|
||||
}
|
||||
}
|
||||
resetCapture();
|
||||
|
||||
ui->saveFrames->setProperty( "enabled", true );
|
||||
setStatus( CONNECTED );
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::stopCapture() {
|
||||
void MainWindow::resetCapture() {
|
||||
if ( !ui->preview_button->isChecked() ) {
|
||||
try {
|
||||
camMan.stopCapture();
|
||||
|
@ -320,5 +313,11 @@ void MainWindow::stopCapture() {
|
|||
showError( e );
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
camMan.startCapture();
|
||||
} catch ( FlyCapture2::Error e ) {
|
||||
showError( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue