Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
ExportDelimiter.h File Reference
#include <QString>
Include dependency graph for ExportDelimiter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ExportDelimiter { EXPORT_DELIMITER_COMMA, EXPORT_DELIMITER_SPACE, EXPORT_DELIMITER_TAB, EXPORT_DELIMITER_SEMICOLON }
 Delimiter values that may or may not be overridden by DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CSV_TSV for CSV and TSV files. More...
 

Functions

QString exportDelimiterToString (ExportDelimiter exportDelimiter)
 
QString exportDelimiterToText (ExportDelimiter exportDelimiter, bool isGnuplotDelimiter)
 

Enumeration Type Documentation

Delimiter values that may or may not be overridden by DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CSV_TSV for CSV and TSV files.

EXPORT_DELIMITER_SEMICOLON is not in alphabetical order since it was added after the code was released

Enumerator
EXPORT_DELIMITER_COMMA 
EXPORT_DELIMITER_SPACE 
EXPORT_DELIMITER_TAB 
EXPORT_DELIMITER_SEMICOLON 

Definition at line 14 of file ExportDelimiter.h.

Function Documentation

QString exportDelimiterToString ( ExportDelimiter  exportDelimiter)

Definition at line 10 of file ExportDelimiter.cpp.

11 {
12  QString rtn;
13 
14  switch (exportDelimiter) {
16  rtn = QObject::tr ("Commas");
17  break;
18 
20  rtn = QObject::tr ("Semicolons");
21  break;
22 
24  rtn = QObject::tr ("Spaces");
25  break;
26 
28  rtn = QObject::tr ("Tabs");
29  break;
30  }
31 
32  return rtn;
33 }
QString exportDelimiterToText ( ExportDelimiter  exportDelimiter,
bool  isGnuplotDelimiter 
)

Definition at line 35 of file ExportDelimiter.cpp.

37 {
38  QString rtn;
39 
40  switch (exportDelimiter) {
42  if (isGnuplotDelimiter) {
43  rtn = ", "; // Gnuplot needs a space
44  } else {
45  rtn = ",";
46  }
47  break;
48 
50  rtn = ";";
51  break;
52 
54  rtn = " ";
55  break;
56 
58  rtn = "\t";
59  break;
60  }
61 
62  return rtn;
63 }