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
fa83a817
Commit
fa83a817
authored
Dec 05, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed all sorts of menu entries and widgets not available on the various platforms
parent
7d8ebfd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
163 additions
and
164 deletions
+163
-164
MainWindow.cc
src/ui/MainWindow.cc
+163
-164
No files found.
src/ui/MainWindow.cc
View file @
fa83a817
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
/*===================================================================
======================================================================*/
/**
...
...
@@ -135,14 +115,16 @@ void MainWindow::buildWidgets()
mapWidget
=
new
MapWidget
(
this
);
protocolWidget
=
new
XMLCommProtocolWidget
(
this
);
dataplotWidget
=
new
QGCDataPlot2D
(
this
);
#ifdef QGC_OSG_ENABLED
#ifdef QGC_OSG_ENABLED
_3DWidget
=
Q3DWidgetFactory
::
get
(
"PIXHAWK"
);
#endif
#endif
#ifdef QGC_OSGEARTH_ENABLED
_3DMapWidget
=
Q3DWidgetFactory
::
get
(
"MAP3D"
);
#endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
gEarthWidget
=
new
QGCGoogleEarthView
(
this
);
#endif
// Dock widgets
controlDockWidget
=
new
QDockWidget
(
tr
(
"Control"
),
this
);
...
...
@@ -234,13 +216,15 @@ void MainWindow::arrangeCenterStack()
if
(
linechartWidget
)
centerStack
->
addWidget
(
linechartWidget
);
if
(
protocolWidget
)
centerStack
->
addWidget
(
protocolWidget
);
if
(
mapWidget
)
centerStack
->
addWidget
(
mapWidget
);
#ifdef QGC_OSG_ENABLED
#ifdef QGC_OSG_ENABLED
if
(
_3DWidget
)
centerStack
->
addWidget
(
_3DWidget
);
#endif
#ifdef QGC_OSGEARTH_ENABLED
#ifdef QGC_OSGEARTH_ENABLED
if
(
_3DMapWidget
)
centerStack
->
addWidget
(
_3DMapWidget
);
#endif
#endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
if
(
gEarthWidget
)
centerStack
->
addWidget
(
gEarthWidget
);
#endif
if
(
hudWidget
)
centerStack
->
addWidget
(
hudWidget
);
if
(
dataplotWidget
)
centerStack
->
addWidget
(
dataplotWidget
);
...
...
@@ -380,8 +364,17 @@ void MainWindow::connectActions()
connect
(
ui
.
actionPilotView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadPilotView
()));
connect
(
ui
.
actionEngineerView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionOperatorView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
#ifdef QGC_OSG_ENABLED
connect
(
ui
.
action3DView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
load3DView
()));
#else
ui
.
menuWindow
->
removeAction
(
ui
.
action3DView
);
#endif
#ifdef QGC_OSGEARTH_ENABLED
connect
(
ui
.
action3DMapView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
load3DMapView
()));
#else
ui
.
menuWindow
->
removeAction
(
ui
.
action3DMapView
);
#endif
connect
(
ui
.
actionShow_full_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadAllView
()));
connect
(
ui
.
actionShow_MAVLink_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadMAVLinkView
()));
connect
(
ui
.
actionShow_data_analysis_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadDataView
()));
...
...
@@ -390,7 +383,11 @@ void MainWindow::connectActions()
connect
(
ui
.
actionOnline_documentation
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
showHelp
()));
connect
(
ui
.
actionCredits_Developers
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
showCredits
()));
connect
(
ui
.
actionProject_Roadmap
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
showRoadMap
()));
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
connect
(
ui
.
actionGoogleEarthView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadGoogleEarthView
()));
#else
ui
.
menuWindow
->
removeAction
(
ui
.
actionGoogleEarthView
);
#endif
// Joystick configuration
connect
(
ui
.
actionJoystickSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
configure
()));
...
...
@@ -935,17 +932,17 @@ void MainWindow::loadGlobalOperatorView()
waypointsDockWidget
->
show
();
}
// // HORIZONTAL SITUATION INDICATOR
// if (hsiDockWidget)
// {
// HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
// if (hsi)
// {
// addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget);
// hsiDockWidget->show();
// hsi->start();
// }
// }
// // HORIZONTAL SITUATION INDICATOR
// if (hsiDockWidget)
// {
// HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
// if (hsi)
// {
// addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget);
// hsiDockWidget->show();
// hsi->start();
// }
// }
// PROCESS CONTROL
if
(
watchdogControlDockWidget
)
...
...
@@ -972,159 +969,161 @@ void MainWindow::loadGlobalOperatorView()
void
MainWindow
::
load3DMapView
()
{
#ifdef QGC_OSGEARTH_ENABLED
clearView
();
#ifdef QGC_OSGEARTH_ENABLED
clearView
();
// 3D map
if
(
_3DMapWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3DWidget->setActive(true);
centerStack
->
setCurrentWidget
(
_3DMapWidget
);
}
}
// 3D map
if
(
_3DMapWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3DWidget->setActive(true);
centerStack
->
setCurrentWidget
(
_3DMapWidget
);
}
}
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// UAS LIST
if
(
listDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
listDockWidget
);
listDockWidget
->
show
();
}
// UAS LIST
if
(
listDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
listDockWidget
);
listDockWidget
->
show
();
}
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
#endif
this
->
show
();
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
#endif
this
->
show
();
}
void
MainWindow
::
loadGoogleEarthView
()
{
clearView
();
// 3D map
if
(
gEarthWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
centerStack
->
setCurrentWidget
(
gEarthWidget
);
}
}
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
clearView
();
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// 3D map
if
(
gEarthWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
centerStack
->
setCurrentWidget
(
gEarthWidget
);
}
}
// UAS LIST
if
(
list
DockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
list
DockWidget
);
list
DockWidget
->
show
();
}
// UAS CONTROL
if
(
control
DockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
control
DockWidget
);
control
DockWidget
->
show
();
}
// WAYPOINT
LIST
if
(
waypoints
DockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypoints
DockWidget
);
waypoints
DockWidget
->
show
();
}
// UAS
LIST
if
(
list
DockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
list
DockWidget
);
list
DockWidget
->
show
();
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
this
->
show
();
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
this
->
show
();
#endif
}
void
MainWindow
::
load3DView
()
{
#ifdef QGC_OSG_ENABLED
clearView
();
#ifdef QGC_OSG_ENABLED
clearView
();
// 3D map
if
(
_3DWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3DWidget->setActive(true);
centerStack
->
setCurrentWidget
(
_3DWidget
);
}
}
// 3D map
if
(
_3DWidget
)
{
QStackedWidget
*
centerStack
=
dynamic_cast
<
QStackedWidget
*>
(
centralWidget
());
if
(
centerStack
)
{
//map3DWidget->setActive(true);
centerStack
->
setCurrentWidget
(
_3DWidget
);
}
}
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// UAS CONTROL
if
(
controlDockWidget
)
{
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
controlDockWidget
);
controlDockWidget
->
show
();
}
// UAS LIST
if
(
listDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
listDockWidget
);
listDockWidget
->
show
();
}
// UAS LIST
if
(
listDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
listDockWidget
);
listDockWidget
->
show
();
}
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// WAYPOINT LIST
if
(
waypointsDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
waypointsDockWidget
);
waypointsDockWidget
->
show
();
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
// HORIZONTAL SITUATION INDICATOR
if
(
hsiDockWidget
)
{
HSIDisplay
*
hsi
=
dynamic_cast
<
HSIDisplay
*>
(
hsiDockWidget
->
widget
()
);
if
(
hsi
)
{
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
hsiDockWidget
);
hsiDockWidget
->
show
();
}
}
#endif
this
->
show
();
this
->
show
();
}
}
void
MainWindow
::
loadEngineerView
()
{
...
...
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