diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc
index 2415e03dab565367130ce2f7a4875d5f8c1da5ce..f82ca4949071a236cb04029d9b2072bf9fcd2e8b 100644
--- a/src/ui/MainWindow.cc
+++ b/src/ui/MainWindow.cc
@@ -168,6 +168,7 @@ MainWindow::MainWindow(QWidget *parent):
customStatusBar = new QGCStatusBar(this);
setStatusBar(customStatusBar);
statusBar()->setSizeGripEnabled(true);
+ toolBar->addPerspectiveChangeAction(ui.actionConfiguration_2);
emit initStatusChanged("Building common widgets.");
@@ -1058,6 +1059,7 @@ void MainWindow::connectCommonActions()
if (currentView == VIEW_PILOT) ui.actionPilotsView->setChecked(true);
if (currentView == VIEW_SIMULATION) ui.actionSimulation_View->setChecked(true);
if (currentView == VIEW_OPERATOR) ui.actionOperatorsView->setChecked(true);
+ if (currentView == VIEW_CONFIGURATION) ui.actionConfiguration_2->setChecked(true);
if (currentView == VIEW_FIRMWAREUPDATE) ui.actionFirmwareUpdateView->setChecked(true);
if (currentView == VIEW_UNCONNECTED) ui.actionUnconnectedView->setChecked(true);
@@ -1089,6 +1091,7 @@ void MainWindow::connectCommonActions()
connect(ui.actionEngineersView, SIGNAL(triggered()), this, SLOT(loadEngineerView()));
connect(ui.actionOperatorsView, SIGNAL(triggered()), this, SLOT(loadOperatorView()));
connect(ui.actionUnconnectedView, SIGNAL(triggered()), this, SLOT(loadUnconnectedView()));
+ connect(ui.actionConfiguration_2,SIGNAL(triggered()),this,SLOT(loadConfigurationView()));
connect(ui.actionFirmwareUpdateView, SIGNAL(triggered()), this, SLOT(loadFirmwareUpdateView()));
connect(ui.actionMavlinkView, SIGNAL(triggered()), this, SLOT(loadMAVLinkView()));
@@ -1549,6 +1552,9 @@ void MainWindow::loadViewState()
// Load defaults
switch (currentView)
{
+ case VIEW_CONFIGURATION:
+ centerStack->setCurrentWidget(configWidget);
+ break;
case VIEW_ENGINEER:
centerStack->setCurrentWidget(linechartWidget);
controlDockWidget->hide();
@@ -1704,6 +1710,16 @@ void MainWindow::loadOperatorView()
loadViewState();
}
}
+void MainWindow::loadConfigurationView()
+{
+ if (currentView != VIEW_CONFIGURATION)
+ {
+ storeViewState();
+ currentView = VIEW_CONFIGURATION;
+ ui.actionConfiguration_2->setChecked(true);
+ loadViewState();
+ }
+}
void MainWindow::loadUnconnectedView()
{
diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h
index 4cc84a87bd2b6d98175666cb7309fde41bba09d8..b17d631c7e0f8350f92724b69182781adb51bdce 100644
--- a/src/ui/MainWindow.h
+++ b/src/ui/MainWindow.h
@@ -155,6 +155,8 @@ public slots:
void stopVideoCapture();
void saveScreen();
+ /** @brief Load configuration view */
+ void loadConfigurationView();
/** @brief Load default view when no MAV is connected */
void loadUnconnectedView();
/** @brief Load view for pilot */
@@ -265,6 +267,7 @@ protected:
VIEW_SIMULATION,
VIEW_MAVLINK,
VIEW_FIRMWAREUPDATE,
+ VIEW_CONFIGURATION,
VIEW_UNCONNECTED, ///< View in unconnected mode, when no UAS is available
VIEW_FULL ///< All widgets shown at once
} VIEW_SECTIONS;
diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui
index 6226dc3b7d59bc0005f2feea44985100220408d6..6a7f1c306eed147ac0a558c3f1451b95450662e2 100644
--- a/src/ui/MainWindow.ui
+++ b/src/ui/MainWindow.ui
@@ -51,7 +51,7 @@
0
0
800
- 22
+ 21