Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
DocumentModelExportFormat.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 DOCUMENT_MODEL_EXPORT_FORMAT_H
8 #define DOCUMENT_MODEL_EXPORT_FORMAT_H
9 
10 #include "DocumentModelAbstractBase.h"
11 #include "ExportDelimiter.h"
12 #include "ExportHeader.h"
13 #include "ExportLayoutFunctions.h"
14 #include "ExportPointsIntervalUnits.h"
15 #include "ExportPointsSelectionFunctions.h"
16 #include "ExportPointsSelectionRelations.h"
17 #include <QStringList>
18 
19 class Document;
20 class QTextStream;
21 
24 {
25 public:
28 
30  DocumentModelExportFormat(const Document &document);
31 
34 
37 
39  QStringList curveNamesNotExported() const;
40 
42  ExportDelimiter delimiter() const;
43 
45  bool extrapolateOutsideEndpoints() const;
46 
48  ExportHeader header() const;
49 
51  ExportLayoutFunctions layoutFunctions() const;
52 
53  virtual void loadXml(QXmlStreamReader &reader);
54 
56  bool overrideCsvTsv () const;
57 
59  double pointsIntervalFunctions () const;
60 
62  double pointsIntervalRelations () const;
63 
65  ExportPointsIntervalUnits pointsIntervalUnitsFunctions () const;
66 
68  ExportPointsIntervalUnits pointsIntervalUnitsRelations () const;
69 
71  ExportPointsSelectionFunctions pointsSelectionFunctions() const;
72 
74  ExportPointsSelectionRelations pointsSelectionRelations() const;
75 
77  void printStream (QString indentation,
78  QTextStream &str) const;
79 
80  virtual void saveXml(QXmlStreamWriter &writer) const;
81 
83  void setCurveNamesNotExported(const QStringList &curveNamesNotExported);
84 
86  void setDelimiter(ExportDelimiter exportDelimiter);
87 
89  void setExtrapolateOutsideEndpoints (bool extrapolateOutsideEndpoints);
90 
92  void setHeader(ExportHeader exportHeader);
93 
95  void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions);
96 
98  void setOverrideCsvTsv (bool overrideCsvTsv);
99 
101  void setPointsIntervalFunctions (double pointsIntervalFunctions);
102 
104  void setPointsIntervalRelations (double pointsIntervalRelations);
105 
107  void setPointsIntervalUnitsFunctions (ExportPointsIntervalUnits pointsIntervalUnitsFunctions);
108 
110  void setPointsIntervalUnitsRelations (ExportPointsIntervalUnits pointsIntervalUnitsRelations);
111 
113  void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions);
114 
116  void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations);
117 
119  void setXLabel (const QString &xLabel);
120 
122  QString xLabel () const;
123 
124 private:
125 
126  // Curves to be excluded from export. New curves will not appear in this so they will be exported by default.
127  QStringList m_curveNamesNotExported;
128 
129  ExportPointsSelectionFunctions m_pointsSelectionFunctions;
130  double m_pointsIntervalFunctions;
131  ExportPointsIntervalUnits m_pointsIntervalUnitsFunctions;
132  ExportPointsSelectionRelations m_pointsSelectionRelations;
133  double m_pointsIntervalRelations;
134  ExportPointsIntervalUnits m_pointsIntervalUnitsRelations;
135  ExportLayoutFunctions m_layoutFunctions;
136  ExportDelimiter m_delimiter;
137  bool m_extrapolateOutsideEndpoints;
138  bool m_overrideCsvTsv;
139  ExportHeader m_header;
140  QString m_xLabel;
141 };
142 
143 #endif // DOCUMENT_MODEL_EXPORT_FORMAT_H
void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions)
Set method for point selection for functions.
ExportPointsSelectionFunctions pointsSelectionFunctions() const
Get method for point selection for functions.
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
ExportLayoutFunctions layoutFunctions() const
Get method for functions layout.
DocumentModelExportFormat()
Default constructor.
ExportPointsIntervalUnits pointsIntervalUnitsRelations() const
Get method for points interval units for relations.
ExportPointsIntervalUnits pointsIntervalUnitsFunctions() const
Get method for points interval units for functions.
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations)
Set method for point selection for relations.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setCurveNamesNotExported(const QStringList &curveNamesNotExported)
Set method for curve names not exported.
void setExtrapolateOutsideEndpoints(bool extrapolateOutsideEndpoints)
Set methods for extrapolation.
bool extrapolateOutsideEndpoints() const
Get methods for extrapolation.
void setDelimiter(ExportDelimiter exportDelimiter)
Set method for delimiter.
void setPointsIntervalFunctions(double pointsIntervalFunctions)
Set method for points interval for functions.
double pointsIntervalFunctions() const
Get method for points interval for functions.
ExportHeader header() const
Get method for header.
void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions)
Set method for functions layout.
QString xLabel() const
Get method for x label.
void setPointsIntervalUnitsFunctions(ExportPointsIntervalUnits pointsIntervalUnitsFunctions)
Set method for points interval units for functions.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
DocumentModelExportFormat & operator=(const DocumentModelExportFormat &other)
Assignment constructor.
ExportDelimiter delimiter() const
Get method for delimiter.
QStringList curveNamesNotExported() const
Get method for curve names not exported.
void setPointsIntervalRelations(double pointsIntervalRelations)
Set method for relations interval for relations.
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:41
void setPointsIntervalUnitsRelations(ExportPointsIntervalUnits pointsIntervalUnitsRelations)
Set method for points interval units for relations.
void setHeader(ExportHeader exportHeader)
Set method for header.
void setOverrideCsvTsv(bool overrideCsvTsv)
Set method for csv/tsv format override.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
ExportPointsSelectionRelations pointsSelectionRelations() const
Get method for point selection for relations.
bool overrideCsvTsv() const
Get method for csv/tsv format override.
void setXLabel(const QString &xLabel)
Set method for x label.