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
782b954d
Commit
782b954d
authored
Dec 25, 2015
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Full Screen menu action (and its opposite, Normal as well)
parent
ef2586f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
86 deletions
+1
-86
MainWindow.cc
src/ui/MainWindow.cc
+0
-30
MainWindow.h
src/ui/MainWindow.h
+0
-12
MainWindow.ui
src/ui/MainWindow.ui
+1
-44
No files found.
src/ui/MainWindow.cc
View file @
782b954d
...
...
@@ -236,14 +236,6 @@ MainWindow::MainWindow()
move
((
scrSize
.
width
()
-
w
)
/
2
,
(
scrSize
.
height
()
-
h
)
/
2
);
}
}
// Make sure the proper fullscreen/normal menu item is checked properly.
_ui
.
actionFullscreen
->
setChecked
(
isFullScreen
());
_ui
.
actionNormal
->
setChecked
(
!
isFullScreen
());
// And that they will stay checked properly after user input
connect
(
_ui
.
actionFullscreen
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
fullScreenActionItemCallback
);
connect
(
_ui
.
actionNormal
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
normalActionItemCallback
);
#endif
connect
(
_ui
.
actionStatusBar
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
showStatusBarCallback
);
...
...
@@ -253,12 +245,10 @@ MainWindow::MainWindow()
_ui
.
actionSetup
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Meta+1"
,
0
));
_ui
.
actionPlan
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Meta+2"
,
0
));
_ui
.
actionFlight
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Meta+3"
,
0
));
_ui
.
actionFullscreen
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Meta+Return"
,
0
));
#else
_ui
.
actionSetup
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+1"
,
0
));
_ui
.
actionPlan
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+2"
,
0
));
_ui
.
actionFlight
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+3"
,
0
));
_ui
.
actionFullscreen
->
setShortcut
(
QApplication
::
translate
(
"MainWindow"
,
"Ctrl+Return"
,
0
));
#endif
_ui
.
actionFlight
->
setChecked
(
true
);
...
...
@@ -403,26 +393,6 @@ void MainWindow::_showDockWidgetAction(bool show)
}
#endif
void
MainWindow
::
fullScreenActionItemCallback
(
bool
)
{
if
(
!
_ui
.
actionFullscreen
->
isChecked
())
_ui
.
actionFullscreen
->
setChecked
(
true
);
_ui
.
actionNormal
->
setChecked
(
false
);
}
void
MainWindow
::
normalActionItemCallback
(
bool
)
{
if
(
!
_ui
.
actionNormal
->
isChecked
())
_ui
.
actionNormal
->
setChecked
(
true
);
_ui
.
actionFullscreen
->
setChecked
(
false
);
// Qt documentation says that just call showNormal and it will return properly
// So calling showMaximized.
if
(
isFullScreen
())
{
showMaximized
();
}
}
void
MainWindow
::
showStatusBarCallback
(
bool
checked
)
{
_showStatusBar
=
checked
;
...
...
src/ui/MainWindow.h
View file @
782b954d
...
...
@@ -115,18 +115,6 @@ public slots:
void
configureWindowName
();
protected
slots
:
/**
* @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
(
bool
);
/**
* @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
(
bool
);
/**
* @brief Enable/Disable Status Bar
*/
...
...
src/ui/MainWindow.ui
View file @
782b954d
...
...
@@ -51,7 +51,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1024
</width>
<height>
2
0
</height>
<height>
2
1
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuMGround"
>
...
...
@@ -80,8 +80,6 @@
<addaction
name=
"actionPlan"
/>
<addaction
name=
"actionFlight"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionFullscreen"
/>
<addaction
name=
"actionNormal"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionStatusBar"
/>
</widget>
...
...
@@ -159,31 +157,6 @@
<enum>
QAction::PreferencesRole
</enum>
</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>
<property
name=
"shortcut"
>
<string>
Esc
</string>
</property>
</action>
<action
name=
"actionSetup"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
...
...
@@ -245,21 +218,5 @@
</hint>
</hints>
</connection>
<connection>
<sender>
actionFullscreen
</sender>
<signal>
triggered()
</signal>
<receiver>
MainWindow
</receiver>
<slot>
showFullScreen()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
-1
</x>
<y>
-1
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
399
</x>
<y>
249
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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