Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator 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  ExportHeader header() const;
46 
48  ExportLayoutFunctions layoutFunctions() const;
49 
50  virtual void loadXml(QXmlStreamReader &reader);
51 
53  double pointsIntervalFunctions () const;
54 
56  double pointsIntervalRelations () const;
57 
59  ExportPointsIntervalUnits pointsIntervalUnitsFunctions () const;
60 
62  ExportPointsIntervalUnits pointsIntervalUnitsRelations () const;
63 
65  ExportPointsSelectionFunctions pointsSelectionFunctions() const;
66 
68  ExportPointsSelectionRelations pointsSelectionRelations() const;
69 
71  void printStream (QString indentation,
72  QTextStream &str) const;
73 
74  virtual void saveXml(QXmlStreamWriter &writer) const;
75 
77  void setCurveNamesNotExported(const QStringList &curveNamesNotExported);
78 
80  void setDelimiter(ExportDelimiter exportDelimiter);
81 
83  void setHeader(ExportHeader exportHeader);
84 
86  void setLayoutFunctions(ExportLayoutFunctions exportLayoutFunctions);
87 
89  void setPointsIntervalFunctions (double pointsIntervalFunctions);
90 
92  void setPointsIntervalRelations (double pointsIntervalRelations);
93 
95  void setPointsIntervalUnitsFunctions (ExportPointsIntervalUnits pointsIntervalUnitsFunctions);
96 
98  void setPointsIntervalUnitsRelations (ExportPointsIntervalUnits pointsIntervalUnitsRelations);
99 
101  void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions);
102 
104  void setPointsSelectionRelations(ExportPointsSelectionRelations exportPointsSelectionRelations);
105 
107  void setXLabel (const QString &xLabel);
108 
110  QString xLabel () const;
111 
112 private:
113 
114  // Curves to be excluded from export. New curves will not appear in this so they will be exported by default.
115  QStringList m_curveNamesNotExported;
116 
117  ExportPointsSelectionFunctions m_pointsSelectionFunctions;
118  double m_pointsIntervalFunctions;
119  ExportPointsIntervalUnits m_pointsIntervalUnitsFunctions;
120  ExportPointsSelectionRelations m_pointsSelectionRelations;
121  double m_pointsIntervalRelations;
122  ExportPointsIntervalUnits m_pointsIntervalUnitsRelations;
123  ExportLayoutFunctions m_layoutFunctions;
124  ExportDelimiter m_delimiter;
125  ExportHeader m_header;
126  QString m_xLabel;
127 };
128 
129 #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 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:40
void setPointsIntervalUnitsRelations(ExportPointsIntervalUnits pointsIntervalUnitsRelations)
Set method for points interval units for relations.
void setHeader(ExportHeader exportHeader)
Set method for header.
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.
void setXLabel(const QString &xLabel)
Set method for x label.