Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pulsatingscience
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
einsteinathome
pulsatingscience
Commits
cc486b69
Commit
cc486b69
authored
Jul 21, 2010
by
Oliver Bock
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added button/action to reset camera position (in line with observer's line of sight)
parent
57b7c9b8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
20 deletions
+86
-20
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+9
-0
src/pulsaranimationwidget.h
src/pulsaranimationwidget.h
+1
-0
src/pulsatingscience.cpp
src/pulsatingscience.cpp
+17
-0
src/pulsatingscience.h
src/pulsatingscience.h
+1
-0
src/pulsatingscience.qrc
src/pulsatingscience.qrc
+18
-17
src/pulsatingscience.ui
src/pulsatingscience.ui
+40
-3
No files found.
src/pulsaranimationwidget.cpp
View file @
cc486b69
...
...
@@ -508,6 +508,15 @@ void PulsarAnimationWidget::stopAnimation()
updateGL
();
}
void
PulsarAnimationWidget
::
resetViewpoint
()
{
m_mouseAngleH
=
0.0
;
m_mouseAngleV
=
0.0
;
m_cameraZoom
=
30.0
;
updateCameraPosition
(
m_mouseAngleH
,
m_mouseAngleV
,
m_cameraZoom
);
}
void
PulsarAnimationWidget
::
updateFrame
()
{
m_pulsarRotationAngle
+=
m_pulsarRotationDelta
;
...
...
src/pulsaranimationwidget.h
View file @
cc486b69
...
...
@@ -49,6 +49,7 @@ public slots:
void
runAnimation
();
void
pauseAnimation
();
void
stopAnimation
();
void
resetViewpoint
();
void
updateFrame
();
...
...
src/pulsatingscience.cpp
View file @
cc486b69
...
...
@@ -52,6 +52,8 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
m_pauseShortcut
->
setEnabled
(
false
);
m_stopShortcut
=
new
QShortcut
(
ui
.
actionStop
->
shortcut
(),
this
);
m_stopShortcut
->
setEnabled
(
false
);
m_resetShortcut
=
new
QShortcut
(
ui
.
actionReset
->
shortcut
(),
this
);
m_resetShortcut
->
setEnabled
(
false
);
m_rotationAxesShortcut
=
new
QShortcut
(
ui
.
actionRotationAxes
->
shortcut
(),
this
);
m_rotationAxesShortcut
->
setEnabled
(
false
);
m_menuBarShortcut
=
new
QShortcut
(
ui
.
actionMenu_bar
->
shortcut
(),
this
);
...
...
@@ -90,6 +92,12 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
connect
(
ui
.
actionStop
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
on_pushStop_clicked
()));
connect
(
ui
.
pushReset
,
SIGNAL
(
clicked
()),
ui
.
pulsarGlWidget
,
SLOT
(
resetViewpoint
()));
connect
(
ui
.
actionReset
,
SIGNAL
(
triggered
()),
ui
.
pulsarGlWidget
,
SLOT
(
resetViewpoint
()));
connect
(
ui
.
actionRotationAxes
,
SIGNAL
(
toggled
(
bool
)),
ui
.
pulsarGlWidget
,
SLOT
(
showRotationAxes
(
bool
)));
...
...
@@ -120,6 +128,11 @@ PulsatingScience::~PulsatingScience()
delete
m_stopShortcut
;
}
if
(
m_resetShortcut
)
{
m_resetShortcut
->
disconnect
();
delete
m_resetShortcut
;
}
if
(
m_rotationAxesShortcut
)
{
m_rotationAxesShortcut
->
disconnect
();
delete
m_rotationAxesShortcut
;
...
...
@@ -244,6 +257,8 @@ void PulsatingScience::on_actionMenu_bar_toggled(bool checked)
m_pauseShortcut
->
setEnabled
(
false
);
m_stopShortcut
->
disconnect
();
m_stopShortcut
->
setEnabled
(
false
);
m_resetShortcut
->
disconnect
();
m_resetShortcut
->
setEnabled
(
false
);
m_rotationAxesShortcut
->
disconnect
();
m_rotationAxesShortcut
->
setEnabled
(
false
);
m_fullscreenShortcut
->
disconnect
();
...
...
@@ -262,6 +277,8 @@ void PulsatingScience::on_actionMenu_bar_toggled(bool checked)
connect
(
m_pauseShortcut
,
SIGNAL
(
activated
()),
ui
.
pulsarGlWidget
,
SLOT
(
pauseAnimation
()));
m_stopShortcut
->
setEnabled
(
true
);
connect
(
m_stopShortcut
,
SIGNAL
(
activated
()),
ui
.
pulsarGlWidget
,
SLOT
(
stopAnimation
()));
m_resetShortcut
->
setEnabled
(
true
);
connect
(
m_resetShortcut
,
SIGNAL
(
activated
()),
ui
.
pulsarGlWidget
,
SLOT
(
resetViewpoint
()));
m_rotationAxesShortcut
->
setEnabled
(
true
);
connect
(
m_rotationAxesShortcut
,
SIGNAL
(
activated
()),
this
,
SLOT
(
rotationAxesToggled
()));
m_fullscreenShortcut
->
setEnabled
(
true
);
...
...
src/pulsatingscience.h
View file @
cc486b69
...
...
@@ -74,6 +74,7 @@ private:
QShortcut
*
m_runShortcut
;
QShortcut
*
m_pauseShortcut
;
QShortcut
*
m_stopShortcut
;
QShortcut
*
m_resetShortcut
;
QShortcut
*
m_permanentOrbitsShortcut
;
QShortcut
*
m_rotationAxesShortcut
;
QShortcut
*
m_menuBarShortcut
;
...
...
src/pulsatingscience.qrc
View file @
cc486b69
<RCC>
<qresource prefix="icons" >
<file>resources/control-pause.png</file>
<file>resources/control-quit.png</file>
<file>resources/control-run.png</file>
<file>resources/control-stop.png</file>
<file>resources/help-about.png</file>
<file>resources/help-help.png</file>
<file>resources/help-website.png</file>
<file>resources/aei-icon48.png</file>
</qresource>
<qresource prefix="i18ns" >
<file>resources/pulsatingscience_de.qm</file>
</qresource>
<qresource prefix="textures" >
<file>resources/texture_background_carina.png</file>
<file>resources/texture_pulsar.png</file>
</qresource>
<qresource prefix="/icons">
<file>resources/control-pause.png</file>
<file>resources/control-quit.png</file>
<file>resources/control-run.png</file>
<file>resources/control-stop.png</file>
<file>resources/help-about.png</file>
<file>resources/help-help.png</file>
<file>resources/help-website.png</file>
<file>resources/aei-icon48.png</file>
<file>resources/control-reset.png</file>
</qresource>
<qresource prefix="/i18ns">
<file>resources/pulsatingscience_de.qm</file>
</qresource>
<qresource prefix="/textures">
<file>resources/texture_background_carina.png</file>
<file>resources/texture_pulsar.png</file>
</qresource>
</RCC>
src/pulsatingscience.ui
View file @
cc486b69
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
7
45
</width>
<height>
6
00
</height>
<width>
7
87
</width>
<height>
6
84
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -336,6 +336,26 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushReset"
>
<property
name=
"statusTip"
>
<string>
Reset view to observer's line of sight
</string>
</property>
<property
name=
"text"
>
<string>
Reset
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"pulsatingscience.qrc"
>
<normaloff>
:/icons/resources/control-reset.png
</normaloff>
:/icons/resources/control-reset.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
14
</width>
<height>
14
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
...
...
@@ -394,7 +414,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
7
45
</width>
<width>
7
87
</width>
<height>
22
</height>
</rect>
</property>
...
...
@@ -426,6 +446,8 @@
<addaction
name=
"actionPause"
/>
<addaction
name=
"actionStop"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionReset"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionQuit"
/>
</widget>
<addaction
name=
"menuControl"
/>
...
...
@@ -619,6 +641,21 @@
<string>
Alt+O
</string>
</property>
</action>
<action
name=
"actionReset"
>
<property
name=
"icon"
>
<iconset
resource=
"pulsatingscience.qrc"
>
<normaloff>
:/icons/resources/control-reset.png
</normaloff>
:/icons/resources/control-reset.png
</iconset>
</property>
<property
name=
"text"
>
<string>
Reset
</string>
</property>
<property
name=
"toolTip"
>
<string>
Reset view
</string>
</property>
<property
name=
"shortcut"
>
<string>
Ctrl+R
</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
...
...
Oliver Behnke
@brevilo
mentioned in commit
007c6dfe
·
Jun 10, 2016
mentioned in commit
007c6dfe
mentioned in commit 007c6dfe414a95e0ed3eeef4a252f9c89df2fa7a
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment