Engauge Digitizer  2
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  ExportHeader header() const;
46 
48  ExportLayoutFunctions layoutFunctions() const;
49 
50  virtual void loadXml(QXmlStreamReader &reader);
51 
53  bool overrideCsvTsv () const;
54 
56  double pointsIntervalFunctions () const;
57 
59  double pointsIntervalRelations () const;
60 
62  ExportPointsIntervalUnits pointsIntervalUnitsFunctions () const;
63 
65  ExportPointsIntervalUnits pointsIntervalUnitsRelations () const;
66 
68  ExportPointsSelectionFunctions pointsSelectionFunctions() const;
69 
71  ExportPointsSelectionRelations pointsSelectionRelations() const;
72 
74  void printStream (QString indentation,
75  QTextStream &str) const;
76 
77  virtual void saveXml(QXmlStreamWriter &writer) const;
78 
80  void setCurveNamesNotExported(const QStringList &curveNamesNotExported);
81 
83  void setDelimiter(ExportDelimiter exportDelimiter);
84 
86  void setHeader(ExportHeader exportHeader);
87 
89  void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions);
90 
92  void setOverrideCsvTsv (bool overrideCsvTsv);
93 
95  void setPointsIntervalFunctions (double pointsIntervalFunctions);
96 
98  void setPointsIntervalRelations (double pointsIntervalRelations);
99 
101  void setPointsIntervalUnitsFunctions (ExportPointsIntervalUnits pointsIntervalUnitsFunctions);
102 
104  void setPointsIntervalUnitsRelations (ExportPointsIntervalUnits pointsIntervalUnitsRelations);
105 
107  void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions);
108 
110  void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations);
111 
113  void setXLabel (const QString &xLabel);
114 
116  QString xLabel () const;
117 
118 private:
119 
120  // Curves to be excluded from export. New curves will not appear in this so they will be exported by default.
121  QStringList m_curveNamesNotExported;
122 
123  ExportPointsSelectionFunctions m_pointsSelectionFunctions;
124  double m_pointsIntervalFunctions;
125  ExportPointsIntervalUnits m_pointsIntervalUnitsFunctions;
126  ExportPointsSelectionRelations m_pointsSelectionRelations;
127  double m_pointsIntervalRelations;
128  ExportPointsIntervalUnits m_pointsIntervalUnitsRelations;
129  ExportLayoutFunctions m_layoutFunctions;
130  ExportDelimiter m_delimiter;
131  bool m_overrideCsvTsv;
132  ExportHeader m_header;
133  QString m_xLabel;
134 };
135 
136 #endif // DOCUMENT_MODEL_EXPORT_FORMAT_H
void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions)
Set method for point selection for functions.
bool overrideCsvTsv() const
Get method for csv/tsv format override.
QStringList curveNamesNotExported() const
Get method for curve names not exported.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
DocumentModelExportFormat()
Default constructor.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations)
Set method for point selection for relations.
void setCurveNamesNotExported(const QStringList &curveNamesNotExported)
Set method for curve names not exported.
ExportPointsSelectionRelations pointsSelectionRelations() const
Get method for point selection for relations.
double pointsIntervalFunctions() const
Get method for points interval for functions.
void setDelimiter(ExportDelimiter exportDelimiter)
Set method for delimiter.
void setPointsIntervalFunctions(double pointsIntervalFunctions)
Set method for points interval for functions.
void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions)
Set method for functions layout.
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.
ExportPointsIntervalUnits pointsIntervalUnitsRelations() const
Get method for points interval units for relations.
ExportDelimiter delimiter() const
Get method for delimiter.
void setPointsIntervalRelations(double pointsIntervalRelations)
Set method for relations interval for relations.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
ExportPointsIntervalUnits pointsIntervalUnitsFunctions() const
Get method for points interval units for functions.
ExportHeader header() const
Get method for header.
double pointsIntervalRelations() const
Get method for relations interval for relations.
ExportLayoutFunctions layoutFunctions() const
Get method for functions layout.
QString xLabel() const
Get method for x label.
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.
ExportPointsSelectionFunctions pointsSelectionFunctions() const
Get method for point selection for functions.
void setXLabel(const QString &xLabel)
Set method for x label.