|
|
|
@ -168,6 +168,7 @@ MainWindow::MainWindow(QWidget *parent):
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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() |
|
|
|
|
{ |
|
|
|
|