refs #242, fixed slot logging

This commit is contained in:
Klaus Basan
2014-05-31 02:05:35 +02:00
parent 1bb4c3120b
commit ba217fed57
3 changed files with 16 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ namespace BlackMiscTest
if (line.startsWith("app")) runtime->slotLogForApplication(enable);
else if (line.startsWith("aud")) runtime->slotLogForAudio(enable);
else if (line.startsWith("net")) runtime->slotLogForNetwork(enable);
else if (line.startsWith("own")) runtime->signalLogForOwnAircraft(enable);
else if (line.startsWith("own")) runtime->slotLogForOwnAircraft(enable);
else if (line.startsWith("set")) runtime->slotLogForSettings(enable);
else if (line.startsWith("sim")) runtime->slotLogForSimulator(enable);
else if (line.startsWith("all")) runtime->slotLog(enable);

View File

@@ -119,7 +119,7 @@ namespace BlackCore
*/
bool CContextOwnAircraft::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude, const QString &originator)
{
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, position.toQString(), altitude.toQString());
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, position.toQString(), altitude.toQString(), originator);
bool changed = (this->m_ownAircraft.getPosition() == position);
if (changed) this->m_ownAircraft.setPosition(position);
@@ -179,6 +179,8 @@ namespace BlackCore
void CContextOwnAircraft::setAudioOutputVolumes(int outputVolumeCom1, int outputVolumeCom2)
{
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, QString::number(outputVolumeCom1), QString::number(outputVolumeCom2));
CComSystem com1 = this->m_ownAircraft.getCom1System();
com1.setVolumeOutput(outputVolumeCom1);
this->m_ownAircraft.setCom1System(com1);
@@ -207,11 +209,22 @@ namespace BlackCore
*/
void CContextOwnAircraft::setAudioVoiceRoomOverrideUrls(const QString &voiceRoom1Url, const QString &voiceRoom2Url)
{
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, voiceRoom1Url, voiceRoom2Url);
this->m_voiceRoom1UrlOverride = voiceRoom1Url.trimmed();
this->m_voiceRoom2UrlOverride = voiceRoom2Url.trimmed();
this->resolveVoiceRooms();
}
/*
* Voice room resolution
*/
void CContextOwnAircraft::enableAutomaticVoiceRoomResolution(bool enable)
{
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, enable);
this->m_automaticVoiceRoomResolution = enable;
}
/*
* Own aircraft
*/

View File

@@ -55,7 +55,7 @@ namespace BlackCore
virtual void setAudioVoiceRoomOverrideUrls(const QString &voiceRoom1Url, const QString &voiceRoom2Url) override;
//! \copydoc IContextOwnAircraft::enableAutomaticVoiceRoomResolution
virtual void enableAutomaticVoiceRoomResolution(bool enable) override { this->m_automaticVoiceRoomResolution = enable; }
virtual void enableAutomaticVoiceRoomResolution(bool enable) override;
protected:
//! Constructor, with link to runtime