summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_ft/csv.h
blob: 13231293b92d512f57ef273a1652ceb0130042a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*dummy CSV reader for QT4*/
/*version 0.1*/
/*11.1.2009*/
#ifndef CSV_H
#define CSV_H

//#include "myclass_api.h"

#include <QObject>
#include <QStringList>
#include <QIODevice>
#include <QTextCodec>
#include <QRegExp>

class /*MYCLASS_API*/ CSV /*: public QObject*/
{
	/*Q_OBJECT*/

public:
	CSV(QIODevice * device);
	CSV(QString &string);
	~CSV();

	QString readLine();
	QStringList parseLine();
	static QStringList parseLine(QString line);

	void setCodec(const char* codecName);
private:
	QIODevice *m_device;
	QTextCodec *m_codec;
	QString m_string;
	int m_pos;
	QRegExp m_rx;
	
};

#endif // CSV_H