Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ExportToFile.cpp
1 #include "Document.h"
2 #include "ExportFileFunctions.h"
3 #include "ExportFileRelations.h"
4 #include "ExportToFile.h"
5 #include "Logger.h"
6 #include "MainWindowModel.h"
7 #include <QTextStream>
8 #include "Transformation.h"
9 
10 const QString CSV_FILENAME_EXTENSION ("csv");
11 const QString TSV_FILENAME_EXTENSION ("tsv");
12 
14 {
15 }
16 
18  const Document &document,
19  const MainWindowModel &modelMainWindow,
20  const Transformation &transformation,
21  QTextStream &str) const
22 {
23  LOG4CPP_INFO_S ((*mainCat)) << "ExportToFile::exportToFile";
24 
25  ExportFileFunctions exportFunctions;
26  exportFunctions.exportToFile (modelExport,
27  document,
28  modelMainWindow,
29  transformation,
30  str);
31 
32  ExportFileRelations exportRelations;
33  exportRelations.exportToFile (modelExport,
34  document,
35  modelMainWindow,
36  transformation,
37  str);
38 }
39 
41 {
42  return CSV_FILENAME_EXTENSION;
43 }
44 
46 {
47  return TSV_FILENAME_EXTENSION;
48 }
49 
50 QString ExportToFile::filterCsv () const
51 {
52  return QString ("Text CSV (*.%1)")
53  .arg (CSV_FILENAME_EXTENSION);
54 }
55 
56 QString ExportToFile::filterTsv () const
57 {
58  return QString ("Text TSV (*.%1)")
59  .arg (TSV_FILENAME_EXTENSION);
60 }
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
Export Document points according to the settings.
Affine transformation between screen and graph coordinates, based on digitized axis points...
QString fileExtensionTsv() const
File extension for tsv export files.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
Model for DlgSettingsMainWindow and CmdSettingsMainWindow.
QString fileExtensionCsv() const
File extension for csv export files.
Storage of one imported image and the data attached to that image.
Definition: Document.h:29
void exportToFile(const DocumentModelExportFormat &modelExport, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
Export Document points according to the settings.
QString filterTsv() const
QFileDialog filter for TSV files.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
QString filterCsv() const
QFileDialog filter for CSV files.
ExportToFile()
Single constructor.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
Export Document points according to the settings.