-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneral.h
More file actions
84 lines (63 loc) · 2.02 KB
/
Copy pathgeneral.h
File metadata and controls
84 lines (63 loc) · 2.02 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef GENERAL_H
#define GENERAL_H
#include <QList>
#include <QRandomGenerator>
#include <QDateTime>
#include "donneeparticule.h"
#include "donneereaction.h"
/*
* [General]
*
* Contient toutes les variables globales à tout les objets
* Un seul objet de cette classe est créé dans MainWindow et son pointeur est transmis à tout les objets en ayant besoin
*/
class General
{
public:
General();
void setTout(General change);
General* creerCopie();
void vider(); //Supprime toutes les DonneeParticule et les DonneeReaction
bool getPH() const;
void setPH(bool value);
DonneeParticule* getParticule(int index) const;
void setParticule(int index, const DonneeParticule &value);
void addParticule(const DonneeParticule &value);
int nombreParticule() const;
DonneeReaction* getReaction(int index) const;
void setReaction(int index, const DonneeReaction &value);
void addReaction(const DonneeReaction &value);
int nombreReaction() const;
QRandomGenerator* getAleatoire() const;
bool getChangementRecent() const;
void setChangementRecent(bool value);
int getIndexH3O() const;
int getIndexHO() const;
QList<DonneeParticule *> getParticules() const;
QList<DonneeReaction *> getReactions() const;
QString getNomDeFichier() const;
void setNomDeFichier(const QString &value);
bool getPossedeUnFichier() const;
void setPossedeUnFichier(bool value);
QString getNom() const;
void setNom(const QString &value);
QString getDescription() const;
void setDescription(const QString &value);
private:
//Mode
bool pH;
int indexH3O;
int indexHO;
//Données
QList<DonneeParticule*> particules;
QList<DonneeReaction*> reactions;
bool changementRecent;
//Divers
QRandomGenerator *aleatoire;
//Fichiers
QString nomDeFichier;
bool possedeUnFichier;
QString nom;
QString description;
};
#endif // GENERAL_H