-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
139 lines (114 loc) · 3.25 KB
/
mainwindow.h
File metadata and controls
139 lines (114 loc) · 3.25 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtGui>
#include "vue.h"
class mainwindow : public QMainWindow
{
Q_OBJECT
public:
explicit mainwindow(QWidget *parent = 0);
// Mise en pause de la partie
void MettrePause();
void AfficheNbDeplacements();
// Réinitialise les paramètes par défaut de la souris
void ReInitSouris();
signals:
//void coordScene(int x, int y);
public slots:
void receiveCoord(QPointF);
void EnregistrerMouvementDansPile();
// Slots Fichier
void OuvrirFichier();
void Enregistrer();
void EnregistrerSous();
void Quitter();
// Slots jeu
void MettreEnPauseContinue();
void AfficherEtatFinal();
void Melanger();
void chrono();
void Annuler();
void Retablir();
// Slots zoom
void Zoom();
void Dezoom();
protected:
// Modifie l'event sur la croix fermer
virtual void closeEvent(QCloseEvent *Event);
private:
// Fonctions création du menu
void creerMenu();
void creerMenuActions();
void addActionToMenu();
void addActionToToolbar();
void creerRaccourciMenu();
void creerIconeMenu();
void creerInfo();
void creerMenuSlots();
void creerStatusBar();
// Création du dock Eléments
void creerDockElements();
// Toolbar
QToolBar *toolBarFichier;
QToolBar *toolBarJeu;
QToolBar *toolBarAffichage;
QToolBar *toolBarCoordonnees;
QStatusBar *barreEtat;
// Barres du menu
QMenu *menuFichier;
QMenu *menuJeu;
QMenu *menuAffichage;
// Actions menu Fichier
QAction *OpenAction;
QAction *SaveAction;
QAction *SaveAsAction;
QAction *QuitAction;
// Actions menu Jeu
QAction *UndoAction;
QAction *DoAction;
// Actions menu Affichage
QAction *ZoomAction;
QAction *DezoomAction;
// Scene
Vue *vue;
QPoint pos;
QMouseEvent *Event;
// Coordonnées
QLineEdit *CoordonneesX;
QLineEdit *CoordonneesY;
// Dock Eléments
QDockWidget *dockElements;
QTabWidget *tabElements;
QWidget *plateauElements;
QWidget *piecesElements;
QVBoxLayout *plateauLayout;
QPushButton *pauseButton;
QPushButton *melangeButton;
QPushButton *EtatFinalButton;
// Plateau du jeu
int LongueurPlateau;
int HauteurPlateau;
ClassPile pile;
ClassPile pileRetablir;
ClassConfigParser ConfigFile;
ClassListeSimple PlateauCourant;
LSC **PlateauTab;
ClassListeDeplacement listePiece;
ClassListeDeplacement listeArrivee;
t_coordonnees CoordonneesSelection;
char DernierePieceJouee;
bool SauvegardeEffectue;
bool Pause;
bool EtatFinalAffiche;
// Chronomètre
int secondes;
int minutes;
int heures;
QTimer *timer;
QLabel *label;
// Affichage
QLabel *nbDeplacements;
QString FichierOuvert;
};
#endif // MAINWINDOW_H