jce-manager/src/jceData/Calendar/coursesSchedule/calendarPageCourse.h

82 lines
1.8 KiB
C
Raw Normal View History

2014-09-12 08:43:55 +00:00
#ifndef CALENDARCOURSE_H
#define CALENDARCOURSE_H
#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
};
calendarCourse(int serial, QString name, QString type, QString lecturer,
2014-10-07 21:16:27 +00:00
double points, double semesterHours, QString dayAndHour,
QString room);
2014-09-12 08:43:55 +00:00
~calendarCourse(){}
int getDay() const;
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
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);
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:
void setDayAndHour(QString parse);
2014-09-12 08:43:55 +00:00
double points;
QString lecturer;
2014-09-12 08:43:55 +00:00
double semesterHours;
int day;
int hourBegin;
int minutesBegin;
int hourEnd;
int minutesEnd;
QString room;
2014-09-12 08:43:55 +00:00
};
#endif // CALENDARCOURSE_H