mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
Ref T231, Ref T236, Ref T238 improved logging "toQString" of hints/setup improved
This commit is contained in:
@@ -14,6 +14,8 @@ using namespace BlackMisc::Aviation;
|
|||||||
using namespace BlackMisc::Geo;
|
using namespace BlackMisc::Geo;
|
||||||
using namespace BlackMisc::PhysicalQuantities;
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
|
||||||
|
#include <QStringBuilder>
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
namespace Simulation
|
namespace Simulation
|
||||||
@@ -79,14 +81,10 @@ namespace BlackMisc
|
|||||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexCenterOfGravity:
|
case IndexCenterOfGravity: return this->m_cgAboveGround.propertyByIndex(index.copyFrontRemoved());
|
||||||
return this->m_cgAboveGround.propertyByIndex(index.copyFrontRemoved());
|
case IndexElevationPlane: return this->m_elevationPlane.propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexElevationPlane:
|
case IndexIsVtolAircraft: return CVariant::fromValue(m_isVtol);
|
||||||
return this->m_elevationPlane.propertyByIndex(index.copyFrontRemoved());
|
default: return CValueObject::propertyByIndex(index);
|
||||||
case IndexIsVtolAircraft:
|
|
||||||
return CVariant::fromValue(m_isVtol);
|
|
||||||
default:
|
|
||||||
return CValueObject::propertyByIndex(index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,8 +111,17 @@ namespace BlackMisc
|
|||||||
|
|
||||||
QString CInterpolationHints::convertToQString(bool i18n) const
|
QString CInterpolationHints::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
static const QString s("%1 %2");
|
return
|
||||||
return s.arg(m_elevationPlane.toQString(i18n), m_cgAboveGround.toQString(i18n));
|
QStringLiteral("VTOL: ") % boolToYesNo(m_isVtol) %
|
||||||
|
QStringLiteral(" parts: ") % boolToYesNo(m_hasParts) %
|
||||||
|
(
|
||||||
|
m_hasParts ?
|
||||||
|
QStringLiteral(" parts: ") % m_aircraftParts.toQString(i18n) :
|
||||||
|
QStringLiteral("")
|
||||||
|
) %
|
||||||
|
QStringLiteral(" CG: ") % m_cgAboveGround.valueRoundedWithUnit(CLengthUnit::m(), 1) %
|
||||||
|
QStringLiteral(" elv.plane: ") % m_elevationPlane.toQString(i18n) %
|
||||||
|
QStringLiteral(" elv.pr: ") % boolToYesNo(m_elevationProvider ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CInterpolationHints::debugInfo(const Geo::CElevationPlane &deltaElevation) const
|
QString CInterpolationHints::debugInfo(const Geo::CElevationPlane &deltaElevation) const
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "interpolationrenderingsetup.h"
|
#include "interpolationrenderingsetup.h"
|
||||||
#include "stringutils.h"
|
#include "stringutils.h"
|
||||||
|
#include <QStringBuilder>
|
||||||
|
|
||||||
using namespace BlackMisc::Aviation;
|
using namespace BlackMisc::Aviation;
|
||||||
using namespace BlackMisc::PhysicalQuantities;
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
@@ -165,17 +166,12 @@ namespace BlackMisc
|
|||||||
QString CInterpolationAndRenderingSetup::convertToQString(bool i18n) const
|
QString CInterpolationAndRenderingSetup::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n);
|
||||||
QString s("Setup: debug sim: ");
|
return
|
||||||
s += boolToYesNo(m_simulatorDebugMessages);
|
QStringLiteral("Debug sim: ") % boolToYesNo(m_simulatorDebugMessages) %
|
||||||
s += " debug interpolator: ";
|
QStringLiteral(" debug interpolator: ") % boolToYesNo(m_interpolatorDebugMessage) %
|
||||||
s += boolToYesNo(m_interpolatorDebugMessage);
|
QStringLiteral(" force full interpolation: ") % boolToYesNo(m_forceFullInterpolation) %
|
||||||
s += " force full interpolation: ";
|
QStringLiteral(" max.aircraft:") % QString::number(m_maxRenderedAircraft) %
|
||||||
s += boolToYesNo(m_forceFullInterpolation);
|
QStringLiteral(" max.distance:") % m_maxRenderedDistance.valueRoundedWithUnit(CLengthUnit::NM(), 2);
|
||||||
s += " max.aircraft:";
|
|
||||||
s += QString::number(m_maxRenderedAircraft);
|
|
||||||
s += " max.distance:";
|
|
||||||
s += m_maxRenderedDistance.valueRoundedWithUnit(CLengthUnit::NM(), 2);
|
|
||||||
return s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CVariant CInterpolationAndRenderingSetup::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
CVariant CInterpolationAndRenderingSetup::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||||
|
|||||||
Reference in New Issue
Block a user