diff --git a/src/blackgui/components/cockpitcomponent.cpp b/src/blackgui/components/cockpitcomponent.cpp index d7ddd471c..ffb9d2a43 100644 --- a/src/blackgui/components/cockpitcomponent.cpp +++ b/src/blackgui/components/cockpitcomponent.cpp @@ -25,6 +25,7 @@ namespace BlackGui ui(new Ui::CCockpitComponent) { ui->setupUi(this); + ui->wip_CockpitComPanelShowHideBar->setVisible(false); m_minHeightInfoArea = ui->comp_CockpitInfoArea->minimumHeight(); connect(ui->wip_CockpitComPanelShowHideBar, &CShowHideBar::toggleShowHide, this, &CCockpitComponent::onToggleShowHideDetails, Qt::QueuedConnection); diff --git a/src/blackgui/components/cockpitcomponent.ui b/src/blackgui/components/cockpitcomponent.ui index 5ce77758d..d116af3e4 100644 --- a/src/blackgui/components/cockpitcomponent.ui +++ b/src/blackgui/components/cockpitcomponent.ui @@ -48,17 +48,11 @@ - + 0 0 - - - 0 - 25 - - 16777215 @@ -70,7 +64,7 @@ - + 0 0 diff --git a/src/blackgui/components/maininfoareacomponent.ui b/src/blackgui/components/maininfoareacomponent.ui index 6510109c3..c46771a91 100644 --- a/src/blackgui/components/maininfoareacomponent.ui +++ b/src/blackgui/components/maininfoareacomponent.ui @@ -2,16 +2,11 @@ CMainInfoAreaComponent - - - 0 - 0 - 1779 - 79 - - - Main info area + Main info area of swift + + + QMainWindow::AnimatedDocks diff --git a/src/blackgui/components/mainkeypadareacomponent.cpp b/src/blackgui/components/mainkeypadareacomponent.cpp index 0b2f4583c..1cdea0745 100644 --- a/src/blackgui/components/mainkeypadareacomponent.cpp +++ b/src/blackgui/components/mainkeypadareacomponent.cpp @@ -41,34 +41,34 @@ namespace BlackGui // Info areas // pressed collides, as this toggles button again // using toggle collides, as checking/unchecking toggles again -> infinite loop - connect(ui->pb_MainAircrafts, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainAtc, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainCockpit, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainFlightplan, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainLog, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainMappings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainAircrafts, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainAtc, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainCockpit, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainFlightplan, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainLog, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainMappings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); connect(ui->pb_MainInterpolation, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainRadar, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainSettings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainSimulator, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainTextMessages, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainUsers, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_MainWeather, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainRadar, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainSettings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainSimulator, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainTextMessages, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainUsers, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_MainWeather, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); // non info areas - connect(ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::disableButtonBriefly); - connect(ui->pb_CockpitIdent, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_Opacity050, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_SoundMaxVolume, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); - connect(ui->pb_Audio, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::disableButtonBriefly); + connect(ui->pb_Opacity050, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_SoundMaxVolume, &QPushButton::pressed, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_CockpitIdent, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); + connect(ui->pb_Audio, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected); // command line ui->lep_CommandLineInput->setIdentifier(m_identifier); connect(ui->lep_CommandLineInput, &CCommandInput::commandEntered, this, &CMainKeypadAreaComponent::commandEntered); - connect(ui->lep_CommandLineInput, &CCommandInput::textEntered, this, &CMainKeypadAreaComponent::textEntered); + connect(ui->lep_CommandLineInput, &CCommandInput::textEntered, this, &CMainKeypadAreaComponent::textEntered); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CMainKeypadAreaComponent::connectionStatusChanged); connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CMainKeypadAreaComponent::ownAircraftCockpitChanged); @@ -99,6 +99,7 @@ namespace BlackGui } } + // check the floating for (int floatingIndex : floatingIndexes) { QPushButton *pb = this->mainInfoAreaToButton(static_cast(floatingIndex)); diff --git a/src/blackgui/components/mainkeypadareacomponent.h b/src/blackgui/components/mainkeypadareacomponent.h index 246ae8990..59f68df82 100644 --- a/src/blackgui/components/mainkeypadareacomponent.h +++ b/src/blackgui/components/mainkeypadareacomponent.h @@ -41,7 +41,7 @@ namespace BlackGui explicit CMainKeypadAreaComponent(QWidget *parent = nullptr); //! Destructor - virtual ~CMainKeypadAreaComponent(); + virtual ~CMainKeypadAreaComponent() override; //! Main info area changed void onMainInfoAreaChanged(int currentTabIndex, QList dockedIndexes, QList floatingIndexes); diff --git a/src/blackgui/components/navigatordialog.cpp b/src/blackgui/components/navigatordialog.cpp index 386df9e6c..8a60cb16f 100644 --- a/src/blackgui/components/navigatordialog.cpp +++ b/src/blackgui/components/navigatordialog.cpp @@ -94,7 +94,7 @@ namespace BlackGui int r = 0; int c = 0; - // remark: + // remark: the actions will be set from the main UI for (QAction *action : this->actions()) { if (!action) { continue; } @@ -193,7 +193,7 @@ namespace BlackGui void CNavigatorDialog::changeEvent(QEvent *evt) { - QEvent::Type t = evt->type(); + const QEvent::Type t = evt->type(); if (t == QEvent::WindowStateChange) { evt->ignore(); diff --git a/src/blackgui/dockwidget.cpp b/src/blackgui/dockwidget.cpp index d466c604c..bab5e5220 100644 --- a/src/blackgui/dockwidget.cpp +++ b/src/blackgui/dockwidget.cpp @@ -442,7 +442,7 @@ namespace BlackGui } else { - if (m_wasFrameless) { setFrameless(true); } + if (m_wasFrameless) { this->setFrameless(true); } } m_statusBar.show(); m_wasAlreadyFloating = true; diff --git a/src/blackgui/dockwidgetinfoarea.h b/src/blackgui/dockwidgetinfoarea.h index 01b1ee5e7..092cb869e 100644 --- a/src/blackgui/dockwidgetinfoarea.h +++ b/src/blackgui/dockwidgetinfoarea.h @@ -52,7 +52,6 @@ namespace BlackGui //! \remarks made public so other classes can nest this submenu virtual void addToContextMenu(QMenu *contextMenu) const override; - protected: //! \copydoc CDockWidget::initialFloating virtual void initialFloating() override; diff --git a/src/blackgui/infoarea.cpp b/src/blackgui/infoarea.cpp index 47fd7b889..cb5a7d9fc 100644 --- a/src/blackgui/infoarea.cpp +++ b/src/blackgui/infoarea.cpp @@ -537,7 +537,7 @@ namespace BlackGui // RW: The line below is commented to prevent making this widget visible as a top window // in case it is constructed without parent or anchestor widget. Contrary to the comment, // it does not seem to be necessary https://dev.vatsim-germany.org/issues/738 - // KB 2018-12 with T447 T452 re-eanled the line again, but wit parent condition + // KB 2018-12 with T447 T452 re-eanled the line again, but with parent condition if (this->parentWidget()) // this line { this->setVisible(true); // after redocking this is required @@ -549,6 +549,7 @@ namespace BlackGui void CInfoArea::tabifyAllWidgets() { + if (!sGui || sGui->isShuttingDown()) { return; } this->setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::East); bool init = m_tabBar ? false : true; @@ -585,13 +586,13 @@ namespace BlackGui this->tabifyDockWidget(first, after); } - // as now tabified, now set tab + // as now tabified, set tab if (init) { m_tabBar = this->findChild(); // if we have > 1 docked widgets, we have a tab bar - if (m_tabBar) + if (m_tabBar && sGui) { const QString qss = sGui->getStyleSheetUtility().style(CStyleSheetUtility::fileNameDockWidgetTab()); m_tabBar->setStyleSheet(qss); diff --git a/src/blackgui/settings/dockwidgetsettings.h b/src/blackgui/settings/dockwidgetsettings.h index 17c571dbb..e5999df1a 100644 --- a/src/blackgui/settings/dockwidgetsettings.h +++ b/src/blackgui/settings/dockwidgetsettings.h @@ -102,7 +102,7 @@ namespace BlackGui QString m_floatingFramelessMargins {"0:0:0:0"}; //!< margins, when floating and frameless QString m_dockedMargins {"0:0:0:0"}; //!< margins, when docked QString m_geometry; //!< geometry as HEX values - bool m_floating = false; //!< floating + bool m_floating = false; //!< floating bool m_frameless = false; //!< frameless BLACK_METACLASS( diff --git a/src/swiftguistandard/swiftguistdinit.cpp b/src/swiftguistandard/swiftguistdinit.cpp index 02481e97f..957794619 100644 --- a/src/swiftguistandard/swiftguistdinit.cpp +++ b/src/swiftguistandard/swiftguistdinit.cpp @@ -205,7 +205,7 @@ void SwiftGuiStd::initGuiSignals() connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::identPressed, ui->comp_MainInfoArea->getCockpitComponent(), &CCockpitComponent::setSelectedTransponderModeStateIdent); connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::textEntered, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::handleGlobalCommandLineText); connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::audioPressed, ui->comp_MainInfoArea, &CMainInfoAreaComponent::selectAudioTab); - connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedInfoAreaStatus, ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::onMainInfoAreaChanged); + connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedInfoAreaStatus, ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::onMainInfoAreaChanged); // audio connect(ui->comp_MainInfoArea->getAtcStationComponent(), &CAtcStationComponent::requestAudioWidget, ui->comp_MainInfoArea, &CMainInfoAreaComponent::selectAudioTab); @@ -217,12 +217,12 @@ void SwiftGuiStd::initGuiSignals() connect(ui->menu_TestLocationsEDRY, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); connect(ui->menu_TestLocationsLOWW, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); - connect(ui->menu_WindowFont, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); - connect(ui->menu_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); + connect(ui->menu_WindowFont, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); + connect(ui->menu_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); connect(ui->menu_WindowToggleOnTop, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); connect(ui->menu_WindowToggleNavigator, &QAction::triggered, m_navigator.data(), &CNavigatorDialog::toggleNavigatorVisibility); connect(ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); - connect(ui->menu_MovingMap, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); + connect(ui->menu_MovingMap, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked); connect(m_navigator.data(), &CNavigatorDialog::navigatorClosed, this, &SwiftGuiStd::onNavigatorClosed); // settings (GUI component), styles