mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Ref T180, formatting / const
This commit is contained in:
@@ -180,23 +180,16 @@ namespace BlackMisc
|
||||
CVariant CInterpolationAndRenderingSetup::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return CVariant::from(*this); }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexInterpolatorDebugMessages:
|
||||
return CVariant::fromValue(m_interpolatorDebugMessage);
|
||||
case IndexSimulatorDebugMessages:
|
||||
return CVariant::fromValue(m_simulatorDebugMessages);
|
||||
case IndexForceFullInterpolation:
|
||||
return CVariant::fromValue(m_forceFullInterpolation);
|
||||
case IndexMaxRenderedAircraft:
|
||||
return CVariant::fromValue(m_maxRenderedAircraft);
|
||||
case IndexMaxRenderedDistance:
|
||||
return CVariant::fromValue(m_maxRenderedDistance);
|
||||
case IndexEnabledAircraftParts:
|
||||
return CVariant::fromValue(m_enabledAircraftParts);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
case IndexInterpolatorDebugMessages: return CVariant::fromValue(m_interpolatorDebugMessage);
|
||||
case IndexSimulatorDebugMessages: return CVariant::fromValue(m_simulatorDebugMessages);
|
||||
case IndexForceFullInterpolation: return CVariant::fromValue(m_forceFullInterpolation);
|
||||
case IndexMaxRenderedAircraft: return CVariant::fromValue(m_maxRenderedAircraft);
|
||||
case IndexMaxRenderedDistance: return CVariant::fromValue(m_maxRenderedDistance);
|
||||
case IndexEnabledAircraftParts: return CVariant::fromValue(m_enabledAircraftParts);
|
||||
default: return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,30 +200,16 @@ namespace BlackMisc
|
||||
*this = variant.value<CInterpolationAndRenderingSetup>();
|
||||
return;
|
||||
}
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexInterpolatorDebugMessages:
|
||||
m_interpolatorDebugMessage = variant.toBool();
|
||||
break;
|
||||
case IndexSimulatorDebugMessages:
|
||||
m_simulatorDebugMessages = variant.toBool();
|
||||
break;
|
||||
case IndexForceFullInterpolation:
|
||||
m_forceFullInterpolation = variant.toBool();
|
||||
break;
|
||||
case IndexMaxRenderedAircraft:
|
||||
m_maxRenderedAircraft = variant.toInt();
|
||||
break;
|
||||
case IndexMaxRenderedDistance:
|
||||
m_maxRenderedDistance = variant.value<CLength>();
|
||||
break;
|
||||
case IndexEnabledAircraftParts:
|
||||
m_enabledAircraftParts = variant.toBool();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
case IndexInterpolatorDebugMessages: m_interpolatorDebugMessage = variant.toBool(); break;
|
||||
case IndexSimulatorDebugMessages: m_simulatorDebugMessages = variant.toBool(); break;
|
||||
case IndexForceFullInterpolation: m_forceFullInterpolation = variant.toBool(); break;
|
||||
case IndexMaxRenderedAircraft: m_maxRenderedAircraft = variant.toInt(); break;
|
||||
case IndexMaxRenderedDistance: m_maxRenderedDistance = variant.value<CLength>(); break;
|
||||
case IndexEnabledAircraftParts: m_enabledAircraftParts = variant.toBool(); break;
|
||||
default: CValueObject::setPropertyByIndex(index, variant); break;
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -127,9 +127,9 @@ namespace BlackMisc
|
||||
|
||||
private:
|
||||
bool m_interpolatorDebugMessage = false; //! Debug messages in interpolator
|
||||
bool m_simulatorDebugMessages = false; //! Debug messages of simulator (aka plugin)
|
||||
bool m_forceFullInterpolation = false; //! always do a full interpolation, even if aircraft is not moving
|
||||
bool m_enabledAircraftParts = true; //! Update aircraft parts
|
||||
bool m_simulatorDebugMessages = false; //! Debug messages of simulator (aka plugin)
|
||||
bool m_forceFullInterpolation = false; //! always do a full interpolation, even if aircraft is not moving
|
||||
bool m_enabledAircraftParts = true; //! Update aircraft parts
|
||||
int m_maxRenderedAircraft = InfiniteAircraft(); //!< max.rendered aircraft
|
||||
BlackMisc::PhysicalQuantities::CLength m_maxRenderedDistance { 0, nullptr }; //!< max.distance for rendering
|
||||
BlackMisc::Aviation::CCallsignSet m_callsignsToLog;
|
||||
|
||||
@@ -24,7 +24,9 @@ namespace BlackMisc
|
||||
{}
|
||||
|
||||
BlackMisc::Aviation::CAircraftSituation CInterpolatorMulti::getInterpolatedSituation(
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup, const CInterpolationHints &hints, CInterpolationStatus &status)
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const CInterpolationAndRenderingSetup &setup,
|
||||
const CInterpolationHints &hints, CInterpolationStatus &status)
|
||||
{
|
||||
switch (m_mode)
|
||||
{
|
||||
|
||||
@@ -32,12 +32,14 @@ namespace BlackMisc
|
||||
|
||||
//! \copydoc CInterpolator::getInterpolatedSituation
|
||||
BlackMisc::Aviation::CAircraftSituation getInterpolatedSituation(
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup,
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const CInterpolationAndRenderingSetup &setup,
|
||||
const CInterpolationHints &hints, CInterpolationStatus &status);
|
||||
|
||||
//! \copydoc CInterpolator::getInterpolatedParts
|
||||
BlackMisc::Aviation::CAircraftParts getInterpolatedParts(
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup,
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const CInterpolationAndRenderingSetup &setup,
|
||||
CPartsStatus &partsStatus, bool log = false);
|
||||
|
||||
//! \copydoc CInterpolator::addAircraftSituation
|
||||
|
||||
Reference in New Issue
Block a user