Merge branch 'Dev' of https://github.com/liranbg/JceManager into Dev
Conflicts: main/CourseTab/coursestablemanager.cpp
This commit is contained in:
commit
5a287a25ef
|
@ -206,7 +206,24 @@ void coursesTableManager::addRow(const gradeCourse *courseToAdd)
|
|||
courseTBL->setItem(i,j++,type);
|
||||
courseTBL->setItem(i,j++,points);
|
||||
courseTBL->setItem(i,j++,hours);
|
||||
courseTBL->setItem(i,j++,grade);
|
||||
courseTBL->setItem(i,j,grade);
|
||||
if(c->getGrade() < 55 && c->getGrade() != 0)
|
||||
{
|
||||
courseTBL->item(i, j)->setBackground(Qt::darkRed);
|
||||
courseTBL->item(i,j)->setTextColor(Qt::white);
|
||||
}
|
||||
else if(55 <= c->getGrade() && c->getGrade() < 70 )
|
||||
{
|
||||
courseTBL->item(i, j)->setBackground(Qt::darkYellow);
|
||||
courseTBL->item(i,j)->setTextColor(Qt::white);
|
||||
}
|
||||
// else if(70 < c->getGrade() && c->getGrade() <= 80 )
|
||||
// courseTBL->item(i, j)->setBackground(Qt::darkGreen); //They Look Bad!!
|
||||
// else if(c->getGrade() > 80)
|
||||
// courseTBL->item(i, j)->setBackground(Qt::green);
|
||||
|
||||
j++;
|
||||
|
||||
courseTBL->setItem(i,j,addition);
|
||||
|
||||
}
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
calendarCourse::calendarCourse(int serial, QString name, QString type, QString lecturer, double points,
|
||||
double semesterHours, QString dayAndHour,
|
||||
QString room, calendarCourse::CourseCalendarType type) : Course(serial,name, type,points)
|
||||
QString room, calendarCourse::CourseCalendarType courseType) : Course(serial,name, type,points)
|
||||
{
|
||||
this->lecturer = lecturer;
|
||||
this->semesterHours = semesterHours;
|
||||
this->room = room;
|
||||
setDayAndHour(dayAndHour.type);
|
||||
setDayAndHour(dayAndHour,courseType);
|
||||
}
|
||||
/**
|
||||
* @brief calendarCourse::setDayAndHour
|
||||
* given a string of time and day - parsing it into day, hour it begins and hour it ends seperated
|
||||
* @param parse -
|
||||
*/
|
||||
void calendarCourse::setDayAndHour(QString parse, calendarCourse::CourseCalendarType type)
|
||||
void calendarCourse::setDayAndHour(QString parse, calendarCourse::CourseCalendarType courseType)
|
||||
{
|
||||
if (type == calendarCourse::CourseCalendarType::CoursesSchedule)
|
||||
if (courseType == calendarCourse::CourseCalendarType::CoursesSchedule)
|
||||
{
|
||||
int ctr = 0;
|
||||
QString temp = "";
|
||||
|
@ -48,7 +48,7 @@ void calendarCourse::setDayAndHour(QString parse, calendarCourse::CourseCalendar
|
|||
tok = strtok(NULL, " -");
|
||||
}
|
||||
}
|
||||
if (type == calendarCourse::CourseCalendarType::ExamSchedule)
|
||||
if (courseType == calendarCourse::CourseCalendarType::ExamSchedule)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
};
|
||||
calendarCourse(int serial, QString name, QString type, QString lecturer,
|
||||
double points, double semesterHours, QString dayAndHour,
|
||||
QString room, calendarCourse::CourseCalendarType type = calendarCourse::CourseCalendarType::CoursesSchedule);
|
||||
QString room, calendarCourse::CourseCalendarType courseType = calendarCourse::CourseCalendarType::CoursesSchedule);
|
||||
~calendarCourse(){}
|
||||
|
||||
int getDay() const;
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
void setDayAndHour(QString parse, CourseCalendarType type);
|
||||
void setDayAndHour(QString parse, CourseCalendarType courseType);
|
||||
|
||||
QString lecturer;
|
||||
double semesterHours;
|
||||
|
|
Loading…
Reference in a new issue