mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 22:55:41 +08:00
Ref T447, when "on top" is selected trigger follow up actions
This commit is contained in:
@@ -368,6 +368,15 @@ void SwiftGuiStd::onStyleSheetsChanged()
|
|||||||
this->initStyleSheet();
|
this->initStyleSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SwiftGuiStd::onToggledWindowsOnTop(bool onTop)
|
||||||
|
{
|
||||||
|
if (onTop)
|
||||||
|
{
|
||||||
|
if (m_navigator) { m_navigator->showNavigator(true); }
|
||||||
|
ui->comp_MainInfoArea->allFloatingOnTop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::onCurrentMainWidgetChanged(int currentIndex)
|
void SwiftGuiStd::onCurrentMainWidgetChanged(int currentIndex)
|
||||||
{
|
{
|
||||||
emit this->currentMainInfoAreaChanged(ui->sw_MainMiddle->currentWidget());
|
emit this->currentMainInfoAreaChanged(ui->sw_MainMiddle->currentWidget());
|
||||||
@@ -390,9 +399,9 @@ void SwiftGuiStd::showNormal()
|
|||||||
this->showNormalModeChecked();
|
this->showNormalModeChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::navigatorClosed()
|
void SwiftGuiStd::onNavigatorClosed()
|
||||||
{
|
{
|
||||||
this->showNormal();
|
// this->showNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::verifyPrerequisites()
|
void SwiftGuiStd::verifyPrerequisites()
|
||||||
@@ -411,14 +420,8 @@ void SwiftGuiStd::verifyPrerequisites()
|
|||||||
|
|
||||||
if (msgs.hasWarningOrErrorMessages())
|
if (msgs.hasWarningOrErrorMessages())
|
||||||
{
|
{
|
||||||
if (msgs.size() > 1)
|
if (msgs.size() > 1) { this->displayInOverlayWindow(msgs); }
|
||||||
{
|
else { this->displayInOverlayWindow(msgs.front()); }
|
||||||
this->displayInOverlayWindow(msgs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->displayInOverlayWindow(msgs.front());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this->copyXSwiftBusDialog(true);
|
this->copyXSwiftBusDialog(true);
|
||||||
|
|||||||
@@ -227,15 +227,20 @@ private:
|
|||||||
//! Change opacity 0-100
|
//! Change opacity 0-100
|
||||||
void onChangedWindowOpacity(int opacity = -1);
|
void onChangedWindowOpacity(int opacity = -1);
|
||||||
|
|
||||||
//! Toogle if windows stays on top
|
//! Toggle if windows stays on top
|
||||||
|
//! \remark mostly used with navigator
|
||||||
void toogleWindowStayOnTop();
|
void toogleWindowStayOnTop();
|
||||||
|
|
||||||
//! Toggle window visibility
|
//! Toggle window visibility
|
||||||
|
//! \remark mostly used with navigator
|
||||||
void toggleWindowVisibility();
|
void toggleWindowVisibility();
|
||||||
|
|
||||||
//! Style sheet has been changed
|
//! Style sheet has been changed
|
||||||
void onStyleSheetsChanged();
|
void onStyleSheetsChanged();
|
||||||
|
|
||||||
|
//! Toggle window on top
|
||||||
|
void onToggledWindowsOnTop(bool onTop);
|
||||||
|
|
||||||
//! Main info area current widget changed
|
//! Main info area current widget changed
|
||||||
void onCurrentMainWidgetChanged(int currentIndex);
|
void onCurrentMainWidgetChanged(int currentIndex);
|
||||||
|
|
||||||
@@ -249,7 +254,7 @@ private:
|
|||||||
void showNormal();
|
void showNormal();
|
||||||
|
|
||||||
//! Navigator dialog has been closed
|
//! Navigator dialog has been closed
|
||||||
void navigatorClosed();
|
void onNavigatorClosed();
|
||||||
|
|
||||||
//! Checks if model set is available
|
//! Checks if model set is available
|
||||||
void verifyPrerequisites();
|
void verifyPrerequisites();
|
||||||
|
|||||||
@@ -226,10 +226,10 @@ void SwiftGuiStd::initGuiSignals()
|
|||||||
connect(ui->menu_WindowFont, &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_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||||
connect(ui->menu_WindowToggleOnTop, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
connect(ui->menu_WindowToggleOnTop, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||||
connect(ui->menu_WindowToggleNavigator, &QAction::triggered, m_navigator.data(), &CNavigatorDialog::toggleNavigator);
|
connect(ui->menu_WindowToggleNavigator, &QAction::triggered, m_navigator.data(), &CNavigatorDialog::toggleNavigatorVisibility);
|
||||||
connect(ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
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::navigatorClosed);
|
connect(m_navigator.data(), &CNavigatorDialog::navigatorClosed, this, &SwiftGuiStd::onNavigatorClosed);
|
||||||
|
|
||||||
// command line / text messages
|
// command line / text messages
|
||||||
connect(ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, ui->fr_CentralFrameInside, &COverlayMessagesFrame::showOverlayVariant);
|
connect(ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, ui->fr_CentralFrameInside, &COverlayMessagesFrame::showOverlayVariant);
|
||||||
@@ -267,6 +267,9 @@ void SwiftGuiStd::initGuiSignals()
|
|||||||
this->setSettingsPage(CSettingsComponent::SettingTabSimulator);
|
this->setSettingsPage(CSettingsComponent::SettingTabSimulator);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// on top
|
||||||
|
connect(sGui, &CGuiApplication::alwaysOnTop, this, &SwiftGuiStd::onToggledWindowsOnTop);
|
||||||
|
|
||||||
// main info area
|
// main info area
|
||||||
connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedWholeInfoAreaFloating, this, &SwiftGuiStd::onChangedMainInfoAreaFloating);
|
connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedWholeInfoAreaFloating, this, &SwiftGuiStd::onChangedMainInfoAreaFloating);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user