Add a message box before exit
This commit is contained in:
1 parent
3575cefb44
commit
9df914fed3
2 files changed
+8
-2
No files matched your search
@@ -94,7 +94,7 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
switch( msgBoxCloseRet )
|
||||
{
|
||||
case QMessageBox::Yes:
|
||||
mdiArea->closeAllSubWindows();
|
||||
closeAll();
|
||||
if( mdiArea->subWindowList().isEmpty() )
|
||||
{
|
||||
writeSettings();
|
||||
@@ -159,6 +159,11 @@ void plaYUVerApp::save()
|
||||
activeSubWindow()->save();
|
||||
}
|
||||
|
||||
void plaYUVerApp::closeAll()
|
||||
{
|
||||
mdiArea->closeAllSubWindows();
|
||||
}
|
||||
|
||||
// ----------------------- Modules Selection --------------------
|
||||
|
||||
void plaYUVerApp::selectModule( QAction *curr_action )
|
||||
@@ -486,7 +491,7 @@ Void plaYUVerApp::createActions()
|
||||
|
||||
actionCloseAll = new QAction( tr( "Close &All" ), this );
|
||||
actionCloseAll->setStatusTip( tr( "Close all the windows" ) );
|
||||
connect( actionCloseAll, SIGNAL( triggered() ), mdiArea, SLOT( closeAllSubWindows() ) );
|
||||
connect( actionCloseAll, SIGNAL( triggered() ), this, SLOT( closeAll() ) );
|
||||
|
||||
// ------------ View ------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user