DocumentModelExportFormat::DocumentModelExportFormat(const DocumentModelExportFormat &other) : m_curveNamesNotExported (other.curveNamesNotExported()), m_pointsSelectionFunctions (other.pointsSelectionFunctions()), m_pointsIntervalFunctions (other.pointsIntervalFunctions()), m_pointsIntervalUnitsFunctions (other.pointsIntervalUnitsFunctions()), m_pointsSelectionRelations (other.pointsSelectionRelations()), m_pointsIntervalRelations (other.pointsIntervalRelations()), m_pointsIntervalUnitsRelations (other.pointsIntervalUnitsRelations()), m_layoutFunctions (other.layoutFunctions()), m_delimiter (other.delimiter()), m_header (other.header()), m_xLabel (other.xLabel ()) { }
int ExportFileRelations::maxColumnSizeAllocation (const DocumentModelExportFormat &modelExport, const Document &document, const Transformation &transformation, const QStringList &curvesIncluded) const { LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::maxColumnSizeAllocation"; int maxColumnSize = 0; // The curve processing logic here is mirrored in loadXThetaYRadiusValues so the array allocations are in sync for (int ic = 0; ic < curvesIncluded.count(); ic++) { const QString curveName = curvesIncluded.at (ic); const Curve *curve = document.curveForCurveName (curveName); const Points points = curve->points (); if (modelExport.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) { // No interpolation. Raw points maxColumnSize = qMax (maxColumnSize, points.count()); } else { const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName); // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExport.pointsIntervalRelations(), modelExport.pointsIntervalUnitsRelations(), lineStyle.curveConnectAs(), transformation, points); maxColumnSize = qMax (maxColumnSize, ordinals.count()); } } return maxColumnSize; }
void ExportFileRelations::loadXThetaYRadiusValues (const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const QStringList &curvesIncluded, const Transformation &transformation, QVector<QVector<QString*> > &xThetaYRadiusValues) const { LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValues"; // The curve processing logic here is mirrored in maxColumnSizeAllocation so the array allocations are in sync for (int ic = 0; ic < curvesIncluded.count(); ic++) { int colXTheta = 2 * ic; int colYRadius = 2 * ic + 1; const QString curveName = curvesIncluded.at (ic); const Curve *curve = document.curveForCurveName (curveName); const Points points = curve->points (); if (modelExportOverride.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) { // No interpolation. Raw points loadXThetaYRadiusValuesForCurveRaw (document.modelCoords(), document.modelGeneral(), modelMainWindow, points, xThetaYRadiusValues [colXTheta], xThetaYRadiusValues [colYRadius], transformation); } else { const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName); // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExportOverride.pointsIntervalRelations(), modelExportOverride.pointsIntervalUnitsRelations(), lineStyle.curveConnectAs(), transformation, points); if (curve->curveStyle().lineStyle().curveConnectAs() == CONNECT_AS_RELATION_SMOOTH) { loadXThetaYRadiusValuesForCurveInterpolatedSmooth (document.modelCoords(), document.modelGeneral(), modelMainWindow, points, ordinals, xThetaYRadiusValues [colXTheta], xThetaYRadiusValues [colYRadius], transformation); } else { loadXThetaYRadiusValuesForCurveInterpolatedStraight (document.modelCoords(), document.modelGeneral(), modelMainWindow, points, ordinals, xThetaYRadiusValues [colXTheta], xThetaYRadiusValues [colYRadius], transformation); } } } }