mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
Ref T739, removed voice room value objects
This commit is contained in:
committed by
Mat Sutcliffe
parent
09e65a2525
commit
7e36e67f89
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/pq/physicalquantity.h"
|
||||
@@ -24,7 +23,6 @@ using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Audio;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -155,7 +153,6 @@ namespace BlackMisc
|
||||
(void)QT_TRANSLATE_NOOP("Aviation", "until(UTC)");
|
||||
(void)QT_TRANSLATE_NOOP("Aviation", "range");
|
||||
(void)QT_TRANSLATE_NOOP("Aviation", "distance");
|
||||
(void)QT_TRANSLATE_NOOP("Network", "voiceroom");
|
||||
}
|
||||
|
||||
void CAtcStation::setFrequency(const CFrequency &frequency)
|
||||
@@ -389,7 +386,6 @@ namespace BlackMisc
|
||||
case IndexIsInRange: return CVariant::fromValue(isInRange());
|
||||
case IndexAtis: return m_atis.propertyByIndex(index.copyFrontRemoved());
|
||||
case IndexMetar: return m_metar.propertyByIndex(index.copyFrontRemoved());
|
||||
case IndexVoiceRoom: return m_voiceRoom.propertyByIndex(index.copyFrontRemoved());
|
||||
case IndexIsAfvCrossCoupled: return CVariant::from(m_isAfvCrossCoupled);
|
||||
default:
|
||||
return (ICoordinateWithRelativePosition::canHandleIndex(index)) ?
|
||||
@@ -414,7 +410,6 @@ namespace BlackMisc
|
||||
case IndexRange: m_range.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
|
||||
case IndexAtis: m_atis.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
|
||||
case IndexMetar: m_metar.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
|
||||
case IndexVoiceRoom: m_voiceRoom.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
|
||||
case IndexIsAfvCrossCoupled: this->setAfvCrossCoupled(variant.value<bool>()); break;
|
||||
case IndexCallsignString:
|
||||
case IndexCallsignStringCrossCopuled:
|
||||
@@ -459,7 +454,6 @@ namespace BlackMisc
|
||||
case IndexIsInRange: return Compare::compare(this->isInRange(), compareValue.isInRange());
|
||||
case IndexAtis: return m_atis.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getAtis());
|
||||
case IndexMetar: return m_metar.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getMetar());
|
||||
case IndexVoiceRoom: return this->getVoiceRoom().getVoiceRoomUrl().compare(compareValue.getVoiceRoom().getVoiceRoomUrl());
|
||||
case IndexIsAfvCrossCoupled: return Compare::compare(this->isAfvCrossCoupled(), compareValue.isAfvCrossCoupled());
|
||||
default:
|
||||
if (ICoordinateWithRelativePosition::canHandleIndex(index))
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#ifndef BLACKMISC_AVIATION_ATCSTATION_H
|
||||
#define BLACKMISC_AVIATION_ATCSTATION_H
|
||||
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
@@ -62,8 +61,7 @@ namespace BlackMisc
|
||||
IndexLatitude,
|
||||
IndexLongitude,
|
||||
IndexAtis,
|
||||
IndexMetar,
|
||||
IndexVoiceRoom, //!< @deprecated
|
||||
IndexMetar
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
@@ -181,22 +179,6 @@ namespace BlackMisc
|
||||
//! Set AFV cross coupled
|
||||
void setAfvCrossCoupled(bool coupled) { m_isAfvCrossCoupled = coupled; }
|
||||
|
||||
//! Get voice room
|
||||
//! \deprecated
|
||||
const Audio::CVoiceRoom &getVoiceRoom() const { return m_voiceRoom; }
|
||||
|
||||
//! Set voice room
|
||||
//! \deprecated
|
||||
void setVoiceRoom(const Audio::CVoiceRoom &voiceRoom) { m_voiceRoom = voiceRoom; }
|
||||
|
||||
//! Set voice room URL
|
||||
//! \deprecated
|
||||
void setVoiceRoomUrl(const QString &url) { m_voiceRoom.setVoiceRoomUrl(url); }
|
||||
|
||||
//! Valid voice room?
|
||||
//! \deprecated
|
||||
bool hasValidVoiceRoom() const { return m_voiceRoom.isValid(); }
|
||||
|
||||
//! Booked date/time if any.
|
||||
//! This represents the closest booking within a time frame as there can be multiple bookings.
|
||||
const QDateTime &getBookedFromUtc() const { return m_bookedFromUtc; }
|
||||
@@ -301,7 +283,6 @@ namespace BlackMisc
|
||||
QDateTime m_bookedUntilUtc;
|
||||
CInformationMessage m_atis { CInformationMessage::ATIS };
|
||||
CInformationMessage m_metar { CInformationMessage::METAR };
|
||||
Audio::CVoiceRoom m_voiceRoom;
|
||||
|
||||
BLACK_METACLASS(
|
||||
CAtcStation,
|
||||
@@ -316,7 +297,6 @@ namespace BlackMisc
|
||||
BLACK_METAMEMBER(bookedUntilUtc),
|
||||
BLACK_METAMEMBER(atis),
|
||||
BLACK_METAMEMBER(metar),
|
||||
BLACK_METAMEMBER(voiceRoom),
|
||||
BLACK_METAMEMBER(relativeDistance),
|
||||
BLACK_METAMEMBER(relativeBearing)
|
||||
);
|
||||
|
||||
@@ -95,11 +95,6 @@ namespace BlackMisc
|
||||
return c;
|
||||
}
|
||||
|
||||
CAtcStationList CAtcStationList::stationsWithValidVoiceRoom() const
|
||||
{
|
||||
return this->findBy(&CAtcStation::hasValidVoiceRoom, true);
|
||||
}
|
||||
|
||||
CAtcStationList CAtcStationList::stationsWithValidFrequency() const
|
||||
{
|
||||
return this->findBy(&CAtcStation::hasValidFrequency, true);
|
||||
|
||||
@@ -61,10 +61,6 @@ namespace BlackMisc
|
||||
//! Set online status
|
||||
int setOnline(const CCallsign &callsign, bool online);
|
||||
|
||||
//! Find 0..n stations with valid voice room
|
||||
//! \sa CAtcStation::hasValidVoiceRoom
|
||||
CAtcStationList stationsWithValidVoiceRoom() const;
|
||||
|
||||
//! Find 0..n stations with valid COM frequency
|
||||
//! \sa CAtcStation::hasValidFrequency
|
||||
CAtcStationList stationsWithValidFrequency() const;
|
||||
|
||||
Reference in New Issue
Block a user