23 lines
411 B
C++
23 lines
411 B
C++
#ifndef CSVWRITER_H
|
|
#define CSVWRITER_H
|
|
|
|
#include <ostream>
|
|
#include <QFileDevice>
|
|
|
|
class CsvWriter {
|
|
public:
|
|
CsvWriter();
|
|
void setDestination(QFileDevice *output);
|
|
void setDestination(QString filename);
|
|
|
|
void setSeperator(QChar ch);
|
|
void writeField(QString field);
|
|
void nextLine();
|
|
private:
|
|
QChar m_seperator = ',';
|
|
QChar m_quote = '\'';
|
|
|
|
QFileDevice *m_output = nullptr;
|
|
};
|
|
|
|
#endif // CSVWRITER_H
|