mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T536, use always the same overlay widget for text messages
* handle request signals * "slot" functions (e.g. nShowOverlayInlineTextMessageCallsign) so we can later react on settings
This commit is contained in:
committed by
Mat Sutcliffe
parent
2464271400
commit
08578e202a
@@ -489,6 +489,7 @@ void SwiftGuiStd::displayLog()
|
||||
void SwiftGuiStd::onPttChanged(bool enabled)
|
||||
{
|
||||
if (!enabled) { return; }
|
||||
if (!sGui) { return; }
|
||||
sGui->getIContextAudio()->playNotification(CNotificationSounds::PTTClick, true);
|
||||
}
|
||||
|
||||
@@ -522,3 +523,21 @@ void SwiftGuiStd::displayDBusReconnectDialog()
|
||||
msg.clampSeverity(CStatusMessage::SeverityWarning);
|
||||
CLogMessage::preformatted(msg);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onShowOverlayVariant(const CVariant &variant, int durationMs)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
ui->fr_CentralFrameInside->showOverlayVariant(variant, durationMs);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onShowOverlayInlineTextMessageTab(Components::TextMessageTab tab)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
ui->fr_CentralFrameInside->showOverlayInlineTextMessage(tab);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onShowOverlayInlineTextMessageCallsign(const CCallsign &callsign)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
ui->fr_CentralFrameInside->showOverlayInlineTextMessage(callsign);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user