MaFenetre.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * MaFenetre.h
  3. * This file is part of ChronoCheckMate
  4. *
  5. * Copyright (C) 2010 - François Drouhard
  6. *
  7. * ChronoCheckMate is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * ChronoCheckMate is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with ChronoCheckMate; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor,
  20. * Boston, MA 02110-1301 USA
  21. */
  22. #ifndef DEF_MAFENETRE
  23. #define DEF_MAFENETRE
  24. #include <QWidget>
  25. class Chronometre;
  26. class QVBoxLayout;
  27. class QHBoxLayout;
  28. class QPushButton;
  29. class QLineEdit;
  30. class MaFenetre : public QWidget { // On hérite de QWidget (IMPORTANT)
  31. Q_OBJECT
  32. public:
  33. MaFenetre();
  34. void etatBoutons (bool bouton1 , bool bouton2 , bool bouton3 , bool bouton4);
  35. void modifierNomJoueurs ();
  36. private slots:
  37. void demarrer ();
  38. void switcher ();
  39. void init ();
  40. void arreter ();
  41. void definirNomJoueurs();
  42. void inverser ();
  43. private:
  44. void keyReleaseEvent (QKeyEvent * evenement);
  45. bool marche;
  46. //QGroupBox *groupChrono;
  47. QString nomJoueur1;
  48. QString nomJoueur2;
  49. Chronometre *chrono1;
  50. Chronometre *chrono2;
  51. QLineEdit *joueur1LineEdit;
  52. QLineEdit *joueur2LineEdit;
  53. QHBoxLayout *layoutChrono;
  54. QHBoxLayout *layoutBoutons;
  55. QVBoxLayout *layoutComplet;
  56. QPushButton *boutonQuitter;
  57. QPushButton *boutonDemarrer;
  58. QPushButton *boutonSwitch;
  59. QPushButton *boutonArreter;
  60. QPushButton *boutonInit;
  61. QPushButton *boutonInverser;
  62. QHBoxLayout *layoutBoutonSwitch;
  63. };
  64. #endif