Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
208283d7
Commit
208283d7
authored
Feb 26, 2009
by
Oliver Bock
Browse files
Added Bernd's patch for Mac OS X kiosk mode (setting normally redundant window states/flags)
parent
251f7619
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsatingscience.cpp
View file @
208283d7
...
...
@@ -20,6 +20,10 @@
#include
"pulsatingscience.h"
#ifdef __APPLE__
#include
"/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/Carbon.h"
#endif
PulsatingScience
::
PulsatingScience
(
QWidget
*
parent
)
:
QMainWindow
(
parent
)
{
ui
.
setupUi
(
this
);
...
...
@@ -32,7 +36,7 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
// inital status (based on GUI)
m_permanentOrbits
=
ui
.
actionPermanent_orbits
->
isChecked
();
m_rotationAxesVisible
=
ui
.
actionRotationAxes
->
isChecked
();
m_menuBarVisible
=
ui
.
actionMenu_bar
->
isChecked
();
m_menuBarVisible
=
ui
.
actionMenu_bar
->
isChecked
();
m_statusBarVisible
=
ui
.
actionStatus_bar
->
isChecked
();
m_animControlVisible
=
true
;
m_animControlFloating
=
ui
.
dockAnimControl
->
isFloating
();
...
...
@@ -438,13 +442,34 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value)
void
PulsatingScience
::
toggleHiddenDemoMode
()
{
if
(
m_hiddenDemoModeActivated
)
{
#ifdef __APPLE__
// show Menubar & Dock
SetSystemUIMode
(
kUIModeNormal
,
0
);
window
()
->
setWindowFlags
(
windowFlags
()
&
~
Qt
::
FramelessWindowHint
&
~
Qt
::
WindowStaysOnTopHint
);
window
()
->
showNormal
();
#endif
on_actionMenu_bar_toggled
(
true
);
ui
.
actionMenu_bar
->
setChecked
(
true
);
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
;
}
else
{
#ifdef __APPLE__
// hide Menubar & Dock
SetSystemUIMode
(
kUIModeAllHidden
,
0
);
// don't ever ask my why this works _only_ in exactly this order on the Mac
window
()
->
setWindowFlags
(
windowFlags
()
|
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
);
window
()
->
showMaximized
();
// might be needed to remove the resize handle on some systems
// window()->setFixedSize(width(), height());
#endif
on_actionMenu_bar_toggled
(
false
);
ui
.
actionMenu_bar
->
setChecked
(
false
);
window
()
->
setWindowState
(
windowState
()
|
Qt
::
WindowFullScreen
);
...
...
Write
Preview
Supports
Markdown
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