Engauge Digitizer  2
Public Member Functions | List of all members
ExportToFile Class Reference

Strategy class for exporting to a file. This strategy is external to the Document class so that class is simpler. More...

#include <ExportToFile.h>

Collaboration diagram for ExportToFile:
Collaboration graph

Public Member Functions

 ExportToFile ()
 Single constructor. More...
 
void exportToFile (const DocumentModelExportFormat &modelExport, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
 Export Document points according to the settings. More...
 
QString fileExtensionCsv () const
 File extension for csv export files. More...
 
QString fileExtensionTsv () const
 File extension for tsv export files. More...
 
QString filterCsv () const
 QFileDialog filter for CSV files. More...
 
QString filterTsv () const
 QFileDialog filter for TSV files. More...
 

Detailed Description

Strategy class for exporting to a file. This strategy is external to the Document class so that class is simpler.

Definition at line 24 of file ExportToFile.h.

Constructor & Destructor Documentation

◆ ExportToFile()

ExportToFile::ExportToFile ( )

Single constructor.

Definition at line 19 of file ExportToFile.cpp.

20 {
21 }

Member Function Documentation

◆ exportToFile()

void ExportToFile::exportToFile ( const DocumentModelExportFormat modelExport,
const Document document,
const MainWindowModel modelMainWindow,
const Transformation transformation,
QTextStream &  str 
) const

Export Document points according to the settings.

The DocumentModelExportFormat inside the Document is ignored so DlgSettingsExport can supply its own DocumentModelExportFormat when previewing what would be exported.

Definition at line 23 of file ExportToFile.cpp.

28 {
29  LOG4CPP_INFO_S ((*mainCat)) << "ExportToFile::exportToFile";
30 
31  unsigned int numWritesSoFar = 0;
32 
33  ExportFileFunctions exportFunctions;
34  exportFunctions.exportToFile (modelExport,
35  document,
36  modelMainWindow,
37  transformation,
38  str,
39  numWritesSoFar);
40 
41  ExportFileRelations exportRelations;
42  exportRelations.exportToFile (modelExport,
43  document,
44  modelMainWindow,
45  transformation,
46  str,
47  numWritesSoFar);
48 }

◆ fileExtensionCsv()

QString ExportToFile::fileExtensionCsv ( ) const

File extension for csv export files.

Definition at line 50 of file ExportToFile.cpp.

51 {
53 }

◆ fileExtensionTsv()

QString ExportToFile::fileExtensionTsv ( ) const

File extension for tsv export files.

Definition at line 55 of file ExportToFile.cpp.

56 {
58 }

◆ filterCsv()

QString ExportToFile::filterCsv ( ) const

QFileDialog filter for CSV files.

Definition at line 60 of file ExportToFile.cpp.

61 {
62  return QString ("Text CSV (*.%1)")
64 }

◆ filterTsv()

QString ExportToFile::filterTsv ( ) const

QFileDialog filter for TSV files.

Definition at line 66 of file ExportToFile.cpp.

67 {
68  return QString ("Text TSV (*.%1)")
70 }

The documentation for this class was generated from the following files:
CSV_FILENAME_EXTENSION
const QString CSV_FILENAME_EXTENSION("csv")
ExportFileRelations::exportToFile
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str, unsigned int &numWritesSoFar) const
Export Document points according to the settings.
Definition: ExportFileRelations.cpp:223
ExportFileFunctions::exportToFile
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str, unsigned int &numWritesSoFar) const
Export Document points according to the settings.
Definition: ExportFileFunctions.cpp:138
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
ExportFileRelations
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
Definition: ExportFileRelations.h:25
mainCat
log4cpp::Category * mainCat
Definition: Logger.cpp:14
TSV_FILENAME_EXTENSION
const QString TSV_FILENAME_EXTENSION("tsv")
ExportFileFunctions
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
Definition: ExportFileFunctions.h:26