Engauge Digitizer  2
ExportFileRelations.cpp
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "CurveConnectAs.h"
8 #include "Document.h"
9 #include "EngaugeAssert.h"
10 #include "ExportFileRelations.h"
11 #include "ExportLayoutFunctions.h"
12 #include "ExportOrdinalsSmooth.h"
13 #include "ExportOrdinalsStraight.h"
14 #include "FormatCoordsUnits.h"
15 #include "Logger.h"
16 #include <qdebug.h>
17 #include <qmath.h>
18 #include <QTextStream>
19 #include <QVector>
20 #include "Spline.h"
21 #include "SplinePair.h"
22 #include "Transformation.h"
23 #include <vector>
24 
25 using namespace std;
26 
27 const int COLUMNS_PER_CURVE = 2;
28 
30 {
31 }
32 
33 void ExportFileRelations::exportAllPerLineXThetaValuesMerged (const DocumentModelExportFormat &modelExportOverride,
34  const Document &document,
35  const MainWindowModel &modelMainWindow,
36  const QStringList &curvesIncluded,
37  const QString &delimiter,
38  const Transformation &transformation,
39  QTextStream &str) const
40 {
41  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportAllPerLineXThetaValuesMerged";
42 
43  int curveCount = curvesIncluded.count();
44  int maxColumnSize = maxColumnSizeAllocation (modelExportOverride,
45  document,
46  transformation,
47  curvesIncluded);
48 
49  // Skip if every curve was a function
50  if (maxColumnSize > 0) {
51 
52  QVector<QVector<QString*> > xThetaYRadiusValues (COLUMNS_PER_CURVE * curveCount, QVector<QString*> (maxColumnSize));
53  initializeXThetaYRadiusValues (curvesIncluded,
54  xThetaYRadiusValues);
55  loadXThetaYRadiusValues (modelExportOverride,
56  document,
57  modelMainWindow,
58  curvesIncluded,
59  transformation,
60  xThetaYRadiusValues);
61  outputXThetaYRadiusValues (modelExportOverride,
62  curvesIncluded,
63  xThetaYRadiusValues,
64  delimiter,
65  str);
66  destroy2DArray (xThetaYRadiusValues);
67  }
68 }
69 
70 void ExportFileRelations::exportOnePerLineXThetaValuesMerged (const DocumentModelExportFormat &modelExportOverride,
71  const Document &document,
72  const MainWindowModel &modelMainWindow,
73  const QStringList &curvesIncluded,
74  const QString &delimiter,
75  const Transformation &transformation,
76  QTextStream &str) const
77 {
78  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportOnePerLineXThetaValuesMerged";
79 
80  QStringList::const_iterator itr;
81  for (itr = curvesIncluded.begin(); itr != curvesIncluded.end(); itr++) {
82 
83  QString curveIncluded = *itr;
84 
85  exportAllPerLineXThetaValuesMerged (modelExportOverride,
86  document,
87  modelMainWindow,
88  QStringList (curveIncluded),
89  delimiter,
90  transformation,
91  str);
92  }
93 }
94 
96  const Document &document,
97  const MainWindowModel &modelMainWindow,
98  const Transformation &transformation,
99  QTextStream &str) const
100 {
101  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportToFile";
102 
103  // Identify curves to be included
104  QStringList curvesIncluded = curvesToInclude (modelExportOverride,
105  document,
106  document.curvesGraphsNames(),
107  CONNECT_AS_RELATION_SMOOTH,
108  CONNECT_AS_RELATION_STRAIGHT);
109 
110  // Delimiter
111  const QString delimiter = exportDelimiterToText (modelExportOverride.delimiter());
112 
113  // Export in one of two layouts
114  if (modelExportOverride.layoutFunctions() == EXPORT_LAYOUT_ALL_PER_LINE) {
115  exportAllPerLineXThetaValuesMerged (modelExportOverride,
116  document,
117  modelMainWindow,
118  curvesIncluded,
119  delimiter,
120  transformation,
121  str);
122  } else {
123  exportOnePerLineXThetaValuesMerged (modelExportOverride,
124  document,
125  modelMainWindow,
126  curvesIncluded,
127  delimiter,
128  transformation,
129  str);
130  }
131 }
132 
133 void ExportFileRelations::initializeXThetaYRadiusValues (const QStringList &curvesIncluded,
134  QVector<QVector<QString*> > &xThetaYRadiusValues) const
135 {
136  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::initializeXThetaYRadiusValues";
137 
138  // Initialize every entry with empty string
139  int curveCount = curvesIncluded.count();
140  int xThetaCount = xThetaYRadiusValues [0].count();
141  for (int row = 0; row < xThetaCount; row++) {
142  for (int col = 0; col < COLUMNS_PER_CURVE * curveCount; col++) {
143  xThetaYRadiusValues [col] [row] = new QString;
144  }
145  }
146 }
147 
148 QPointF ExportFileRelations::linearlyInterpolate (const Points &points,
149  double ordinal,
150  const Transformation &transformation) const
151 {
152  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::linearlyInterpolate";
153 
154  double xTheta = 0, yRadius = 0;
155  double ordinalBefore = 0; // Not set until ip=1
156  QPointF posGraphBefore; // Not set until ip=1
157  bool foundIt = false;
158  for (int ip = 0; ip < points.count(); ip++) {
159 
160  const Point &point = points.at (ip);
161  QPointF posGraph;
162  transformation.transformScreenToRawGraph (point.posScreen(),
163  posGraph);
164 
165  if (ordinal <= point.ordinal()) {
166 
167  foundIt = true;
168  if (ip == 0) {
169 
170  // Use first point
171  xTheta = posGraph.x();
172  yRadius = posGraph.y();
173 
174  } else {
175 
176  // Between posGraphBefore and posGraph. Note that if posGraph.x()=posGraphBefore.x() then
177  // previous iteration of loop would have been used for interpolation, and then the loop was exited
178  double s = (ordinal - ordinalBefore) / (point.ordinal() - ordinalBefore);
179  xTheta = (1.0 - s) * posGraphBefore.x() + s * posGraph.x();
180  yRadius = (1.0 - s) * posGraphBefore.y() + s * posGraph.y();
181  }
182 
183  break;
184  }
185 
186  ordinalBefore = point.ordinal();
187  posGraphBefore = posGraph;
188  }
189 
190  if (!foundIt) {
191 
192  // Use last point
193  xTheta = posGraphBefore.x();
194  yRadius = posGraphBefore.y();
195 
196  }
197 
198  return QPointF (xTheta,
199  yRadius);
200 }
201 
202 void ExportFileRelations::loadXThetaYRadiusValues (const DocumentModelExportFormat &modelExportOverride,
203  const Document &document,
204  const MainWindowModel &modelMainWindow,
205  const QStringList &curvesIncluded,
206  const Transformation &transformation,
207  QVector<QVector<QString*> > &xThetaYRadiusValues) const
208 {
209  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValues";
210 
211  // The curve processing logic here is mirrored in maxColumnSizeAllocation so the array allocations are in sync
212  for (int ic = 0; ic < curvesIncluded.count(); ic++) {
213 
214  int colXTheta = 2 * ic;
215  int colYRadius = 2 * ic + 1;
216 
217  const QString curveName = curvesIncluded.at (ic);
218 
219  const Curve *curve = document.curveForCurveName (curveName);
220  const Points points = curve->points ();
221 
222  if (modelExportOverride.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) {
223 
224  // No interpolation. Raw points
225  loadXThetaYRadiusValuesForCurveRaw (document.modelCoords(),
226  modelMainWindow,
227  points,
228  xThetaYRadiusValues [colXTheta],
229  xThetaYRadiusValues [colYRadius],
230  transformation);
231  } else {
232 
233  const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName);
234 
235  // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations
236  ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExportOverride.pointsIntervalRelations(),
237  modelExportOverride.pointsIntervalUnitsRelations(),
238  lineStyle.curveConnectAs(),
239  transformation,
240  points);
241 
242  if (curve->curveStyle().lineStyle().curveConnectAs() == CONNECT_AS_RELATION_SMOOTH) {
243 
244  loadXThetaYRadiusValuesForCurveInterpolatedSmooth (document.modelCoords(),
245  modelMainWindow,
246  points,
247  ordinals,
248  xThetaYRadiusValues [colXTheta],
249  xThetaYRadiusValues [colYRadius],
250  transformation);
251 
252  } else {
253 
254  loadXThetaYRadiusValuesForCurveInterpolatedStraight (document.modelCoords(),
255  modelMainWindow,
256  points,
257  ordinals,
258  xThetaYRadiusValues [colXTheta],
259  xThetaYRadiusValues [colYRadius],
260  transformation);
261  }
262  }
263  }
264 }
265 
266 void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth (const DocumentModelCoords &modelCoords,
267  const MainWindowModel &modelMainWindow,
268  const Points &points,
269  const ExportValuesOrdinal &ordinals,
270  QVector<QString*> &xThetaValues,
271  QVector<QString*> &yRadiusValues,
272  const Transformation &transformation) const
273 {
274  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth";
275 
276  vector<double> t;
277  vector<SplinePair> xy;
278  ExportOrdinalsSmooth ordinalsSmooth;
279 
280  ordinalsSmooth.loadSplinePairsWithTransformation (points,
281  transformation,
282  t,
283  xy);
284 
285  // Fit a spline
286  Spline spline (t,
287  xy);
288 
289  FormatCoordsUnits format;
290 
291  // Extract the points
292  for (int row = 0; row < ordinals.count(); row++) {
293 
294  double ordinal = ordinals.at (row);
295  SplinePair splinePairFound = spline.interpolateCoeff(ordinal);
296  double xTheta = splinePairFound.x ();
297  double yRadius = splinePairFound.y ();
298 
299  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
300  format.unformattedToFormatted (xTheta,
301  yRadius,
302  modelCoords,
303  modelMainWindow,
304  *(xThetaValues [row]),
305  *(yRadiusValues [row]),
306  transformation);
307  }
308 }
309 
310 void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight (const DocumentModelCoords &modelCoords,
311  const MainWindowModel &modelMainWindow,
312  const Points &points,
313  const ExportValuesOrdinal &ordinals,
314  QVector<QString*> &xThetaValues,
315  QVector<QString*> &yRadiusValues,
316  const Transformation &transformation) const
317 {
318  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight";
319 
320  FormatCoordsUnits format;
321 
322  // Get value at desired points
323  for (int row = 0; row < ordinals.count(); row++) {
324 
325  double ordinal = ordinals.at (row);
326 
327  QPointF pointInterpolated = linearlyInterpolate (points,
328  ordinal,
329  transformation);
330 
331  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
332  format.unformattedToFormatted (pointInterpolated.x(),
333  pointInterpolated.y(),
334  modelCoords,
335  modelMainWindow,
336  *(xThetaValues [row]),
337  *(yRadiusValues [row]),
338  transformation);
339  }
340 }
341 
342 void ExportFileRelations::loadXThetaYRadiusValuesForCurveRaw (const DocumentModelCoords &modelCoords,
343  const MainWindowModel &modelMainWindow,
344  const Points &points,
345  QVector<QString*> &xThetaValues,
346  QVector<QString*> &yRadiusValues,
347  const Transformation &transformation) const
348 {
349  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveRaw";
350 
351  FormatCoordsUnits format;
352 
353  for (int pt = 0; pt < points.count(); pt++) {
354 
355  const Point &point = points.at (pt);
356 
357  QPointF posGraph;
358  transformation.transformScreenToRawGraph (point.posScreen(),
359  posGraph);
360 
361  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
362  format.unformattedToFormatted (posGraph.x(),
363  posGraph.y(),
364  modelCoords,
365  modelMainWindow,
366  *(xThetaValues [pt]),
367  *(yRadiusValues [pt]),
368  transformation);
369  }
370 }
371 
372 int ExportFileRelations::maxColumnSizeAllocation (const DocumentModelExportFormat &modelExport,
373  const Document &document,
374  const Transformation &transformation,
375  const QStringList &curvesIncluded) const
376 {
377  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::maxColumnSizeAllocation";
378 
379  int maxColumnSize = 0;
380 
381  // The curve processing logic here is mirrored in loadXThetaYRadiusValues so the array allocations are in sync
382  for (int ic = 0; ic < curvesIncluded.count(); ic++) {
383 
384  const QString curveName = curvesIncluded.at (ic);
385 
386  const Curve *curve = document.curveForCurveName (curveName);
387  const Points points = curve->points ();
388 
389  if (modelExport.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) {
390 
391  // No interpolation. Raw points
392  maxColumnSize = qMax (maxColumnSize,
393  points.count());
394 
395  } else {
396 
397  const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName);
398 
399  // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations
400  ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExport.pointsIntervalRelations(),
401  modelExport.pointsIntervalUnitsRelations(),
402  lineStyle.curveConnectAs(),
403  transformation,
404  points);
405 
406  maxColumnSize = qMax (maxColumnSize,
407  ordinals.count());
408  }
409  }
410 
411  return maxColumnSize;
412 }
413 
414 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervals (double pointsIntervalRelations,
415  ExportPointsIntervalUnits pointsIntervalUnits,
416  CurveConnectAs curveConnectAs,
417  const Transformation &transformation,
418  const Points &points) const
419 {
420  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervals";
421 
422  if (pointsIntervalUnits == EXPORT_POINTS_INTERVAL_UNITS_GRAPH) {
423  if (curveConnectAs == CONNECT_AS_RELATION_SMOOTH) {
424 
425  return ordinalsAtIntervalsSmoothGraph (pointsIntervalRelations,
426  transformation,
427  points);
428 
429  } else {
430 
431  return ordinalsAtIntervalsStraightGraph (pointsIntervalRelations,
432  transformation,
433  points);
434 
435  }
436  } else {
437 
438  if (curveConnectAs == CONNECT_AS_RELATION_SMOOTH) {
439 
440  return ordinalsAtIntervalsSmoothScreen (pointsIntervalRelations,
441  points);
442 
443  } else {
444 
445  return ordinalsAtIntervalsStraightScreen (pointsIntervalRelations,
446  points);
447 
448  }
449  }
450 }
451 
452 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothGraph (double pointsIntervalRelations,
453  const Transformation &transformation,
454  const Points &points) const
455 {
456  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsSmoothGraph";
457 
458  ExportValuesOrdinal ordinals;
459 
460  // Prevent infinite loop when there are no points or will be too many points
461  if ((pointsIntervalRelations > 0) &&
462  (points.count() > 0)) {
463 
464  vector<double> t;
465  vector<SplinePair> xy;
466  ExportOrdinalsSmooth ordinalsSmooth;
467 
468  ordinalsSmooth.loadSplinePairsWithTransformation (points,
469  transformation,
470  t,
471  xy);
472 
473  ordinals = ordinalsSmooth.ordinalsAtIntervalsGraph (t,
474  xy,
475  pointsIntervalRelations);
476  }
477 
478  return ordinals;
479 }
480 
481 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothScreen (double pointsIntervalRelations,
482  const Points &points) const
483 {
484  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsSmoothScreen"
485  << " pointCount=" << points.count();
486 
487  // Results
488  ExportValuesOrdinal ordinals;
489 
490  // Prevent infinite loop when there are no points or will be too many points
491  if ((pointsIntervalRelations > 0) &&
492  (points.count() > 0)) {
493 
494  vector<double> t;
495  vector<SplinePair> xy;
496  ExportOrdinalsSmooth ordinalsSmooth;
497 
498  ordinalsSmooth.loadSplinePairsWithoutTransformation (points,
499  t,
500  xy);
501 
502  ordinals = ordinalsSmooth.ordinalsAtIntervalsGraph (t,
503  xy,
504  pointsIntervalRelations);
505  }
506 
507  return ordinals;
508 }
509 
510 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightGraph (double pointsIntervalRelations,
511  const Transformation &transformation,
512  const Points &points) const
513 {
514  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsStraightGraph";
515 
516  ExportValuesOrdinal ordinals;
517 
518  // Prevent infinite loop when there are no points or will be too many points
519  if ((pointsIntervalRelations > 0) &&
520  (points.count() > 0)) {
521 
522  ExportOrdinalsStraight ordinalsStraight;
523 
524  ordinals = ordinalsStraight.ordinalsAtIntervalsGraphWithTransformation (points,
525  transformation,
526  pointsIntervalRelations);
527  }
528 
529  return ordinals;
530 }
531 
532 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightScreen (double pointsIntervalRelations,
533  const Points &points) const
534 {
535  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsStraightScreen"
536  << " pointCount=" << points.count();
537 
538  // Results
539  ExportValuesOrdinal ordinals;
540 
541  // Prevent infinite loop when there are no points or will be too many points
542  if ((pointsIntervalRelations > 0) &&
543  (points.count() > 0)) {
544 
545  ExportOrdinalsStraight ordinalsStraight;
546 
547  ordinals = ordinalsStraight.ordinalsAtIntervalsGraphWithoutTransformation (points,
548  pointsIntervalRelations);
549  }
550 
551  return ordinals;
552 }
553 
554 void ExportFileRelations::outputXThetaYRadiusValues (const DocumentModelExportFormat &modelExportOverride,
555  const QStringList &curvesIncluded,
556  QVector<QVector<QString*> > &xThetaYRadiusValues,
557  const QString &delimiter,
558  QTextStream &str) const
559 {
560  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::outputXThetaYRadiusValues";
561 
562  // Header
563  if (modelExportOverride.header() != EXPORT_HEADER_NONE) {
564  if (modelExportOverride.header() == EXPORT_HEADER_GNUPLOT) {
565  str << curveSeparator(str.string());
566  str << gnuplotComment();
567  }
568  QString delimiterForRow;
569  QStringList::const_iterator itr;
570  for (itr = curvesIncluded.begin(); itr != curvesIncluded.end(); itr++) {
571  QString curveName = *itr;
572  str << delimiterForRow << modelExportOverride.xLabel();
573  delimiterForRow = delimiter;
574  str << delimiterForRow << curveName;
575  }
576  str << "\n";
577  }
578 
579  for (int row = 0; row < xThetaYRadiusValues [0].count(); row++) {
580 
581  QString delimiterForRow;
582  for (int col = 0; col < xThetaYRadiusValues.count(); col++) {
583 
584  str << delimiterForRow << *(xThetaYRadiusValues [col] [row]);
585  delimiterForRow = delimiter;
586  }
587 
588  str << "\n";
589  }
590 }
void transformScreenToRawGraph(const QPointF &coordScreen, QPointF &coordGraph) const
Transform from cartesian pixel screen coordinates to cartesian/polar graph coordinates.
SplinePair interpolateCoeff(double t) const
Return interpolated y for specified x.
Definition: Spline.cpp:127
ExportLayoutFunctions layoutFunctions() const
Get method for functions layout.
Cubic interpolation given independent and dependent value vectors.
Definition: Spline.h:21
ExportPointsIntervalUnits pointsIntervalUnitsRelations() const
Get method for points interval units for relations.
const Points points() const
Return a shallow copy of the Points.
Definition: Curve.cpp:393
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
Export Document points according to the settings.
LineStyle lineStyle() const
Get method for LineStyle.
Definition: CurveStyle.cpp:26
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
Definition: Document.cpp:611
double y() const
Get method for y.
Definition: SplinePair.cpp:71
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
QPointF posScreen() const
Accessor for screen position.
Definition: Point.cpp:392
ExportHeader header() const
Get method for header.
const LineStyle lineStyle(const QString &curveName) const
Get method for copying one line style in one step.
Definition: CurveStyles.cpp:97
void unformattedToFormatted(double xThetaUnformatted, double yRadiusUnformatted, const DocumentModelCoords &modelCoords, const MainWindowModel &mainWindowModel, QString &xThetaFormatted, QString &yRadiusFormatted, const Transformation &transformation) const
Convert unformatted numeric value to formatted string. Transformation is used to determine best resol...
Affine transformation between screen and graph coordinates, based on digitized axis points...
ExportValuesOrdinal ordinalsAtIntervalsGraphWithoutTransformation(const Points &points, double pointsInterval) const
Compute ordinals, without any conversion to graph coordinates.
QString xLabel() const
Get method for x label.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Definition: Document.cpp:618
void loadSplinePairsWithTransformation(const Points &points, const Transformation &transformation, std::vector< double > &t, std::vector< SplinePair > &xy) const
Load t (=ordinal) and xy (=screen position) spline pairs, converting screen coordinates to graph coor...
Model for DlgSettingsMainWindow.
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 fitted spline...
ExportDelimiter delimiter() const
Get method for delimiter.
Model for DlgSettingsCoords and CmdSettingsCoords.
double pointsIntervalRelations() const
Get method for relations interval for relations.
Storage of one imported image and the data attached to that image.
Definition: Document.h:40
Container for one set of digitized Points.
Definition: Curve.h:32
ExportValuesOrdinal ordinalsAtIntervalsGraph(const std::vector< double > &t, const std::vector< SplinePair > &xy, double pointsInterval) const
Perform the interpolation on the arrays loaded by the other methods.
Details for a specific Line.
Definition: LineStyle.h:19
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
Definition: Document.cpp:312
Highest-level wrapper around other Formats classes.
Utility class to interpolate points spaced evenly along a piecewise defined curve with line segments ...
double x() const
Get method for x.
Definition: SplinePair.cpp:66
const Curve * curveForCurveName(const QString &curveName) const
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
Definition: Document.cpp:298
CurveStyle curveStyle() const
Return the curve style.
Definition: Curve.cpp:139
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Definition: Point.cpp:374
ExportFileRelations()
Single constructor.
CurveConnectAs curveConnectAs() const
Get method for connect type.
Definition: LineStyle.cpp:63
ExportValuesOrdinal ordinalsAtIntervalsGraphWithTransformation(const Points &points, const Transformation &transformation, double pointsInterval) const
Compute ordinals, converting screen coordinates to graph coordinates.
Single X/Y pair for cubic spline interpolation initialization and calculations.
Definition: SplinePair.h:11
ExportPointsSelectionRelations pointsSelectionRelations() const
Get method for point selection for relations.