calendar tooltip
This commit is contained in:
parent
3d826864d2
commit
b1957f7f56
|
@ -147,3 +147,22 @@ void calendarCourse::setPoints(double value)
|
||||||
{
|
{
|
||||||
points = value;
|
points = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double points;
|
||||||
|
QString lecturer;
|
||||||
|
double semesterHours;
|
||||||
|
int day;
|
||||||
|
int hourBegin;
|
||||||
|
int minutesBegin;
|
||||||
|
int hourEnd;
|
||||||
|
int minutesEnd;
|
||||||
|
QString room;
|
||||||
|
|
||||||
|
QString calendarCourse::toString()
|
||||||
|
{
|
||||||
|
QTime begin,end;
|
||||||
|
begin.setHMS(hourBegin,minutesBegin,0);
|
||||||
|
end.setHMS(hourEnd,minutesEnd,0);
|
||||||
|
return QString("%1 %2 %3\n%4 %5\n%6 - %7").arg(QString::number(this->getSerialNum()),this->getName(),QString::number(this->points),this->getLecturer(),this->getRoom(),
|
||||||
|
begin.toString("hh:mm"),end.toString(("hh:mm")));
|
||||||
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
int getMinutesBegin() const;
|
int getMinutesBegin() const;
|
||||||
int getHourEnd() const;
|
int getHourEnd() const;
|
||||||
int getMinutesEnd() const;
|
int getMinutesEnd() const;
|
||||||
double getPoints() const;
|
double getPoints() const;
|
||||||
|
|
||||||
void setDay(const QString &value);
|
void setDay(const QString &value);
|
||||||
void setLecturer(const QString &value);
|
void setLecturer(const QString &value);
|
||||||
|
@ -59,6 +59,8 @@ public:
|
||||||
void setMinutesEnd(int value);
|
void setMinutesEnd(int value);
|
||||||
void setPoints(double value);
|
void setPoints(double value);
|
||||||
|
|
||||||
|
QString toString();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void setDayAndHour(QString parse);
|
void setDayAndHour(QString parse);
|
||||||
|
|
|
@ -83,6 +83,7 @@ void calendarSchedule::insertCourseIntoTable()
|
||||||
|
|
||||||
|
|
||||||
item = new QTableWidgetItem(courseString);
|
item = new QTableWidgetItem(courseString);
|
||||||
|
item->setToolTip(coursePtr->toString());
|
||||||
if (this->takeItem(row,col) != NULL)
|
if (this->takeItem(row,col) != NULL)
|
||||||
delete this->takeItem(row,col);
|
delete this->takeItem(row,col);
|
||||||
this->setItem(row,col,item);
|
this->setItem(row,col,item);
|
||||||
|
|
Loading…
Reference in a new issue