Commit f7362713 authored by Oliver Bock's avatar Oliver Bock

Added --demo command line option (launch into IYA2009 mode)

parent 91ab8ad1
...@@ -36,6 +36,9 @@ int main(int argc, char *argv[]) ...@@ -36,6 +36,9 @@ int main(int argc, char *argv[])
app.installTranslator(&appTranslator); app.installTranslator(&appTranslator);
PulsatingScience window; PulsatingScience window;
if(argc == 2 && QString(argv[1]) == "--demo") {
window.toggleHiddenDemoMode();
}
window.show(); window.show();
return app.exec(); return app.exec();
......
...@@ -438,13 +438,15 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value) ...@@ -438,13 +438,15 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value)
void PulsatingScience::toggleHiddenDemoMode() void PulsatingScience::toggleHiddenDemoMode()
{ {
if(m_hiddenDemoModeActivated) { if(m_hiddenDemoModeActivated) {
menuBarToggled(); on_actionMenu_bar_toggled(true);
ui.actionMenu_bar->setChecked(true);
window()->setWindowState(windowState() & ~Qt::WindowFullScreen); window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
ui.dockAnimControl->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); ui.dockAnimControl->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
m_hiddenDemoModeActivated = false; m_hiddenDemoModeActivated = false;
} }
else { else {
menuBarToggled(); on_actionMenu_bar_toggled(false);
ui.actionMenu_bar->setChecked(false);
window()->setWindowState(windowState() | Qt::WindowFullScreen); window()->setWindowState(windowState() | Qt::WindowFullScreen);
ui.dockAnimControl->setFeatures(QDockWidget::NoDockWidgetFeatures); ui.dockAnimControl->setFeatures(QDockWidget::NoDockWidgetFeatures);
m_hiddenDemoModeActivated = true; m_hiddenDemoModeActivated = true;
......
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