Newer
Older
Mariano Lizarraga
committed
// HORIZONTAL SITUATION INDICATOR
showTheWidget(MENU_HSI, currentView);
// HEAD DOWN 1
showTheWidget(MENU_HDD_1, currentView);
// HEAD DOWN 2
showTheWidget(MENU_HDD_2, currentView);
// MAVLINK LOG PLAYER
showTheWidget(MENU_MAVLINK_LOG_PLAYER, currentView);
// VIDEO 1
showTheWidget(MENU_VIDEO_STREAM_1, currentView);
// VIDEO 2
showTheWidget(MENU_VIDEO_STREAM_2, currentView);
// Restore window state
if (UASManager::instance()->getUASList().count() > 0)
{
// Restore the mainwindow size
if (settings.contains(getWindowGeometryKey()))
{
restoreGeometry(settings.value(getWindowGeometryKey()).toByteArray());
}
// Restore the widget positions and size
if (settings.contains(getWindowStateKey()))
{
restoreState(settings.value(getWindowStateKey()).toByteArray(), QGC::applicationVersion());
}
}
// ACTIVATE MAP WIDGET
if (headUpDockWidget)
{
HUD* tmpHud = dynamic_cast<HUD*>( headUpDockWidget->widget() );
if (tmpHud)
{
}
}
this->show();
void MainWindow::showTheCentralWidget (TOOLS_WIDGET_NAMES centralWidget, VIEW_SECTIONS view)
{
bool tempVisible;
QWidget* tempWidget = dockWidgets[centralWidget];
tempVisible = settings.value(buildMenuKey(SUB_SECTION_CHECKED,centralWidget,view), false).toBool();
//qDebug() << buildMenuKey (SUB_SECTION_CHECKED,centralWidget,view) << tempVisible;
//qDebug() << "SETTING TO:" << tempVisible;
toolsMenuActions[centralWidget]->setChecked(tempVisible);
if (centerStack && tempWidget && tempVisible)
//qDebug() << "ACTIVATING MAIN WIDGET";
centerStack->setCurrentWidget(tempWidget);
Mariano Lizarraga
committed
void MainWindow::loadDataView(QString fileName)
{
// Unload line chart
QString chKey = buildMenuKey (SUB_SECTION_CHECKED,static_cast<TOOLS_WIDGET_NAMES>(CENTRAL_LINECHART), currentView);
settings.setValue(chKey,false);
// Set data plot in settings as current widget and then run usual update procedure
chKey = buildMenuKey (SUB_SECTION_CHECKED,static_cast<TOOLS_WIDGET_NAMES>(CENTRAL_DATA_PLOT), currentView);
Mariano Lizarraga
committed
Mariano Lizarraga
committed
// Plot is now selected, now load data from file
if (dataplotWidget)
Mariano Lizarraga
committed
}
// QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
// if (centerStack)
// {
// centerStack->setCurrentWidget(dataplotWidget);
// dataplotWidget->loadFile(fileName);
// }
// }