18 double valueUnformattedOther,
25 const double PIXEL_SHIFT = 1;
26 const int DEFAULT_PRECISION = 5;
34 posGraph = QPointF (valueUnformatted,
35 valueUnformattedOther);
39 posGraph = QPointF (valueUnformattedOther,
44 QPointF posScreen, posScreenShifted, posGraphShifted;
49 posScreenShifted = posScreen + QPointF (PIXEL_SHIFT, PIXEL_SHIFT);
54 double xResolutionPerPixel = (posGraphShifted.x() - posGraph.x()) / PIXEL_SHIFT;
55 double yResolutionPerPixel = (posGraphShifted.y() - posGraph.y()) / PIXEL_SHIFT;
56 double resolutionPerPixel = (isXTheta ? xResolutionPerPixel : yResolutionPerPixel);
59 int powerValue = qFloor (qLn (qAbs (valueUnformatted)) / qLn (10.0));
60 int powerResolution = qFloor (qLn (qAbs (resolutionPerPixel)) / qLn (10.0));
62 int numberDigitsForResolution = powerValue - powerResolution + 1 + modelGeneral.
extraPrecision();
64 return numberDigitsForResolution + 1;
68 return DEFAULT_PRECISION;
Model for DlgSettingsGeneral and CmdSettingsGeneral.
int extraPrecision() const
Get method for extra digits of precsion.