The system was upgraded and everything is back online. If you experience any issues, please send an email to atlas_admin@aei.mpg.de - thanks a lot for your patience!

Commit ca49b148 authored by Oliver Bock's avatar Oliver Bock

Added second shortcut (ESC) to get out of fullscreen mode

parent ce62f604
...@@ -63,6 +63,8 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) ...@@ -63,6 +63,8 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
m_menuBarShortcut->setEnabled(false); m_menuBarShortcut->setEnabled(false);
m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this); m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this);
m_fullscreenShortcut->setEnabled(false); m_fullscreenShortcut->setEnabled(false);
m_fullscreenESCShortcut = new QShortcut(QKeySequence(Qt::Key_Escape), this);
m_fullscreenESCShortcut->setEnabled(false);
// register "hidden" demo mode shortcut for IYA2009 exhibition // register "hidden" demo mode shortcut for IYA2009 exhibition
m_hiddenShortcut = new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::ALT + Qt::Key_D, this); m_hiddenShortcut = new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::ALT + Qt::Key_D, this);
...@@ -161,6 +163,11 @@ PulsatingScience::~PulsatingScience() ...@@ -161,6 +163,11 @@ PulsatingScience::~PulsatingScience()
delete m_fullscreenShortcut; delete m_fullscreenShortcut;
} }
if(m_fullscreenESCShortcut) {
m_fullscreenESCShortcut->disconnect();
delete m_fullscreenESCShortcut;
}
if(m_hiddenShortcut) { if(m_hiddenShortcut) {
m_hiddenShortcut->disconnect(); m_hiddenShortcut->disconnect();
delete m_hiddenShortcut; delete m_hiddenShortcut;
...@@ -384,6 +391,9 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked) ...@@ -384,6 +391,9 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked)
// keep visibility setting // keep visibility setting
m_animControlVisible = true; m_animControlVisible = true;
} }
m_fullscreenESCShortcut->setEnabled(true);
connect(m_fullscreenESCShortcut, SIGNAL(activated()), this, SLOT(fullscreenToggled()));
} }
else { else {
window()->setWindowState(windowState() & ~Qt::WindowFullScreen); window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
...@@ -393,6 +403,9 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked) ...@@ -393,6 +403,9 @@ void PulsatingScience::on_actionFullscreen_toggled(bool checked)
#endif #endif
if(m_statusBarVisible) ui.statusbar->show(); if(m_statusBarVisible) ui.statusbar->show();
if(m_animControlVisible && !m_animControlFloating) ui.dockAnimControl->show(); if(m_animControlVisible && !m_animControlFloating) ui.dockAnimControl->show();
m_fullscreenESCShortcut->disconnect();
m_fullscreenESCShortcut->setEnabled(false);
} }
} }
......
...@@ -85,6 +85,7 @@ private: ...@@ -85,6 +85,7 @@ private:
QShortcut *m_rotationAxesShortcut; QShortcut *m_rotationAxesShortcut;
QShortcut *m_menuBarShortcut; QShortcut *m_menuBarShortcut;
QShortcut *m_fullscreenShortcut; QShortcut *m_fullscreenShortcut;
QShortcut *m_fullscreenESCShortcut;
QShortcut *m_hiddenShortcut; QShortcut *m_hiddenShortcut;
bool m_permanentOrbits; bool m_permanentOrbits;
......
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