refs #129 , updated GUI to play notification sounds:

* prepared for login/off sounds
* prepared for text message sounds
* helper method to play sounds
* enabled mute / mixer also in cockpit, including context menus
* settings for notification sounds
* some minor tweaks, e.g. changed signal/slot to C++ style where missing
This commit is contained in:
Klaus Basan
2014-02-10 23:37:56 +01:00
parent dbfd4a69e9
commit 18b31b49ac
8 changed files with 118 additions and 39 deletions

View File

@@ -215,7 +215,6 @@ void MainWindow::toggleNetworkConnection()
mode = INetwork::LoginAsObserver;
this->displayStatusMessage(CStatusMessage::getInfoMessage("login in observer mode"));
}
msgs = this->m_contextNetwork->connectToNetwork(static_cast<uint>(mode));
}
else
@@ -296,6 +295,22 @@ void MainWindow::connectionStatusChanged(uint /** from **/, uint to)
this->startUpdateTimers();
else if (newStatus == INetwork::Disconnecting || newStatus == INetwork::Disconnected || newStatus == INetwork::DisconnectedError)
this->stopUpdateTimers();
// sounds
switch (newStatus)
{
case INetwork::Connected:
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationLogin);
break;
case INetwork::Disconnected:
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationLogoff);
break;
case INetwork::DisconnectedError:
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationError);
break;
default:
break;
}
}
/*