Commit 7ae79bb3 authored by Oliver Bock's avatar Oliver Bock
Browse files

Added view reset menu item (shortcut: alt+r)

parent 7dee8e12
......@@ -67,7 +67,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
this, SLOT(toggleHiddenDemoMode()));
// prepare inactivity timer
saveOrRestoreInitialAnimationSettings();
m_inactivityTimer = new QTimer(this);
connect(m_inactivityTimer, SIGNAL(timeout()), this, SLOT(userInactivityCallback()));
......@@ -84,6 +83,9 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
// For Bruce: set initial values for iota and psi
ui.sliderSourceIota->setValue(146);
ui.sliderSourceInclination->setValue(177);
// save initial state
saveOrRestoreInitialAnimationSettings();
}
PulsatingScience::~PulsatingScience()
......@@ -208,6 +210,11 @@ void PulsatingScience::fullscreenToggled()
}
}
void PulsatingScience::on_actionReset_triggered()
{
saveOrRestoreInitialAnimationSettings();
}
void PulsatingScience::on_actionFullscreen_toggled(bool checked)
{
if(checked) {
......
......@@ -47,6 +47,7 @@ public slots:
void on_sliderSourceIota_valueChanged(int value);
void on_sliderSourceInclination_valueChanged(int value);
void on_actionReset_triggered();
void fullscreenToggled();
void on_actionFullscreen_toggled(bool checked);
void menuBarToggled();
......
......@@ -354,6 +354,7 @@
<property name="title">
<string>&amp;View</string>
</property>
<addaction name="actionReset"/>
<addaction name="actionFullscreen"/>
<addaction name="separator"/>
<addaction name="actionMenu_bar"/>
......@@ -459,6 +460,14 @@
<string>Alt+F</string>
</property>
</action>
<action name="actionReset">
<property name="text">
<string>Reset</string>
</property>
<property name="shortcut">
<string>Alt+R</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
......
Supports Markdown
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