jce-manager/src/jceData/Grades/gradePage.h

62 lines
1.2 KiB
C
Raw Normal View History

2014-09-08 15:54:52 +00:00
#ifndef GRADE_PAGE_H
#define GRADE_PAGE_H
/* This Code Made By Sagi Dayan
* SagiDayan@gmail.com
*
* Changes has been made by Liran Ben Gida
2014-09-08 15:54:52 +00:00
* LiranBG@gmail.com
*/
#include "../page.h"
#include "../Grades/gradeCourse.h"
2014-10-10 18:33:08 +00:00
#include <QList>
2014-09-08 15:54:52 +00:00
2014-10-10 18:47:30 +00:00
/**
* @brief The GradePage class
*
* This class generating html string to a list of gradeCourse
* Each item in a list is a course with its information (grade, points, name, serial and etc)
*
* Made By:
* Sagi Dayan, SagiDayan@gmail.com
* Liran Ben Gida, LiranBG@gmail.com
* On 31/8/2014
*/
2014-09-08 15:54:52 +00:00
class GradePage : public Page
{
2014-10-07 14:26:11 +00:00
2014-09-08 15:54:52 +00:00
public:
2014-10-10 18:47:30 +00:00
GradePage(QString html);
2014-10-13 02:12:00 +00:00
GradePage(GradePage &other);
2014-10-10 18:47:30 +00:00
~GradePage();
2014-10-07 14:26:11 +00:00
2014-10-10 18:47:30 +00:00
void removeCourse(QString courseSerialID);
2014-10-10 18:33:08 +00:00
2014-10-10 18:47:30 +00:00
double getAvg();
double getAvg(int year);
double getAvg(int year, int semester);
2014-09-08 15:54:52 +00:00
2014-10-10 18:47:30 +00:00
int getMinYearInList();
int getMaxYearInList();
2014-09-08 15:54:52 +00:00
2014-10-07 14:26:11 +00:00
2014-10-10 18:47:30 +00:00
QList<gradeCourse*> getCourses() { return courses; }
2014-09-08 15:54:52 +00:00
private:
2014-10-10 18:47:30 +00:00
void coursesListInit(QString &linesTokinzedString);
gradeCourse* lineToCourse(QString line);
2014-10-07 14:26:11 +00:00
2014-10-10 18:47:30 +00:00
bool isGradedYet(QString grade);
2014-09-08 15:54:52 +00:00
2014-10-10 18:47:30 +00:00
QList<gradeCourse*> courses;
2014-09-08 15:54:52 +00:00
2014-10-10 18:47:30 +00:00
QString tempHtml;
2014-09-08 15:54:52 +00:00
};
#endif