Engauge Digitizer  2
ExportFileAbstractBase.h
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 #ifndef EXPORT_FILE_ABSTRACT_BASE_H
8 #define EXPORT_FILE_ABSTRACT_BASE_H
9 
10 #include "CurveConnectAs.h"
11 #include "ExportHeader.h"
12 #include <QPointF>
13 #include <QStringList>
14 #include <QVector>
15 #include <vector>
16 
17 class Document;
20 class QTextStream;
21 class SplinePair;
22 class Transformation;
23 
26 {
27 public:
30  virtual ~ExportFileAbstractBase ();
31 
32 protected:
33 
35  QStringList curvesToInclude (const DocumentModelExportFormat &modelExportOverride,
36  const Document &document,
37  const QStringList &curvesGraphsNames,
38  CurveConnectAs curveConnectAs1,
39  CurveConnectAs curveConnectAs2) const;
40 
42  void destroy2DArray (QVector<QVector<QString*> > &array) const;
43 
45  QString gnuplotComment() const;
46 
48  void insertLineSeparator (bool isFirst,
49  ExportHeader exportHeader,
50  QTextStream &str) const;
51 
55  double linearlyInterpolateYRadiusFromTwoPoints (double xThetaValue,
56  const DocumentModelCoords &modelCoords,
57  const QPointF &posGraphBefore,
58  const QPointF &posGraph) const;
59 
63  QString wrapInDoubleQuotesIfNeeded (const DocumentModelExportFormat &modelExportOverride,
64  const QString &valueString) const;
65 };
66 
67 #endif // EXPORT_FILE_ABSTRACT_BASE_H
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
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...
Affine transformation between screen and graph coordinates, based on digitized axis points.
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 ...
QString gnuplotComment() const
Gnuplot comment delimiter.
double linearlyInterpolateYRadiusFromTwoPoints(double xThetaValue, const DocumentModelCoords &modelCoords, const QPointF &posGraphBefore, const QPointF &posGraph) const
Interpolate (if xThetaValue is between posGraphBefore.x() and posGraph.x()) or extrapolate (if xTheta...
void destroy2DArray(QVector< QVector< QString * > > &array) const
Deallocate memory for array.
Model for DlgSettingsCoords and CmdSettingsCoords.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
void insertLineSeparator(bool isFirst, ExportHeader exportHeader, QTextStream &str) const
Insert line(s) between successive sets of curves.
Strategy base class for exporting to a file. This class provides common methods.
ExportFileAbstractBase()
Single constructor.
Single X/Y pair for cubic spline interpolation initialization and calculations.
Definition: SplinePair.h:13