mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T168, relay kicked message thru context to UI
* new signal in context, connected with VATLIB * display in UI
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2aa5ed431f
commit
27ebf3e43d
@@ -242,6 +242,14 @@ void SwiftGuiStd::onConnectionTerminated()
|
||||
this->updateGuiStatusInformation();
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onKickedFromNetwork(const QString &kickMessage)
|
||||
{
|
||||
this->updateGuiStatusInformation();
|
||||
this->displayInOverlayWindow(CStatusMessage(
|
||||
this, CStatusMessage::SeverityError,
|
||||
kickMessage.isEmpty() ? "You have been kicked from the network" : kickMessage));
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onConnectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to)
|
||||
{
|
||||
Q_UNUSED(from);
|
||||
|
||||
@@ -210,6 +210,9 @@ private:
|
||||
//! Terminated connection
|
||||
void onConnectionTerminated();
|
||||
|
||||
//! Kicked from network
|
||||
void onKickedFromNetwork(const QString &kickMessage);
|
||||
|
||||
//! Update timer
|
||||
void handleTimerBasedUpdates();
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ void SwiftGuiStd::init()
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::sharedInfoObjectsRead, this, &SwiftGuiStd::sharedInfoObjectsLoaded);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionTerminated, this, &SwiftGuiStd::onConnectionTerminated);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::onConnectionStatusChanged);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::kicked, this, &SwiftGuiStd::onKickedFromNetwork);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::textMessageSent, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageSent);
|
||||
connect(m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::handleTimerBasedUpdates);
|
||||
|
||||
Reference in New Issue
Block a user