SciDAVis
1.D4
|
Import an ASCII file as Table. More...
#include <AsciiTableImportFilter.h>
Public Member Functions | |
ACCESSOR (int, ignored_lines) | |
ACCESSOR (bool, first_row_names_columns) | |
ACCESSOR (bool, trim_whitespace) | |
ACCESSOR (bool, simplify_whitespace) | |
ACCESSOR (bool, convert_to_numeric) | |
ACCESSOR (QLocale, numeric_locale) | |
AsciiTableImportFilter () | |
virtual QStringList | fileExtensions () const |
The file extension(s) typically associated with the handled format. | |
virtual AbstractAspect * | importAspect (QIODevice *input) |
Import an object from the specified device and convert it to an Aspect. | |
virtual QString | name () const |
A (localized) name for the filter. | |
QString | separator () const |
void | set_separator (const QString &value) |
Public Member Functions inherited from AbstractImportFilter | |
QString | nameAndPatterns () const |
Uses name() and fileExtensions() to produce a filter specification as used by QFileDialog. | |
virtual | ~AbstractImportFilter () |
Properties | |
bool | convert_to_numeric |
bool | first_row_names_columns |
int | ignored_lines |
QLocale | numeric_locale |
QString | separator |
bool | simplify_whitespace |
bool | trim_whitespace |
Private Attributes | |
bool | d_convert_to_numeric |
bool | d_first_row_names_columns |
int | d_ignored_lines |
QLocale | d_numeric_locale |
QString | d_separator |
bool | d_simplify_whitespace |
bool | d_trim_whitespace |
Import an ASCII file as Table.
This is a complete rewrite of equivalent functionality previously found in Table.
Originally, this filter wasn't meant to handle conversion of ASCII text to other data types. While it's conceptually elegant and flexible to import text data as text columns, testing this in everyday usage revealed that, for the common use case of importing lots of numeric data, having to convert imported tables to numeric by hand is a bit of a nuisance. Therefore, AsciiTableImportFilter has an option for converting all columns to Numeric. Importing non-numeric data is possible by disabling this and (optionally) converting texts to other formats using Table's type control tab.
TODO: port options GUI from ImportTableDialog
|
inline |
AsciiTableImportFilter::ACCESSOR | ( | int | , |
ignored_lines | |||
) |
AsciiTableImportFilter::ACCESSOR | ( | bool | , |
first_row_names_columns | |||
) |
AsciiTableImportFilter::ACCESSOR | ( | bool | , |
trim_whitespace | |||
) |
AsciiTableImportFilter::ACCESSOR | ( | bool | , |
simplify_whitespace | |||
) |
AsciiTableImportFilter::ACCESSOR | ( | bool | , |
convert_to_numeric | |||
) |
AsciiTableImportFilter::ACCESSOR | ( | QLocale | , |
numeric_locale | |||
) |
|
virtual |
The file extension(s) typically associated with the handled format.
Implements AbstractImportFilter.
|
virtual |
Import an object from the specified device and convert it to an Aspect.
May return 0 if import failed.
Implements AbstractImportFilter.
References future::Table::appendColumns(), Column::copy(), d_convert_to_numeric, d_first_row_names_columns, d_ignored_lines, d_numeric_locale, d_separator, d_simplify_whitespace, d_trim_whitespace, AbstractFilter::input(), SciDAVis::Numeric, AbstractSimpleFilter::output(), String2DoubleFilter::setNumericLocale(), Column::setPlotDesignation(), SciDAVis::X, and SciDAVis::Y.
Referenced by Table::importASCII(), and Table::Table().
|
inlinevirtual |
A (localized) name for the filter.
Implements AbstractImportFilter.
|
inline |
References d_separator.
|
inline |
References d_separator.
Referenced by Table::importASCII(), and Table::Table().
|
private |
Referenced by importAspect().
|
private |
Referenced by importAspect().
|
private |
Referenced by importAspect().
|
private |
Referenced by importAspect().
|
private |
Referenced by importAspect(), separator(), and set_separator().
|
private |
Referenced by importAspect().
|
private |
Referenced by importAspect().
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |