Projet TTPA (Table Tennis Performance Analyser)  1.3
BTS SN 2019
ttpaihm.h
Aller à la documentation de ce fichier.
1 #ifndef TTPAIHM_H
2 #define TTPAIHM_H
3 
4 #include <qglobal.h>
5 #include <QtWidgets>
6 
19 #define BLUETOOTH
20 //#define SIMULATION
21 
22 #define PERIODE_HORLOGE 1000 // en ms
23 #define TEMPS_IMPACT_ZONE 500 // en ms
24 
25 namespace Ui {
26 class TtpaIhm;
27 }
28 
40 class StatistiquesSeance;
42 
43 class TtpaIhm : public QWidget
44  {
45  Q_OBJECT
46 
47  public:
48  explicit TtpaIhm(QWidget *parent = nullptr);
49  ~TtpaIhm();
50 
51  private:
52  Ui::TtpaIhm *ui;
53  QTimer *timerHorloge;
55  QVector<QLabel *> zonesTable;
59 
60  #ifndef QT_NO_DEBUG_OUTPUT
61  QLineEdit *editNumeroZone;
62  #endif
63 
67  enum Page
68  {
69  PageAttente = 0,
72  NbPages
73  };
74  void rafraichirHeure();
75  void initialiserZone();
76  void raccourcisClavier();
77 
78  public slots:
79  void afficherHeure();
80  void afficherDureeSeance();
81  void afficherZone(int numeroZone, int nbImpacts, QString pourcentage);
82  void quitter();
83  void afficherBallesTotalEcranSeance(int nombreTotalDeBalle, int nombreTotalDeBalleTable);
84  void afficherImpactCouleurs(int numeroZone);
85  void effacerImpactZone();
86  void afficherBallesTotalHorsTable(int nombreTotalDeBalleHorsTable);
87  void afficherBallesBonnes(int nombreDeBallesBonnes);
88  void afficherStatistiqueEcranResultats();
89  void setZoneRobot(QString numeroZone);
90  void setZoneObjectif(QString numeroZone);
91  void recevoirNumeroZone(QString numeroZone);
92  void connecterJoueur(QString nomJoueur);
93  void deconnecterJoueur();
94  void commencerSeance(QString nomJoueur, QString zoneObjectif, QString zoneRobot);
95  void mettreEnPauseSeance();
96  void reprendreSeance();
97  void finirSeance();
98  void resetSeance();
99  #ifndef QT_NO_DEBUG_OUTPUT
100  void saisirNumeroZone(const QString);
101  void allerSuivant();
102  void revenirPrecedent();
103  #endif
104 
105  private slots:
106 
107  signals:
108 };
109 
110 #endif // TTPAIHM_H
StatistiquesSeance * statistiquesSeance
les statistiques d&#39;une séance
Definition: ttpaihm.h:56
QTimer * timerHorloge
temporisateur pour le rafraichissement de l&#39;heure
Definition: ttpaihm.h:53
int compteurDureeSeance
compteur de secondes pour la duréee d&#39;une séance
Definition: ttpaihm.h:54
QVector< QLabel * > zonesTable
vecteur pour les labels de zone
Definition: ttpaihm.h:55
Definition: ttpaihm.h:25
QLineEdit * editNumeroZone
pour la simulation d&#39;un impact de balle à partir du clavier numérique (mode debug) ...
Definition: ttpaihm.h:61
Definition: ttpaihm.h:70
Ui::TtpaIhm * ui
agrégation de la partie graphique de l&#39;IHM
Definition: ttpaihm.h:52
La fenêtre principale de l&#39;application.
Definition: ttpaihm.h:43
Page
Enumeration des fenetres de l&#39;IHM.
Definition: ttpaihm.h:67
Definition: ttpaihm.h:71
int numeroZoneImpacte
le numero de la zone qui a était impacté par la balle
Definition: ttpaihm.h:58
Assure la détection des périphériques TTPA, leur connexion (et déconnexion) et une communication (env...
Definition: ecran-TTPA/communicationbluetooth.h:29
CommunicationBluetooth * communicationBluetooth
pour communiquer en Bluetooth avec la tablette
Definition: ttpaihm.h:57
Definition: statistiquesseance.h:21