Parses a delimited text file (e.g. More...
#include <pqDelimitedTextParser.h>
Inherits QObject.
Public Types | |
enum | SeriesT { COLUMN_SERIES } |
Signals | |
void | startParsing () |
Signal emitted when parsing begins. More... | |
void | parseSeries (const QStringList &) |
Signal that will be emitted once for each data series contained in the parsed file. More... | |
void | finishParsing () |
Signal emitted when parsing ends. More... | |
Public Member Functions | |
pqDelimitedTextParser (SeriesT series, char delimiter) | |
Initializes the parser with the delimiter that will be used to separate fields on the same line within parsed files. More... | |
void | parse (const QString &path) |
Call this to parse a filesystem file. More... | |
Parses a delimited text file (e.g.
a CSV or tab-delimited file), and emits signals that represent data series from the file.
To use it, create an instance of pqDelimitedTextParser, passing the delimiter character in the constructor. Then, connect the startParsing(), parseSeries(), and finishParsing() signals to slots. Call parse() with the filename of the file to be parsed, and the parseSeries() signal will be emitted for each series of values contained within the file.
Definition at line 26 of file pqDelimitedTextParser.h.
Enumerator | |
---|---|
COLUMN_SERIES | Data series are organized in columns. |
Definition at line 31 of file pqDelimitedTextParser.h.
pqDelimitedTextParser::pqDelimitedTextParser | ( | SeriesT | series, |
char | delimiter | ||
) |
Initializes the parser with the delimiter that will be used to separate fields on the same line within parsed files.
void pqDelimitedTextParser::parse | ( | const QString & | path | ) |
Call this to parse a filesystem file.
|
signal |
Signal emitted when parsing begins.
|
signal |
Signal that will be emitted once for each data series contained in the parsed file.
|
signal |
Signal emitted when parsing ends.