2014-09-12 08:43:55 +00:00
|
|
|
#ifndef CALENDARPAGE_H
|
|
|
|
#define CALENDARPAGE_H
|
|
|
|
|
|
|
|
#include "../page.h"
|
|
|
|
#include "calendarCourse.h"
|
|
|
|
#include <list>
|
2014-09-17 01:08:38 +00:00
|
|
|
//#include <string.h> //strlen and strtok to phrase the html file
|
|
|
|
//#include <ctype.h> //checks if character is numeric
|
2014-09-12 08:43:55 +00:00
|
|
|
|
|
|
|
class CalendarPage : public Page
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-09-17 01:08:38 +00:00
|
|
|
QString htmlToString();
|
2014-09-12 08:43:55 +00:00
|
|
|
std::list<calendarCourse*>* getCourses() { return courses; }
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2014-09-17 01:08:38 +00:00
|
|
|
virtual void setPage(QString html);
|
2014-09-17 02:47:12 +00:00
|
|
|
CalendarPage() { courses = NULL; }
|
2014-09-12 08:43:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
2014-09-17 01:08:38 +00:00
|
|
|
QString tokenToLines(QString &textToParse);
|
|
|
|
void calendarListInit(QString &linesTokinzedString);
|
|
|
|
calendarCourse* lineToCourse(QString line);
|
2014-09-12 08:43:55 +00:00
|
|
|
|
2014-09-17 01:08:38 +00:00
|
|
|
QString tempHtml;
|
2014-09-12 08:43:55 +00:00
|
|
|
std::list<calendarCourse*>* courses;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CALENDARPAGE_H
|