refs #806, apply CInterpolationAndRenderingSetup

* removed no longer needed signatures
* some renaming of CInterpolationAndRenderingSetup functions
* adjusted UI element
This commit is contained in:
Klaus Basan
2016-11-15 23:26:18 +01:00
parent 871a1dd321
commit 3903a24696
19 changed files with 159 additions and 418 deletions

View File

@@ -27,7 +27,7 @@ namespace BlackMisc
CAirspaceAircraftSnapshot::CAirspaceAircraftSnapshot(
const CSimulatedAircraftList &allAircraft,
bool restricted, bool renderingEnabled, int maxAircraft,
const CLength &maxRenderedDistance, const CLength &maxRenderedBoundary) :
const CLength &maxRenderedDistance) :
m_timestampMsSinceEpoch(QDateTime::currentMSecsSinceEpoch()),
m_restricted(restricted),
m_renderingEnabled(renderingEnabled),
@@ -69,13 +69,11 @@ namespace BlackMisc
int count = 0; // when max. aircraft reached?
for (const CSimulatedAircraft &currentAircraft : aircraft)
{
CCallsign cs(currentAircraft.getCallsign());
const CCallsign cs(currentAircraft.getCallsign());
if (currentAircraft.isEnabled())
{
CLength distance(currentAircraft.getRelativeDistance());
if (count >= maxAircraft ||
(!maxRenderedDistance.isNull() && distance >= maxRenderedBoundary) ||
(!maxRenderedBoundary.isNull() && distance >= maxRenderedBoundary))
if (count >= maxAircraft || (!maxRenderedDistance.isNull() && distance >= maxRenderedDistance))
{
m_disabledAircraftCallsignsByDistance.push_back(cs);
}

View File

@@ -39,14 +39,11 @@ namespace BlackMisc
CAirspaceAircraftSnapshot();
//! Constructor
CAirspaceAircraftSnapshot(
const BlackMisc::Simulation::CSimulatedAircraftList &allAircraft,
CAirspaceAircraftSnapshot(const BlackMisc::Simulation::CSimulatedAircraftList &allAircraft,
bool restricted = false,
bool renderingEnabled = true,
int maxAircraft = 100,
const BlackMisc::PhysicalQuantities::CLength &maxRenderedDistance = BlackMisc::PhysicalQuantities::CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()),
const BlackMisc::PhysicalQuantities::CLength &maxRenderedBoundary = BlackMisc::PhysicalQuantities::CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit())
);
const BlackMisc::PhysicalQuantities::CLength &maxRenderedDistance = BlackMisc::PhysicalQuantities::CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()));
//! Time when snapshot was taken
const QDateTime getTimestamp() const { return QDateTime::fromMSecsSinceEpoch(m_timestampMsSinceEpoch); }