2014-09-12 08:43:55 +00:00
|
|
|
#ifndef CALENDARCOURSE_H
|
|
|
|
#define CALENDARCOURSE_H
|
|
|
|
|
2014-10-08 04:14:50 +00:00
|
|
|
#include "../../course.h"
|
2014-09-12 08:43:55 +00:00
|
|
|
#include <QTime>
|
|
|
|
|
|
|
|
#define CALENDAR_COURSE_FIELDS 8
|
|
|
|
|
2014-10-10 17:36:00 +00:00
|
|
|
/**
|
|
|
|
* @brief The calendarCourse class
|
|
|
|
*
|
|
|
|
* This class holds each scheduled course
|
|
|
|
* the course scheme can be found below, inside the enum CourseScheme
|
|
|
|
*
|
|
|
|
* The class's constructor gets the data and manipulate it into an object
|
|
|
|
* with its relevant information.
|
|
|
|
*
|
|
|
|
* Made By liran ben gida, LiranBG@gmail.com On 31/8/2014
|
|
|
|
*/
|
2014-09-12 08:43:55 +00:00
|
|
|
class calendarCourse : public Course
|
|
|
|
{
|
|
|
|
public:
|
2014-10-07 21:16:27 +00:00
|
|
|
|
2014-09-12 08:43:55 +00:00
|
|
|
enum CourseScheme
|
|
|
|
{
|
|
|
|
SERIAL,
|
|
|
|
NAME,
|
|
|
|
TYPE,
|
|
|
|
LECTURER,
|
|
|
|
POINTS,
|
|
|
|
SEM_HOURS,
|
|
|
|
DAY_AND_HOURS,
|
|
|
|
ROOM
|
|
|
|
};
|
2014-10-08 04:14:50 +00:00
|
|
|
|
2014-09-17 01:08:38 +00:00
|
|
|
calendarCourse(int serial, QString name, QString type, QString lecturer,
|
2014-10-07 21:16:27 +00:00
|
|
|
double points, double semesterHours, QString dayAndHour,
|
2014-10-08 04:14:50 +00:00
|
|
|
QString room);
|
|
|
|
|
2014-09-12 08:43:55 +00:00
|
|
|
~calendarCourse(){}
|
|
|
|
|
|
|
|
int getDay() const;
|
2014-09-17 01:08:38 +00:00
|
|
|
QString getLecturer() const;
|
|
|
|
QString getRoom() const;
|
2014-09-12 08:43:55 +00:00
|
|
|
double getSemesterHours() const;
|
|
|
|
int getHourBegin() const;
|
|
|
|
int getMinutesBegin() const;
|
|
|
|
int getHourEnd() const;
|
|
|
|
int getMinutesEnd() const;
|
2014-10-10 19:24:19 +00:00
|
|
|
double getPoints() const;
|
2014-09-12 08:43:55 +00:00
|
|
|
|
2014-09-17 01:08:38 +00:00
|
|
|
void setDay(const QString &value);
|
|
|
|
void setLecturer(const QString &value);
|
|
|
|
void setRoom(const QString &value);
|
2014-09-12 08:43:55 +00:00
|
|
|
void setSemesterHours(double value);
|
|
|
|
void setHourBegin(int value);
|
|
|
|
void setMinutesBegin(int value);
|
|
|
|
void setHourEnd(int value);
|
|
|
|
void setMinutesEnd(int value);
|
2014-10-08 04:14:50 +00:00
|
|
|
void setPoints(double value);
|
2014-09-12 08:43:55 +00:00
|
|
|
|
2014-10-10 19:24:19 +00:00
|
|
|
QString toString();
|
|
|
|
|
2014-09-12 08:43:55 +00:00
|
|
|
private:
|
|
|
|
|
2014-10-08 04:14:50 +00:00
|
|
|
void setDayAndHour(QString parse);
|
2014-09-12 08:43:55 +00:00
|
|
|
|
2014-10-08 04:14:50 +00:00
|
|
|
double points;
|
2014-09-17 01:08:38 +00:00
|
|
|
QString lecturer;
|
2014-09-12 08:43:55 +00:00
|
|
|
double semesterHours;
|
|
|
|
int day;
|
|
|
|
int hourBegin;
|
|
|
|
int minutesBegin;
|
|
|
|
int hourEnd;
|
|
|
|
int minutesEnd;
|
2014-09-17 01:08:38 +00:00
|
|
|
QString room;
|
2014-09-12 08:43:55 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CALENDARCOURSE_H
|