MaFenetre.h 2.1 KB

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