Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 0f129533 authored by Sylvain Thery's avatar Sylvain Thery Committed by Pierre Kraemer
Browse files

confirm quit with ESC

parent ca9a842c
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <QKeyEvent> #include <QKeyEvent>
#include <QMouseEvent> #include <QMouseEvent>
#include <QWheelEvent> #include <QWheelEvent>
#include <QMessageBox>
namespace CGoGN namespace CGoGN
{ {
...@@ -510,7 +511,18 @@ void View::keyPressEvent(QKeyEvent* event) ...@@ -510,7 +511,18 @@ void View::keyPressEvent(QKeyEvent* event)
{ {
foreach(PluginInteraction* plugin, l_plugins) foreach(PluginInteraction* plugin, l_plugins)
plugin->keyPress(this, event); plugin->keyPress(this, event);
QGLViewer::keyPressEvent(event);
if (event->key() == Qt::Key_Escape)
{
QMessageBox msgBox;
msgBox.setText("Really quit SCHNApps ?");
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
if (msgBox.exec() == QMessageBox::Ok)
exit(0);
}
else
QGLViewer::keyPressEvent(event);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment