mirror of
https://github.com/vale981/Taevitas
synced 2025-03-04 17:11:40 -05:00
yeah, close it, but close it right :)
This commit is contained in:
parent
93a1e97030
commit
edb1f996fb
2 changed files with 12 additions and 10 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <QTime>
|
||||
#include <QErrorMessage>
|
||||
#include <QFileDialog>
|
||||
#include <QCloseEvent>
|
||||
|
||||
// TODO: Handle Errors!!
|
||||
// TODO: Handle Disconnect!!
|
||||
|
@ -83,17 +84,18 @@ MainWindow::MainWindow( QWidget * parent ) :
|
|||
MainWindow::~MainWindow() {
|
||||
delete ui;
|
||||
delete image_buffer;
|
||||
|
||||
if ( status == RECORDING ) {
|
||||
showError( "Stopping Capture..." );
|
||||
startStopRecording();
|
||||
}
|
||||
|
||||
recThread->quit();
|
||||
recThread->wait();
|
||||
delete recThread;
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent ( QCloseEvent * event ) {
|
||||
if ( status == RECORDING ) {
|
||||
setStatus( STOPPING );
|
||||
startStopRecording();
|
||||
recThread->quit();
|
||||
recThread->wait();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setStatus( STATUS status ) {
|
||||
this->status = status;
|
||||
|
||||
|
|
|
@ -105,8 +105,8 @@ RecorderError Recorder::verifyRecDir() {
|
|||
QMessageBox msgBox;
|
||||
|
||||
msgBox.setText( tr( "A recording with this name already exists. Which action should be taken?" ) );
|
||||
void * appendButton = msgBox.addButton( tr( "Append the recording." ), QMessageBox::ActionRole );
|
||||
void * removeButton = msgBox.addButton( tr( "Overwrite recording." ), QMessageBox::ActionRole );
|
||||
void * appendButton = msgBox.addButton( tr( "Append the recording" ), QMessageBox::ApplyRole );
|
||||
void * removeButton = msgBox.addButton( tr( "Overwrite recording" ), QMessageBox::ActionRole );
|
||||
void * abortButton = msgBox.addButton( QMessageBox::Abort );
|
||||
|
||||
msgBox.exec();
|
||||
|
|
Loading…
Add table
Reference in a new issue