Jeux d'echec
Programmation d'un jeux d'echec
 All Classes Files Functions Enumerations Enumerator
case_terrain.h
Go to the documentation of this file.
1 #ifndef CASE_TERRAIN_H
2 #define CASE_TERRAIN_H
3 
4 #include <QLabel>
5 #include "Definement.h"
6 class terrain;
7 
8 
9 class case_terrain : public QLabel
10 {
11  int m_couleurCase; // si la case est noir ou blanche
12  bool m_selected;
13  int m_x,m_y;
14  piece m_pieceSurLaCase;
15  terrain *m_monTerrain;
16  QPixmap m_imageCouleurCase;
17  QPixmap m_imagePiece;
18  Q_OBJECT
19 
20 public:
21  case_terrain(QLabel *parent = 0);
22  void setTerrain(terrain * mon_terrain);
23  void mousePressEvent ( QMouseEvent * event );
24  void resizeEvent ( QResizeEvent * event );
25  void setCouleur(int couleur);
26  void deselect();
27  void select();
28  void setPosition(int x,int y);
29  void setPiece(piece ma_piece,int groupe);
30  QPixmap superpositionImage(QPixmap base, QPixmap overlay);
31 
32 signals:
33  void clicked(int x,int y);
34 
35 };
36 
37 #endif // CASE_TERRAIN_H