#include "opticaldesign.h" // qt #include OpticalDesign::OpticalDesign(QObject* parent) : goodies::G_Object{parent} { const auto emitActualZBaseTextChanged = [this]() { emit actualZBaseTextChanged(actualZBaseText()); }; connect( this, qOverload<>(&OpticalDesign::actualZBaseMmChanged), this, emitActualZBaseTextChanged ); connect( this, qOverload<>(&OpticalDesign::scannerBodyFrontWallOffsetMmChanged), this, emitActualZBaseTextChanged ); connect( this, qOverload<>(&OpticalDesign::scannerBodyWallThicknessMmChanged), this, emitActualZBaseTextChanged ); } void OpticalDesign::calculate() const { const auto F = get_focalDistanceMm(); const auto w = get_sensorPixelsWidth(); const auto h = get_sensorPixelsHeight(); const auto wMm = get_sensorWidthMm(); const auto hMm = get_sensorHeightMm(); const auto oAngle = get_opticalAxisAngleDegrees(); } /* double OpticalDesign::fullBodyOffset() const { return get_scannerBodyFrontWallOffsetMm() - get_scannerBodyWallThicknessMm(); } */ QString OpticalDesign::actualZBaseText() const { constexpr int decimals{2}; return QStringLiteral("%1 (%2)") .arg(get_actualZBaseMm(), 0, 'f', decimals) .arg( get_actualZBaseMm() + get_scannerBodyFrontWallOffsetMm() - get_scannerBodyWallThicknessMm(), 0, 'f', decimals ); }