47 int maxColumnSize = maxColumnSizeAllocation (modelExportOverride,
59 exportAllPerLineXThetaValuesMergedMultiplePass (
maxColumnSize,
88void ExportFileRelations::exportAllPerLineXThetaValuesMergedMultiplePass (
int maxColumnSize,
112 initializeXThetaYRadiusValues (curvesIncluded,
117 for (
int c = 0; c < curvesIncluded.count (); c++) {
128 loadXThetaYRadiusValues (modelExportOverride,
149 outputXThetaYRadiusValues (modelExportOverride,
158void ExportFileRelations::exportAllPerLineXThetaValuesMergedOnePass (
int maxColumnSize,
173 initializeXThetaYRadiusValues (curvesIncluded,
175 loadXThetaYRadiusValues (modelExportOverride,
183 outputXThetaYRadiusValues (modelExportOverride,
205 QStringList::const_iterator
itr;
206 for (
itr = curvesIncluded.begin();
itr != curvesIncluded.end();
itr++) {
210 exportAllPerLineXThetaValuesMerged (modelExportOverride,
249 exportAllPerLineXThetaValuesMerged (modelExportOverride,
260 exportOnePerLineXThetaValuesMerged (modelExportOverride,
273void ExportFileRelations::initializeXThetaYRadiusValues (
const QStringList &curvesIncluded,
288QPointF ExportFileRelations::linearlyInterpolate (
const Points &points,
298 for (
int ip = 0;
ip < points.count();
ip++) {
300 const Point &point = points.at (
ip);
305 if (ordinal <= point.
ordinal()) {
354 for (
int ic = 0;
ic < curvesIncluded.count();
ic++) {
359 const QString curveName = curvesIncluded.at (
ic);
367 loadXThetaYRadiusValuesForCurveRaw (document.
modelCoords(),
389 loadXThetaYRadiusValuesForCurveInterpolatedSmooth (document.
modelCoords(),
402 loadXThetaYRadiusValuesForCurveInterpolatedStraight (document.
modelCoords(),
415void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth (
const DocumentModelCoords &modelCoords,
426 LOG4CPP_INFO_S ((*
mainCat)) <<
"ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth";
462 *(xThetaValues [
row]),
469void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight (
const DocumentModelCoords &modelCoords,
478 LOG4CPP_INFO_S ((*
mainCat)) <<
"ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight";
497 *(xThetaValues [
row]),
503void ExportFileRelations::loadXThetaYRadiusValuesForCurveRaw (
const DocumentModelCoords &modelCoords,
515 for (
int pt = 0;
pt < points.count();
pt++) {
517 const Point &point = points.at (
pt);
529 *(xThetaValues [
pt]),
547 for (
int ic = 0;
ic < curvesIncluded.count();
ic++) {
549 const QString curveName = curvesIncluded.at (
ic);
582ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervals (
double pointsIntervalRelations,
588 const Points &points)
const
595 return ordinalsAtIntervalsSmoothGraph (pointsIntervalRelations,
603 return ordinalsAtIntervalsStraightGraph (pointsIntervalRelations,
612 return ordinalsAtIntervalsSmoothScreen (pointsIntervalRelations,
617 return ordinalsAtIntervalsStraightScreen (pointsIntervalRelations,
624ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothGraph (
double pointsIntervalRelations,
628 const Points &points)
const
635 if ((pointsIntervalRelations > 0) &&
636 (points.count() > 0)) {
651 pointsIntervalRelations);
657ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothScreen (
double pointsIntervalRelations,
658 const Points &points)
const
661 <<
" pointCount=" << points.count();
667 if ((pointsIntervalRelations > 0) &&
668 (points.count() > 0)) {
680 pointsIntervalRelations);
686ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightGraph (
double pointsIntervalRelations,
688 const Points &points)
const
695 if ((pointsIntervalRelations > 0) &&
696 (points.count() > 0)) {
702 pointsIntervalRelations);
708ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightScreen (
double pointsIntervalRelations,
709 const Points &points)
const
712 <<
" pointCount=" << points.count();
718 if ((pointsIntervalRelations > 0) &&
719 (points.count() > 0)) {
724 pointsIntervalRelations);
742 modelExportOverride.
header (),
748 QStringList::const_iterator
itr;
749 for (
itr = curvesIncluded.begin();
itr != curvesIncluded.end();
itr++) {
@ CONNECT_AS_RELATION_STRAIGHT
@ CONNECT_AS_RELATION_SMOOTH
const int INNER_RADIUS_MIN
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
QString exportDelimiterToText(ExportDelimiter exportDelimiter, bool isGnuplotDelimiter)
const int COLUMNS_PER_CURVE
@ EXPORT_LAYOUT_ALL_PER_LINE
ExportPointsIntervalUnits
@ EXPORT_POINTS_INTERVAL_UNITS_GRAPH
@ EXPORT_POINTS_SELECTION_RELATIONS_INTERPOLATE
@ EXPORT_POINTS_SELECTION_RELATIONS_RAW
QList< double > ExportValuesOrdinal
log4cpp::Category * mainCat
const LineStyle lineStyle(const QString &curveName) const
Get method for copying one line style in one step.
Container for one set of digitized Points.
const Points points() const
Return a shallow copy of the Points.
Model for DlgSettingsCoords and CmdSettingsCoords.
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Storage of one imported image and the data attached to that image.
DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
const Curve * curveForCurveName(const QString &curveName) const
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
void destroy2DArray(QVector< QVector< QString * > > &array) const
Deallocate memory for array.
QString wrapInDoubleQuotesIfNeeded(const DocumentModelExportFormat &modelExportOverride, const QString &valueString) const
RFC 4180 says if values are delimited by a comma AND a value has commas in it (for locale like Englis...
QString gnuplotComment() const
Gnuplot comment delimiter.
QStringList curvesToInclude(const DocumentModelExportFormat &modelExportOverride, const Document &document, const QStringList &curvesGraphsNames, CurveConnectAs curveConnectAs1, CurveConnectAs curveConnectAs2) const
Identify curves to include in export. The specified DocumentModelExportFormat overrides same data in ...
void insertLineSeparator(bool isFirst, ExportHeader exportHeader, QTextStream &str) const
Insert line(s) between successive sets of curves.
ExportFileRelations()
Single constructor.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str, unsigned int &numWritesSoFar) const
Export Document points according to the settings.
Utility class to interpolate points spaced evenly along a piecewise defined curve with fitted spline.
void loadSplinePairsWithTransformation(const Points &points, const Transformation &transformation, bool isLogXTheta, bool isLogYRadius, std::vector< double > &t, std::vector< SplinePair > &xy) const
Load t (=ordinal) and xy (=screen position) spline pairs, converting screen coordinates to graph coor...
void loadSplinePairsWithoutTransformation(const Points &points, std::vector< double > &t, std::vector< SplinePair > &xy) const
Load t (=ordinal) and xy (=screen position) spline pairs, without any conversion to graph coordinates...
Utility class to interpolate points spaced evenly along a piecewise defined curve with line segments ...
ExportValuesOrdinal ordinalsAtIntervalsGraphWithoutTransformation(const Points &points, double pointsInterval) const
Compute ordinals, without any conversion to graph coordinates.
ExportValuesOrdinal ordinalsAtIntervalsGraphWithTransformation(const Points &points, const Transformation &transformation, double pointsInterval) const
Compute ordinals, converting screen coordinates to graph coordinates.
Details for a specific Line.
CurveConnectAs curveConnectAs() const
Get method for connect type.
Model for DlgSettingsMainWindow.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF posScreen() const
Accessor for screen position.
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Single X/Y pair for cubic spline interpolation initialization and calculations.
double x() const
Get method for x.
Cubic interpolation given independent and dependent value vectors.
#define LOG4CPP_INFO_S(logger)