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