scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

AsciiTableImportFilter.h
Go to the documentation of this file.
1 
11 
30 #ifndef ASCII_TABLE_IMPORT_FILTER_H
31 #define ASCII_TABLE_IMPORT_FILTER_H
32 
34 #include <QLocale>
35 
37 
52 {
53  Q_OBJECT
54 
55  public:
57  d_ignored_lines(0),
58  d_separator("\t"),
60  d_trim_whitespace(false),
61  d_simplify_whitespace(false),
62  d_convert_to_numeric(false),
63  d_numeric_locale(QLocale::c())
64  {}
65  virtual AbstractAspect * importAspect(QIODevice& input);
66  virtual QStringList fileExtensions() const;
67  virtual QString name() const { return QObject::tr("ASCII table"); }
68 
70  Q_PROPERTY(int ignored_lines READ ignored_lines WRITE set_ignored_lines);
71 
72  QString separator() const { QString result = d_separator; return result.replace("\t", "\\t"); }
73  void set_separator(const QString &value) { d_separator = value; d_separator.replace("\\t","\t"); }
74  Q_PROPERTY(QString separator READ separator WRITE set_separator);
75 
77  Q_PROPERTY(bool first_row_names_columns READ first_row_names_columns WRITE set_first_row_names_columns);
78 
80  Q_PROPERTY(bool trim_whitespace READ trim_whitespace WRITE set_trim_whitespace);
81 
83  Q_PROPERTY(bool simplify_whitespace READ simplify_whitespace WRITE set_simplify_whitespace);
84 
86  Q_PROPERTY(bool convert_to_numeric READ convert_to_numeric WRITE set_convert_to_numeric);
87 
89  Q_PROPERTY(QLocale numeric_locale READ numeric_locale WRITE set_numeric_locale);
90 
91  private:
93  QString d_separator;
99 };
100 
101 #endif // ifndef ASCII_TABLE_IMPORT_FILTER_H
AsciiTableImportFilter::ACCESSOR
ACCESSOR(int, ignored_lines)
AsciiTableImportFilter::set_separator
void set_separator(const QString &value)
Definition: AsciiTableImportFilter.h:73
AsciiTableImportFilter::first_row_names_columns
bool first_row_names_columns
Definition: AsciiTableImportFilter.h:77
AsciiTableImportFilter::trim_whitespace
bool trim_whitespace
Definition: AsciiTableImportFilter.h:80
AsciiTableImportFilter::ignored_lines
int ignored_lines
Definition: AsciiTableImportFilter.h:70
AsciiTableImportFilter::fileExtensions
virtual QStringList fileExtensions() const
The file extension(s) typically associated with the handled format.
Definition: AsciiTableImportFilter.cpp:44
AsciiTableImportFilter::separator
QString separator
Definition: AsciiTableImportFilter.h:74
AsciiTableImportFilter::convert_to_numeric
bool convert_to_numeric
Definition: AsciiTableImportFilter.h:86
AsciiTableImportFilter::separator
QString separator() const
Definition: AsciiTableImportFilter.h:72
AsciiTableImportFilter::d_first_row_names_columns
bool d_first_row_names_columns
Definition: AsciiTableImportFilter.h:94
AsciiTableImportFilter::importAspect
virtual AbstractAspect * importAspect(QIODevice &input)
Import an object from the specified device and convert it to an Aspect.
Definition: AsciiTableImportFilter.cpp:158
AsciiTableImportFilter::d_ignored_lines
int d_ignored_lines
Definition: AsciiTableImportFilter.h:89
AsciiTableImportFilter::simplify_whitespace
bool simplify_whitespace
Definition: AsciiTableImportFilter.h:83
AbstractImportFilter
Interface for import operations.
Definition: AbstractImportFilter.h:77
AsciiTableImportFilter::AsciiTableImportFilter
AsciiTableImportFilter()
Definition: AsciiTableImportFilter.h:56
AsciiTableImportFilter::d_numeric_locale
QLocale d_numeric_locale
Definition: AsciiTableImportFilter.h:98
AsciiTableImportFilter::name
virtual QString name() const
A (localized) name for the filter.
Definition: AsciiTableImportFilter.h:67
AbstractImportFilter.h
AsciiTableImportFilter::d_convert_to_numeric
bool d_convert_to_numeric
Definition: AsciiTableImportFilter.h:97
AsciiTableImportFilter::d_separator
QString d_separator
Definition: AsciiTableImportFilter.h:93
AsciiTableImportFilter
Import an ASCII file as Table.
Definition: AsciiTableImportFilter.h:52
AsciiTableImportFilter::d_simplify_whitespace
bool d_simplify_whitespace
Definition: AsciiTableImportFilter.h:96
AsciiTableImportFilter::d_trim_whitespace
bool d_trim_whitespace
Definition: AsciiTableImportFilter.h:95
AbstractAspect
Base class of all persistent objects in a Project.
Definition: AbstractAspect.h:86
AsciiTableImportFilter::numeric_locale
QLocale numeric_locale
Definition: AsciiTableImportFilter.h:89