Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
98ec24e6
Commit
98ec24e6
authored
Jun 11, 2014
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The Fullscreen/Normal menu items in the main window are now checkable.
parent
69aa348d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
MainWindow.cc
src/ui/MainWindow.cc
+27
-0
MainWindow.h
src/ui/MainWindow.h
+12
-0
MainWindow.ui
src/ui/MainWindow.ui
+12
-0
No files found.
src/ui/MainWindow.cc
View file @
98ec24e6
...
...
@@ -347,6 +347,23 @@ void MainWindow::init()
}
// Make sure the proper fullscreen/normal menu item is checked properly.
if
(
isFullScreen
())
{
ui
.
actionFullscreen
->
setChecked
(
true
);
ui
.
actionNormal
->
setChecked
(
false
);
}
else
{
ui
.
actionFullscreen
->
setChecked
(
false
);
ui
.
actionNormal
->
setChecked
(
true
);
}
// And that they will stay checked properly after user input
QObject
::
connect
(
ui
.
actionFullscreen
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
fullScreenActionItemCallback
()));
QObject
::
connect
(
ui
.
actionNormal
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
normalActionItemCallback
()));
// Set OS dependent keyboard shortcuts for the main window, non OS dependent shortcuts are set in MainWindow.ui
#ifdef Q_OS_MACX
ui
.
actionFlightView
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Meta+1"
,
0
,
QApplication
::
UnicodeUTF8
));
...
...
@@ -758,6 +775,16 @@ void MainWindow::showDockWidget(const QString& name, bool show)
loadDockWidget
(
name
);
}
void
MainWindow
::
fullScreenActionItemCallback
()
{
ui
.
actionNormal
->
setChecked
(
false
);
}
void
MainWindow
::
normalActionItemCallback
()
{
ui
.
actionFullscreen
->
setChecked
(
false
);
}
void
MainWindow
::
loadDockWidget
(
const
QString
&
name
)
{
if
(
menuActionHelper
->
containsDockWidget
(
currentView
,
name
))
...
...
src/ui/MainWindow.h
View file @
98ec24e6
...
...
@@ -297,6 +297,18 @@ public slots:
protected
slots
:
void
showDockWidget
(
const
QString
&
name
,
bool
show
);
/**
* @brief Unchecks the normalActionItem.
* Used as a triggered() callback by the fullScreenAction to make sure only one of it or the
* normalAction are checked at a time, as they're mutually exclusive.
*/
void
fullScreenActionItemCallback
();
/**
* @brief Unchecks the fullScreenActionItem.
* Used as a triggered() callback by the normalAction to make sure only one of it or the
* fullScreenAction are checked at a time, as they're mutually exclusive.
*/
void
normalActionItemCallback
();
signals:
void
styleChanged
(
MainWindow
::
QGC_MAINWINDOW_STYLE
newTheme
);
...
...
src/ui/MainWindow.ui
View file @
98ec24e6
...
...
@@ -379,11 +379,23 @@
</property>
</action>
<action
name=
"actionFullscreen"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Fullscreen
</string>
</property>
</action>
<action
name=
"actionNormal"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Normal
</string>
</property>
...
...
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