9 #include "ocurvesconfig.h"
11 #include "stringitems.h"
13 #include <QTextStream>
19 #include <QStringList>
66 PlotFile(
const QString &fileName,
unsigned options = 0);
140 void dataLine(std::vector<double> &data);
154 static void dataLine(QString &line, std::vector<double> &data,
bool useSystemLocale);
QString _line
Last read line (readLine()).
Definition: plotfile.h:159
void dataLine(std::vector< double > &data)
Converts the currently cached line into double precision data values.
bool generateHeadings(QStringList &headings)
Generates headings for the plot file.
qint64 fileSize() const
Returns the overall file size in bytes.
QFile _file
The file object.
Definition: plotfile.h:157
qint64 filePos() const
Returns the current buffered byte position in the file.
const QString & currentLine() const
Returns the last line read from the file (after readLine()).
Use the current QLocale for parsing rather than the C locale.
Definition: plotfile.h:60
QTextStream _stream
Stream wrapping the file object.
Definition: plotfile.h:158
OptionFlag
Enumeration of option flags used to control file loading.
Definition: plotfile.h:55
void streamSeek(qint64 pos)
Sets the stream position to pos.
The PlotFile supports loading of data series from a CSV style text file.
Definition: plotfile.h:51
unsigned _options
Option flags.
Definition: plotfile.h:160
bool isOpen() const
Returns true if a file is currently open.
qint64 streamPos() const
Returns the current byte position in the stream.
PlotFile(const QString &fileName, unsigned options=0)
Create a plot file opening fileName.
bool readLine()
Reads the next line from the file, caching it.