Commit fa83a817 authored by pixhawk's avatar pixhawk

Removed all sorts of menu entries and widgets not available on the various platforms

parent 7d8ebfd3
/*===================================================================== /*===================================================================
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() ...@@ -135,14 +115,16 @@ void MainWindow::buildWidgets()
mapWidget = new MapWidget(this); mapWidget = new MapWidget(this);
protocolWidget = new XMLCommProtocolWidget(this); protocolWidget = new XMLCommProtocolWidget(this);
dataplotWidget = new QGCDataPlot2D(this); dataplotWidget = new QGCDataPlot2D(this);
#ifdef QGC_OSG_ENABLED #ifdef QGC_OSG_ENABLED
_3DWidget = Q3DWidgetFactory::get("PIXHAWK"); _3DWidget = Q3DWidgetFactory::get("PIXHAWK");
#endif #endif
#ifdef QGC_OSGEARTH_ENABLED #ifdef QGC_OSGEARTH_ENABLED
_3DMapWidget = Q3DWidgetFactory::get("MAP3D"); _3DMapWidget = Q3DWidgetFactory::get("MAP3D");
#endif #endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
gEarthWidget = new QGCGoogleEarthView(this); gEarthWidget = new QGCGoogleEarthView(this);
#endif
// Dock widgets // Dock widgets
controlDockWidget = new QDockWidget(tr("Control"), this); controlDockWidget = new QDockWidget(tr("Control"), this);
...@@ -234,13 +216,15 @@ void MainWindow::arrangeCenterStack() ...@@ -234,13 +216,15 @@ void MainWindow::arrangeCenterStack()
if (linechartWidget) centerStack->addWidget(linechartWidget); if (linechartWidget) centerStack->addWidget(linechartWidget);
if (protocolWidget) centerStack->addWidget(protocolWidget); if (protocolWidget) centerStack->addWidget(protocolWidget);
if (mapWidget) centerStack->addWidget(mapWidget); if (mapWidget) centerStack->addWidget(mapWidget);
#ifdef QGC_OSG_ENABLED #ifdef QGC_OSG_ENABLED
if (_3DWidget) centerStack->addWidget(_3DWidget); if (_3DWidget) centerStack->addWidget(_3DWidget);
#endif #endif
#ifdef QGC_OSGEARTH_ENABLED #ifdef QGC_OSGEARTH_ENABLED
if (_3DMapWidget) centerStack->addWidget(_3DMapWidget); if (_3DMapWidget) centerStack->addWidget(_3DMapWidget);
#endif #endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
if (gEarthWidget) centerStack->addWidget(gEarthWidget); if (gEarthWidget) centerStack->addWidget(gEarthWidget);
#endif
if (hudWidget) centerStack->addWidget(hudWidget); if (hudWidget) centerStack->addWidget(hudWidget);
if (dataplotWidget) centerStack->addWidget(dataplotWidget); if (dataplotWidget) centerStack->addWidget(dataplotWidget);
...@@ -380,8 +364,17 @@ void MainWindow::connectActions() ...@@ -380,8 +364,17 @@ void MainWindow::connectActions()
connect(ui.actionPilotView, SIGNAL(triggered()), this, SLOT(loadPilotView())); connect(ui.actionPilotView, SIGNAL(triggered()), this, SLOT(loadPilotView()));
connect(ui.actionEngineerView, SIGNAL(triggered()), this, SLOT(loadEngineerView())); connect(ui.actionEngineerView, SIGNAL(triggered()), this, SLOT(loadEngineerView()));
connect(ui.actionOperatorView, SIGNAL(triggered()), this, SLOT(loadOperatorView())); connect(ui.actionOperatorView, SIGNAL(triggered()), this, SLOT(loadOperatorView()));
#ifdef QGC_OSG_ENABLED
connect(ui.action3DView, SIGNAL(triggered()), this, SLOT(load3DView())); 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())); 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_full_view, SIGNAL(triggered()), this, SLOT(loadAllView()));
connect(ui.actionShow_MAVLink_view, SIGNAL(triggered()), this, SLOT(loadMAVLinkView())); connect(ui.actionShow_MAVLink_view, SIGNAL(triggered()), this, SLOT(loadMAVLinkView()));
connect(ui.actionShow_data_analysis_view, SIGNAL(triggered()), this, SLOT(loadDataView())); connect(ui.actionShow_data_analysis_view, SIGNAL(triggered()), this, SLOT(loadDataView()));
...@@ -390,7 +383,11 @@ void MainWindow::connectActions() ...@@ -390,7 +383,11 @@ void MainWindow::connectActions()
connect(ui.actionOnline_documentation, SIGNAL(triggered()), this, SLOT(showHelp())); connect(ui.actionOnline_documentation, SIGNAL(triggered()), this, SLOT(showHelp()));
connect(ui.actionCredits_Developers, SIGNAL(triggered()), this, SLOT(showCredits())); connect(ui.actionCredits_Developers, SIGNAL(triggered()), this, SLOT(showCredits()));
connect(ui.actionProject_Roadmap, SIGNAL(triggered()), this, SLOT(showRoadMap())); 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())); connect(ui.actionGoogleEarthView, SIGNAL(triggered()), this, SLOT(loadGoogleEarthView()));
#else
ui.menuWindow->removeAction(ui.actionGoogleEarthView);
#endif
// Joystick configuration // Joystick configuration
connect(ui.actionJoystickSettings, SIGNAL(triggered()), this, SLOT(configure())); connect(ui.actionJoystickSettings, SIGNAL(triggered()), this, SLOT(configure()));
...@@ -935,17 +932,17 @@ void MainWindow::loadGlobalOperatorView() ...@@ -935,17 +932,17 @@ void MainWindow::loadGlobalOperatorView()
waypointsDockWidget->show(); waypointsDockWidget->show();
} }
// // HORIZONTAL SITUATION INDICATOR // // HORIZONTAL SITUATION INDICATOR
// if (hsiDockWidget) // if (hsiDockWidget)
// { // {
// HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() ); // HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
// if (hsi) // if (hsi)
// { // {
// addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget); // addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget);
// hsiDockWidget->show(); // hsiDockWidget->show();
// hsi->start(); // hsi->start();
// } // }
// } // }
// PROCESS CONTROL // PROCESS CONTROL
if (watchdogControlDockWidget) if (watchdogControlDockWidget)
...@@ -972,7 +969,7 @@ void MainWindow::loadGlobalOperatorView() ...@@ -972,7 +969,7 @@ void MainWindow::loadGlobalOperatorView()
void MainWindow::load3DMapView() void MainWindow::load3DMapView()
{ {
#ifdef QGC_OSGEARTH_ENABLED #ifdef QGC_OSGEARTH_ENABLED
clearView(); clearView();
// 3D map // 3D map
...@@ -1020,10 +1017,11 @@ void MainWindow::load3DMapView() ...@@ -1020,10 +1017,11 @@ void MainWindow::load3DMapView()
} }
#endif #endif
this->show(); this->show();
} }
void MainWindow::loadGoogleEarthView() void MainWindow::loadGoogleEarthView()
{ {
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
clearView(); clearView();
// 3D map // 3D map
...@@ -1069,13 +1067,14 @@ void MainWindow::loadGoogleEarthView() ...@@ -1069,13 +1067,14 @@ void MainWindow::loadGoogleEarthView()
} }
} }
this->show(); this->show();
#endif
} }
void MainWindow::load3DView() void MainWindow::load3DView()
{ {
#ifdef QGC_OSG_ENABLED #ifdef QGC_OSG_ENABLED
clearView(); clearView();
// 3D map // 3D map
...@@ -1124,7 +1123,7 @@ void MainWindow::load3DView() ...@@ -1124,7 +1123,7 @@ void MainWindow::load3DView()
#endif #endif
this->show(); this->show();
} }
void MainWindow::loadEngineerView() void MainWindow::loadEngineerView()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment