MaFenetre.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <QMainWindow>
  25. class Chronometre;
  26. class QVBoxLayout;
  27. class QHBoxLayout;
  28. class QPushButton;
  29. class QLineEdit;
  30. class Options;
  31. class MaFenetre : public QMainWindow { // On hérite de QMainWindow (IMPORTANT)
  32. Q_OBJECT
  33. public:
  34. MaFenetre();
  35. void etatBoutons (bool etatBoutonStart , bool etatBoutonStop, bool etatBoutonInverser);
  36. private slots:
  37. void demarrer ();
  38. void switcher ();
  39. void init ();
  40. void arreter ();
  41. void lancerDialogueOptions();
  42. void inverser ();
  43. void changerCouleur ();
  44. void afficheGagnant();
  45. private:
  46. void keyReleaseEvent (QKeyEvent * evenement);
  47. bool marche;
  48. Options *option;
  49. Chronometre *chrono1;
  50. Chronometre *chrono2;
  51. QLineEdit *joueur1LineEdit;
  52. QLineEdit *joueur2LineEdit;
  53. QHBoxLayout *layoutChrono;
  54. QHBoxLayout *layoutBoutons;
  55. QVBoxLayout *layoutComplet;
  56. QPushButton *boutonDemarrer;
  57. QPushButton *boutonArreter;
  58. QPushButton *boutonInverser;
  59. QPushButton *boutonChangerCouleur;
  60. QHBoxLayout *layoutBoutonSwitch;
  61. };
  62. #endif