SciDAVis  1.D4
Public Member Functions | Properties | Private Attributes
AsciiTableImportFilter Class Reference

Import an ASCII file as Table. More...

#include <AsciiTableImportFilter.h>

Inheritance diagram for AsciiTableImportFilter:
AbstractImportFilter

List of all members.

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 AbstractAspectimportAspect (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

Detailed Description

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


Constructor & Destructor Documentation

AsciiTableImportFilter::AsciiTableImportFilter ( )
inline

Member Function Documentation

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   
)
QStringList AsciiTableImportFilter::fileExtensions ( ) const
virtual

The file extension(s) typically associated with the handled format.

Implements AbstractImportFilter.

AbstractAspect * AsciiTableImportFilter::importAspect ( QIODevice *  input)
virtual
virtual QString AsciiTableImportFilter::name ( ) const
inlinevirtual

A (localized) name for the filter.

Implements AbstractImportFilter.

QString AsciiTableImportFilter::separator ( ) const
inline

References d_separator.

void AsciiTableImportFilter::set_separator ( const QString &  value)
inline

References d_separator.

Referenced by Table::importASCII(), and Table::Table().


Member Data Documentation

bool AsciiTableImportFilter::d_convert_to_numeric
private

Referenced by importAspect().

bool AsciiTableImportFilter::d_first_row_names_columns
private

Referenced by importAspect().

int AsciiTableImportFilter::d_ignored_lines
private

Referenced by importAspect().

QLocale AsciiTableImportFilter::d_numeric_locale
private

Referenced by importAspect().

QString AsciiTableImportFilter::d_separator
private
bool AsciiTableImportFilter::d_simplify_whitespace
private

Referenced by importAspect().

bool AsciiTableImportFilter::d_trim_whitespace
private

Referenced by importAspect().


Property Documentation

bool AsciiTableImportFilter::convert_to_numeric
readwrite
bool AsciiTableImportFilter::first_row_names_columns
readwrite
int AsciiTableImportFilter::ignored_lines
readwrite
QLocale AsciiTableImportFilter::numeric_locale
readwrite
QString AsciiTableImportFilter::separator
readwrite
bool AsciiTableImportFilter::simplify_whitespace
readwrite
bool AsciiTableImportFilter::trim_whitespace
readwrite

The documentation for this class was generated from the following files: