mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Flight plan fixes based on https://discordapp.com/channels/539048679160676382/539486309882789888/597133111272275970
* improved setting of combox value, fixed wrong text * do NOT emit signals when same index * getOwnCallsign * do NOT used cache FPs for own aircraft
This commit is contained in:
committed by
Mat Sutcliffe
parent
891a058f17
commit
ea7b3316c9
@@ -33,6 +33,12 @@ namespace BlackMisc
|
||||
return this->provider()->getOwnAircraft();
|
||||
}
|
||||
|
||||
CCallsign COwnAircraftAware::getOwnCallsign() const
|
||||
{
|
||||
Q_ASSERT_X(this->provider(), Q_FUNC_INFO, "No object available");
|
||||
return this->provider()->getOwnCallsign();
|
||||
}
|
||||
|
||||
CCoordinateGeodetic COwnAircraftAware::getOwnAircraftPosition() const
|
||||
{
|
||||
Q_ASSERT_X(this->provider(), Q_FUNC_INFO, "No object available");
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/pq/frequency.h"
|
||||
#include "blackmisc/pq/length.h"
|
||||
@@ -33,7 +34,6 @@ namespace BlackMisc
|
||||
{
|
||||
class CAircraftIcaoCode;
|
||||
class CAircraftSituation;
|
||||
class CCallsign;
|
||||
}
|
||||
|
||||
namespace Simulation
|
||||
@@ -46,6 +46,10 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
virtual CSimulatedAircraft getOwnAircraft() const = 0;
|
||||
|
||||
//! Own aircraft's callsign
|
||||
//! \threadsafe
|
||||
virtual Aviation::CCallsign getOwnCallsign() const = 0;
|
||||
|
||||
//! Own aircraft COM unit
|
||||
//! \threadsafe
|
||||
virtual Aviation::CComSystem getOwnComSystem(Aviation::CComSystem::ComUnit unit) const = 0;
|
||||
@@ -129,6 +133,9 @@ namespace BlackMisc
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraft
|
||||
CSimulatedAircraft getOwnAircraft() const;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnCallsign
|
||||
Aviation::CCallsign getOwnCallsign() const;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraftPosition
|
||||
BlackMisc::Geo::CCoordinateGeodetic getOwnAircraftPosition() const;
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ namespace BlackMisc
|
||||
return m_ownAircraft;
|
||||
}
|
||||
|
||||
CCallsign COwnAircraftProviderDummy::getOwnCallsign() const
|
||||
{
|
||||
QReadLocker l(&m_lock);
|
||||
return m_ownAircraft.getCallsign();
|
||||
}
|
||||
|
||||
CComSystem COwnAircraftProviderDummy::getOwnComSystem(CComSystem::ComUnit unit) const
|
||||
{
|
||||
QReadLocker l(&m_lock);
|
||||
|
||||
@@ -56,6 +56,9 @@ namespace BlackMisc
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraft
|
||||
virtual CSimulatedAircraft getOwnAircraft() const override;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnCallsign
|
||||
virtual Aviation::CCallsign getOwnCallsign() const override;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnComSystem
|
||||
virtual Aviation::CComSystem getOwnComSystem(Aviation::CComSystem::ComUnit unit) const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user