-
Notifications
You must be signed in to change notification settings - Fork 0
/
robot.h
52 lines (36 loc) · 1.15 KB
/
robot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef ROBOT_H
#define ROBOT_H
#include <QDateTime>
#include <QObject>
class ReservationModel;
class UsagerModel;
class StationModel;
class NoteModel;
class VehiculeModel;
class ReservationProxyModel;
class Usager;
class Robot : public QObject
{
Q_OBJECT
public:
explicit Robot(ReservationModel* rmodel,VehiculeModel* vmodel,StationModel* smodel,UsagerModel* umodel,NoteModel* nmodel,QObject *parent = 0);
void simulInitialise(QDateTime now);
bool tenteUneReservation(QDateTime debut,QDateTime fin,qint64 v,qint64 sDepart,qint64 sRetour);
bool tentePlusieursReservations(QDateTime debut,QDateTime fin,qint64 v,qint64 sDepart,qint64 sRetour, int nb);
void ajouteReservationAuHasard(QDateTime now);
void ajouteNotePersonnelleAuHasard(QDateTime now);
signals:
public slots:
void updateTime(QDateTime now);
private:
QDateTime last; // derniere fois qu'on a recu un updateTime()
// les modeles pour faire plein d'operations
ReservationModel *rmodel;
VehiculeModel* vmodel;
StationModel* smodel;
UsagerModel* umodel;
NoteModel* nmodel;
Usager* admin;
ReservationProxyModel* proxy;
};
#endif // ROBOT_H