-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainwindow.hpp
More file actions
81 lines (67 loc) · 2.51 KB
/
Mainwindow.hpp
File metadata and controls
81 lines (67 loc) · 2.51 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
// -------------------------------------------------------------------------------------------- //
// ----- Fichier : MainWindow.hpp ----- //
// ----- Type : header ----- //
// ----- Auteur : Jérémy ----- //
// ----- Description : Permet de crée une fenêtre graphique ----- //
// -------------------------------------------------------------------------------------------- //
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets>
#include <QMainWindow>
#include <QLayout>
#include <QGraphicsView>
#include <QGroupBox>
#include <QPushButton>
#include <QSlider>
#include <QCheckBox>
#include <QLabel>
#include "Simulation.hpp"
#include "Statistiques.hpp"
class MainWindow : public QMainWindow {
Q_OBJECT
public:
// Constructeur et Destructeur
MainWindow(QWidget *parent = 0);
~MainWindow(){};
// Méthodes
QGroupBox *BuildGroupBoxControle();
void setValueSlider(int value, int i);
public slots:
void slot_pleinecran();
void slot_statistiques();
void slot_configuration();
private:
QWidget *widget_general; // widget principal
QGraphicsView *myview; // vue de la simulation
// ----- Layouts ---------------------------------------------------------------------------- //
QGroupBox *group_box;
QBoxLayout *box_layout;
QVBoxLayout *simu_controle1;
QVBoxLayout *simu_controle2;
QVBoxLayout *simu_controle3;
QVBoxLayout *box_control;
// ------------------------------------------------------------------------------------------ //
// ----- Création des contôles et de leurs labels respectifs -------------------------------- //
QLabel *nb_animaux_label;
QSlider *nb_animaux_simu;
QLabel *proportion_label;
QSlider *proportion_simu;
QLabel *vitesse_label;
QSlider *vitesse_simu;
QLabel *energie_label;
QSlider *energie_simu;
QLabel *tailleX_label;
QSlider *tailleX_simu;
QLabel *tailleY_label;
QSlider *tailleY_simu;
QPushButton *simulation_bouton;
QPushButton *statistiques;
QPushButton *config;
QCheckBox *plein_ecran;
QPushButton *quitter;
QLabel *signature;
// ------------------------------------------------------------------------------------------ //
Statistiques *statistiquesWindow; // Fenêtre de stats
Simulation *simulation; // Simulation
};
#endif