12 #include <QGraphicsScene> 17 : QObject(parent), _numberOfECTS(nOE), _courseName(name), _termNumber(tN)
22 if(_numberOfECTS < 6 && _numberOfECTS > 2)
36 setBrush(QColor(153, 0, 0));
39 QGraphicsTextItem * courseName =
new QGraphicsTextItem(
this);
40 courseName->setPlainText(name);
41 courseName->adjustSize();
42 courseName->setDefaultTextColor(QColor(
"white"));
54 setPos(randomNumer,0);
61 setPos(x(),y()+moveValue);
64 QList <QGraphicsItem *> colliding_Items = collidingItems();
65 for (
int i=0, size=colliding_Items.size(); i<size; ++i) {
66 if (
typeid(*(colliding_Items[i])) ==
typeid(
Student)) {
GameSettings * _gameSettings
Lokalny uchwyt globalnych ustawień gry Lokalny uchwyt globalnych ustawień gry.
qreal _courseHeight
Wysokośc kursu.
void failedCourse(Course *pCourse)
Sygnał niezaliczenia kursu.
Modeuje pojęcie Studenta.
bool _onceMore
Flaga - czy kurs jest poprawiany.
~Course()
Desktruktor klasy Course.
int sceneHeight
Wysokość sceny (okienka z grą)
qreal _courseWidth
Szerokość kursu Szerokość kursu w pikselach.
void passedCourse(Course *pCourse)
Sygnał zdania kursu.
Course(GameSettings *gSettings, int nOE, QString name, int tN, QObject *parent=nullptr)
Konstruktor klasy Course.
Definuje ustawienia gryModeluje pojęcie ustawień gry, jako struktura odpowiednich pól...
int _numberOfECTS
Liczba punktów ECTS kursu Liczba punktów ECTS kursu.
int sceneWidth
Szerokość sceny (okienka z grą)
void setRandomPos()
Ustala losową pozycję kursu.