~gezakovacs/tde/csailmirror

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
39
#ifndef ICALPARSER_H_
#define ICALPARSER_H_

#include <QtCore>
//#include <QtSql>
#include "icalindv.h"
#include "evwidget.h"
#include "genfunc.h"

class icalparser : public QObject
{
public:
	icalparser();
	virtual ~icalparser();
	void parsefile();
	void parsefile(QString icalfilepath);
        void parsetree(QString treeloc);
        void parseurl(QString remoteicalurl);
        void parsetextstream(QTextStream *icaltextstream);
//        QSqlDatabase *sqlmaindb;
//        QSqlTableModel *sqltable;
        QString curfilepath;
	QFile curfile;
        QTextStream *curtextstream;
	QList<icalindv*> icallist;
	QStringList listfilesintree(QString treeloc);
	QStringList listfilesintree(QString treeloc, QStringList filelist);
	static QList<icalindv*> orderlistup(QList<icalindv*> unorlist);
	static QList<icalindv*> orderlistdown(QList<icalindv*> unorlist);
	QList<icalindv*> nextevlist(QDateTime refdatetime, int evlistsize = 5);
	QList<icalindv*> nextevlist(int evlistsize = 5);
	QList<icalindv*> prevevlist(QDateTime refdatetime, int evlistsize = 5);
	QList<icalindv*> prevevlist(int evlistsize = 5);
	QList<icalindv*> nearevlist(QDateTime refdatetime, int evlistsize = 5);
	QList<icalindv*> nearevlist(int evlistsize = 5);
	static QList<evwidget*> towidgetlist(QList<icalindv*> evlist);
};

#endif /*ICALPARSER_H_*/