Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
DocumentModelExportFormat.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 "CmdMediator.h"
8 #include "DocumentModelExportFormat.h"
9 #include "DocumentSerialize.h"
10 #include "Logger.h"
11 #include <QObject>
12 #include <QSettings>
13 #include <QTextStream>
14 #include <QXmlStreamWriter>
15 #include "Settings.h"
16 #include "Xml.h"
17 
18 const QStringList DEFAULT_CURVE_NAMES_NOT_EXPORTED;
19 const double DEFAULT_POINTS_INTERVAL_FUNCTIONS = 10; // Consistent with DEFAULT_POINTS_INTERVAL_UNITS_FUNCTIONS
20 const double DEFAULT_POINTS_INTERVAL_RELATIONS = 10; // Consistent with DEFAULT_POINTS_INTERVAL_UNITS_RELATIONS
21 const QString DEFAULT_X_LABEL ("x");
22 const ExportPointsIntervalUnits DEFAULT_POINTS_INTERVAL_UNITS_FUNCTIONS = EXPORT_POINTS_INTERVAL_UNITS_SCREEN; // Consistent with DEFAULT_POINTS_INTERVAL_FUNCTIONS
23 const ExportPointsIntervalUnits DEFAULT_POINTS_INTERVAL_UNITS_RELATIONS = EXPORT_POINTS_INTERVAL_UNITS_SCREEN; // Consistent with DEFAULT_POINTS_INTERVAL_RELATIONS
24 const bool DEFAULT_EXPORT_DELIMITER_OVERRIDE = false; // Target beginner users who expect simplest behavior. Issue #169
25 const bool DEFAULT_EXTRAPOLATE = true; // Traditional behavior before version 11
26 
28 {
29  QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
30  settings.beginGroup (SETTINGS_GROUP_EXPORT);
31 
32  m_curveNamesNotExported = settings.value (SETTINGS_EXPORT_CURVE_NAMES_NOT_EXPORTED,
33  QVariant (DEFAULT_CURVE_NAMES_NOT_EXPORTED)).toStringList();
34  m_delimiter = static_cast<ExportDelimiter> (settings.value (SETTINGS_EXPORT_DELIMITER,
35  QVariant (EXPORT_DELIMITER_COMMA)).toInt());
36  m_extrapolateOutsideEndpoints = settings.value (SETTINGS_EXPORT_EXTRAPOLATE_OUTSIDE_ENDPOINTS,
37  QVariant (DEFAULT_EXTRAPOLATE)).toBool();
38  m_overrideCsvTsv = settings.value (SETTINGS_EXPORT_DELIMITER_OVERRIDE_CSV_TSV,
39  QVariant (DEFAULT_EXPORT_DELIMITER_OVERRIDE)).toBool();
40  m_header = static_cast<ExportHeader> (settings.value (SETTINGS_EXPORT_HEADER,
41  QVariant (EXPORT_HEADER_SIMPLE)).toInt());
42  m_layoutFunctions = static_cast<ExportLayoutFunctions> (settings.value (SETTINGS_EXPORT_LAYOUT_FUNCTIONS,
43  QVariant (EXPORT_LAYOUT_ALL_PER_LINE)).toInt());
44  m_pointsIntervalFunctions = settings.value (SETTINGS_EXPORT_POINTS_INTERVAL_FUNCTIONS,
45  QVariant (DEFAULT_POINTS_INTERVAL_FUNCTIONS)).toDouble();
46  m_pointsIntervalRelations = settings.value (SETTINGS_EXPORT_POINTS_INTERVAL_RELATIONS,
47  QVariant (DEFAULT_POINTS_INTERVAL_RELATIONS)).toDouble();
48  m_pointsIntervalUnitsFunctions = static_cast<ExportPointsIntervalUnits> (settings.value (SETTINGS_EXPORT_POINTS_INTERVAL_UNITS_FUNCTIONS,
49  QVariant (DEFAULT_POINTS_INTERVAL_UNITS_FUNCTIONS)).toInt());
50  m_pointsIntervalUnitsRelations = static_cast<ExportPointsIntervalUnits> (settings.value (SETTINGS_EXPORT_POINTS_INTERVAL_UNITS_RELATIONS,
51  QVariant (DEFAULT_POINTS_INTERVAL_UNITS_RELATIONS)).toInt());
52  m_pointsSelectionFunctions = static_cast<ExportPointsSelectionFunctions> (settings.value (SETTINGS_EXPORT_POINTS_SELECTION_FUNCTIONS,
53  QVariant (EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_ALL_CURVES)).toInt());
54  m_pointsSelectionRelations = static_cast<ExportPointsSelectionRelations> (settings.value (SETTINGS_EXPORT_POINTS_SELECTION_RELATIONS,
55  QVariant (EXPORT_POINTS_SELECTION_RELATIONS_INTERPOLATE)).toInt());
56  m_xLabel = settings.value (SETTINGS_EXPORT_X_LABEL,
57  QVariant (DEFAULT_X_LABEL)).toString();
58 }
59 
61  m_curveNamesNotExported (document.modelExport().curveNamesNotExported()),
62  m_pointsSelectionFunctions (document.modelExport().pointsSelectionFunctions()),
63  m_pointsIntervalFunctions (document.modelExport().pointsIntervalFunctions()),
64  m_pointsIntervalUnitsFunctions (document.modelExport().pointsIntervalUnitsFunctions()),
65  m_pointsSelectionRelations (document.modelExport().pointsSelectionRelations()),
66  m_pointsIntervalRelations (document.modelExport().pointsIntervalRelations()),
67  m_pointsIntervalUnitsRelations (document.modelExport().pointsIntervalUnitsRelations()),
68  m_layoutFunctions (document.modelExport().layoutFunctions()),
69  m_delimiter (document.modelExport().delimiter()),
70  m_extrapolateOutsideEndpoints (document.modelExport().extrapolateOutsideEndpoints()),
71  m_overrideCsvTsv (document.modelExport().overrideCsvTsv()),
72  m_header (document.modelExport().header()),
73  m_xLabel (document.modelExport().xLabel())
74 {
75 }
76 
78  m_curveNamesNotExported (other.curveNamesNotExported()),
79  m_pointsSelectionFunctions (other.pointsSelectionFunctions()),
80  m_pointsIntervalFunctions (other.pointsIntervalFunctions()),
81  m_pointsIntervalUnitsFunctions (other.pointsIntervalUnitsFunctions()),
82  m_pointsSelectionRelations (other.pointsSelectionRelations()),
83  m_pointsIntervalRelations (other.pointsIntervalRelations()),
84  m_pointsIntervalUnitsRelations (other.pointsIntervalUnitsRelations()),
85  m_layoutFunctions (other.layoutFunctions()),
86  m_delimiter (other.delimiter()),
87  m_extrapolateOutsideEndpoints (other.extrapolateOutsideEndpoints()),
88  m_overrideCsvTsv (other.overrideCsvTsv()),
89  m_header (other.header()),
90  m_xLabel (other.xLabel ())
91 {
92 }
93 
95 {
96  m_curveNamesNotExported = other.curveNamesNotExported();
97  m_pointsSelectionFunctions = other.pointsSelectionFunctions();
98  m_pointsIntervalFunctions = other.pointsIntervalFunctions();
99  m_pointsIntervalUnitsFunctions = other.pointsIntervalUnitsFunctions();
100  m_pointsSelectionRelations = other.pointsSelectionRelations();
101  m_pointsIntervalRelations = other.pointsIntervalRelations();
102  m_pointsIntervalUnitsRelations = other.pointsIntervalUnitsRelations();
103  m_layoutFunctions = other.layoutFunctions();
104  m_delimiter = other.delimiter();
105  m_extrapolateOutsideEndpoints = other.extrapolateOutsideEndpoints();
106  m_overrideCsvTsv = other.overrideCsvTsv();
107  m_header = other.header();
108  m_xLabel = other.xLabel();
109 
110  return *this;
111 }
112 
114 {
115  return m_curveNamesNotExported;
116 }
117 
119 {
120  return m_delimiter;
121 }
122 
124 {
125  return m_extrapolateOutsideEndpoints;
126 }
127 
129 {
130  return m_header;
131 }
132 
133 ExportLayoutFunctions DocumentModelExportFormat::layoutFunctions() const
134 {
135  return m_layoutFunctions;
136 }
137 
138 void DocumentModelExportFormat::loadXml(QXmlStreamReader &reader)
139 {
140  LOG4CPP_INFO_S ((*mainCat)) << "DocumentModelExportFormat::loadXml";
141 
142  bool success = true;
143 
144  QXmlStreamAttributes attributes = reader.attributes();
145 
146  // DOCUMENT_SERIALIZE_EXPORT_EXTRAPOLATE_OUTSIDE_ENDPOINTS is specific to versions 11 and newer
147  if (attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_FUNCTIONS) &&
148  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_FUNCTIONS) &&
149  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_FUNCTIONS) &&
150  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_RELATIONS) &&
151  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_RELATIONS) &&
152  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_RELATIONS) &&
153  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_LAYOUT_FUNCTIONS) &&
154  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_DELIMITER) &&
155  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_HEADER) &&
156  attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_X_LABEL)) {
157 
158  setPointsSelectionFunctions (static_cast<ExportPointsSelectionFunctions> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_FUNCTIONS).toInt()));
159  setPointsIntervalFunctions (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_FUNCTIONS).toDouble());
160  setPointsIntervalUnitsFunctions (static_cast<ExportPointsIntervalUnits> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_FUNCTIONS).toInt()));
161  setPointsSelectionRelations (static_cast<ExportPointsSelectionRelations> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_RELATIONS).toInt()));
162  setPointsIntervalRelations (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_RELATIONS).toDouble());
163  setPointsIntervalUnitsRelations (static_cast<ExportPointsIntervalUnits> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_RELATIONS).toInt()));
164  setLayoutFunctions (static_cast<ExportLayoutFunctions> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_LAYOUT_FUNCTIONS).toInt()));
165  setDelimiter (static_cast<ExportDelimiter> (attributes.value (DOCUMENT_SERIALIZE_EXPORT_DELIMITER).toInt()));
166  if (attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CSV_TSV)) {
167 
168  // Boolean value
169  QString stringOverrideCsvTsv = attributes.value (DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CSV_TSV).toString();
170 
171  setOverrideCsvTsv(stringOverrideCsvTsv == DOCUMENT_SERIALIZE_BOOL_TRUE);
172  }
173  if (attributes.hasAttribute(DOCUMENT_SERIALIZE_EXPORT_EXTRAPOLATE_OUTSIDE_ENDPOINTS)) {
174 
175  // Boolean value
176  QString stringExtrapolate = attributes.value (DOCUMENT_SERIALIZE_EXPORT_EXTRAPOLATE_OUTSIDE_ENDPOINTS).toString();
177 
178  setExtrapolateOutsideEndpoints (stringExtrapolate == DOCUMENT_SERIALIZE_BOOL_TRUE);
179  }
180 
181  setHeader (static_cast<ExportHeader> (attributes.value(DOCUMENT_SERIALIZE_EXPORT_HEADER).toInt()));
182  setXLabel (attributes.value(DOCUMENT_SERIALIZE_EXPORT_X_LABEL).toString());
183 
184  // Read element containing excluded curve names
185  while ((loadNextFromReader (reader) != QXmlStreamReader::StartElement) ||
186  (reader.name() != DOCUMENT_SERIALIZE_EXPORT_CURVE_NAMES_NOT_EXPORTED)) {
187 
188  if (reader.atEnd()) {
189  success = false;
190  break;
191  }
192  }
193 
194  if (success) {
195 
196  QStringList curveNamesNotExported;
197 
198  QXmlStreamReader::TokenType tokenType = loadNextFromReader(reader);
199  while (tokenType == QXmlStreamReader::StartElement) {
200 
201  if (reader.name() == DOCUMENT_SERIALIZE_EXPORT_CURVE_NAME_NOT_EXPORTED) {
202  curveNamesNotExported << reader.text().toString();
203  }
204  tokenType = loadNextFromReader(reader);
205  }
206 
207  // Save curve names
208  setCurveNamesNotExported(curveNamesNotExported);
209 
210  // Read until end of this subtree
211  while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
212  (reader.name() != DOCUMENT_SERIALIZE_EXPORT)){
213  loadNextFromReader(reader);
214  if (reader.atEnd()) {
215  success = false;
216  break;
217  }
218  }
219  }
220  }
221 
222  if (!success) {
223  reader.raiseError (QObject::tr ("Cannot read export data"));
224  }
225 }
226 
228 {
229  return m_overrideCsvTsv;
230 }
231 
233 {
234  return m_pointsIntervalFunctions;
235 }
236 
238 {
239  return m_pointsIntervalRelations;
240 }
241 
243 {
244  return m_pointsIntervalUnitsFunctions;
245 }
246 
248 {
249  return m_pointsIntervalUnitsRelations;
250 }
251 
252 ExportPointsSelectionFunctions DocumentModelExportFormat::pointsSelectionFunctions() const
253 {
254  return m_pointsSelectionFunctions;
255 }
256 
257 ExportPointsSelectionRelations DocumentModelExportFormat::pointsSelectionRelations() const
258 {
259  return m_pointsSelectionRelations;
260 }
261 
262 void DocumentModelExportFormat::printStream(QString indentation,
263  QTextStream &str) const
264 {
265  str << indentation << "DocumentModelExportFormat\n";
266 
267  indentation += INDENTATION_DELTA;
268 
269  str << indentation << "curveNamesNotExported=";
270  QStringList::const_iterator itr;
271  for (itr = m_curveNamesNotExported.begin (); itr != m_curveNamesNotExported.end(); itr++) {
272  QString curveName = *itr;
273  str << indentation << curveName << " ";
274  }
275  str << "\n";
276 
277  str << indentation << "exportPointsSelectionFunctions="
278  << exportPointsSelectionFunctionsToString (m_pointsSelectionFunctions) << "\n";
279  str << indentation << "pointsIntervalFunctions=" << m_pointsIntervalFunctions << "\n";
280  str << indentation << "pointsIntervalUnitsFunctions="
281  << exportPointsIntervalUnitsToString (m_pointsIntervalUnitsFunctions) << "\n";
282  str << indentation << "exportPointsSelectionRelations="
283  << exportPointsSelectionRelationsToString (m_pointsSelectionRelations) << "\n";
284  str << indentation << "pointsIntervalRelations=" << m_pointsIntervalRelations << "\n";
285  str << indentation << "pointsIntervalUnitsRelations="
286  << exportPointsIntervalUnitsToString (m_pointsIntervalUnitsRelations) << "\n";
287  str << indentation << "exportLayoutFunctions=" << exportLayoutFunctionsToString (m_layoutFunctions) << "\n";
288  str << indentation << "exportDelimiter=" << exportDelimiterToString (m_delimiter) << "\n";
289  str << indentation << "exportExtrapolateOutsideEndpoints=" << (m_extrapolateOutsideEndpoints ? "yes" : "no") << "\n";
290  str << indentation << "overrideCsvTsv=" << (m_overrideCsvTsv ? "true" : "false") << "\n";
291  str << indentation << "exportHeader=" << exportHeaderToString (m_header) << "\n";
292  str << indentation << "xLabel=" << m_xLabel << "\n";
293 }
294 
295 void DocumentModelExportFormat::saveXml(QXmlStreamWriter &writer) const
296 {
297  LOG4CPP_INFO_S ((*mainCat)) << "DocumentModelExportFormat::saveXml";
298 
299  writer.writeStartElement(DOCUMENT_SERIALIZE_EXPORT);
300  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_FUNCTIONS, QString::number (m_pointsSelectionFunctions));
301  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_FUNCTIONS_STRING, exportPointsSelectionFunctionsToString (m_pointsSelectionFunctions));
302  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_FUNCTIONS, QString::number (m_pointsIntervalFunctions));
303  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_FUNCTIONS, QString::number (m_pointsIntervalUnitsFunctions));
304  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_RELATIONS, QString::number (m_pointsSelectionRelations));
305  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_SELECTION_RELATIONS_STRING, exportPointsSelectionRelationsToString (m_pointsSelectionRelations));
306  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_UNITS_RELATIONS, QString::number (m_pointsIntervalUnitsRelations));
307  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_POINTS_INTERVAL_RELATIONS, QString::number (m_pointsIntervalRelations));
308  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_LAYOUT_FUNCTIONS, QString::number (m_layoutFunctions));
309  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_LAYOUT_FUNCTIONS_STRING, exportLayoutFunctionsToString (m_layoutFunctions));
310  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_DELIMITER, QString::number (m_delimiter));
311  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CSV_TSV, m_overrideCsvTsv ?
312  DOCUMENT_SERIALIZE_BOOL_TRUE :
313  DOCUMENT_SERIALIZE_BOOL_FALSE);
314  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_DELIMITER_STRING, exportDelimiterToString (m_delimiter));
315  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_EXTRAPOLATE_OUTSIDE_ENDPOINTS, m_extrapolateOutsideEndpoints ?
316  DOCUMENT_SERIALIZE_BOOL_TRUE :
317  DOCUMENT_SERIALIZE_BOOL_FALSE);
318  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_HEADER, QString::number (m_header));
319  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_HEADER_STRING, exportHeaderToString (m_header));
320  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_X_LABEL, m_xLabel);
321 
322  // Loop through curve names that are not to be exported
323  writer.writeStartElement(DOCUMENT_SERIALIZE_EXPORT_CURVE_NAMES_NOT_EXPORTED);
324  QStringList::const_iterator itr;
325  for (itr = m_curveNamesNotExported.begin (); itr != m_curveNamesNotExported.end (); itr++) {
326  QString curveNameNotExported = *itr;
327  writer.writeStartElement(DOCUMENT_SERIALIZE_EXPORT_CURVE_NAME_NOT_EXPORTED);
328  writer.writeAttribute(DOCUMENT_SERIALIZE_EXPORT_CURVE_NAME_NOT_EXPORTED_NAME, curveNameNotExported);
329  writer.writeEndElement();
330  }
331  writer.writeEndElement();
332 
333  writer.writeEndElement();
334 }
335 
336 void DocumentModelExportFormat::setCurveNamesNotExported(const QStringList &curveNamesNotExported)
337 {
338  m_curveNamesNotExported = curveNamesNotExported;
339 }
340 
341 void DocumentModelExportFormat::setDelimiter(ExportDelimiter delimiter)
342 {
343  m_delimiter = delimiter;
344 }
345 
346 void DocumentModelExportFormat::setExtrapolateOutsideEndpoints(bool extrapolateOutsideEndpoints)
347 {
348  m_extrapolateOutsideEndpoints = extrapolateOutsideEndpoints;
349 }
350 
351 void DocumentModelExportFormat::setHeader(ExportHeader header)
352 {
353  m_header = header;
354 }
355 
356 void DocumentModelExportFormat::setLayoutFunctions(ExportLayoutFunctions layoutFunctions)
357 {
358  m_layoutFunctions = layoutFunctions;
359 }
360 
362 {
363  m_overrideCsvTsv = overrideCsvTsv;
364 }
365 
366 void DocumentModelExportFormat::setPointsIntervalFunctions(double pointsIntervalFunctions)
367 {
368  m_pointsIntervalFunctions = pointsIntervalFunctions;
369 }
370 
371 void DocumentModelExportFormat::setPointsIntervalRelations(double pointsIntervalRelations)
372 {
373  m_pointsIntervalRelations = pointsIntervalRelations;
374 }
375 
376 void DocumentModelExportFormat::setPointsIntervalUnitsFunctions(ExportPointsIntervalUnits pointsIntervalUnitsFunctions)
377 {
378  m_pointsIntervalUnitsFunctions = pointsIntervalUnitsFunctions;
379 }
380 
381 void DocumentModelExportFormat::setPointsIntervalUnitsRelations(ExportPointsIntervalUnits pointsIntervalUnitsRelations)
382 {
383  m_pointsIntervalUnitsRelations = pointsIntervalUnitsRelations;
384 }
385 
386 void DocumentModelExportFormat::setPointsSelectionFunctions(ExportPointsSelectionFunctions pointsSelectionFunctions)
387 {
388  m_pointsSelectionFunctions = pointsSelectionFunctions;
389 }
390 
391 void DocumentModelExportFormat::setPointsSelectionRelations(ExportPointsSelectionRelations pointsSelectionRelations)
392 {
393  m_pointsSelectionRelations = pointsSelectionRelations;
394 }
395 
396 void DocumentModelExportFormat::setXLabel (const QString &xLabel)
397 {
398  m_xLabel = xLabel;
399 }
400 
402 {
403  return m_xLabel;
404 }
void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions)
Set method for point selection for functions.
ExportPointsSelectionFunctions pointsSelectionFunctions() const
Get method for point selection for functions.
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.