MaFenetre.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 <QtGui>
  25. #include <QObject>
  26. #include <QKeyEvent>
  27. #include "Chronometre.h"
  28. class MaFenetre : public QWidget { // On hérite de QWidget (IMPORTANT)
  29. Q_OBJECT
  30. public:
  31. MaFenetre();
  32. void etatBoutons (bool bouton1 , bool bouton2 , bool bouton3 , bool bouton4);
  33. private slots:
  34. void demarrer ();
  35. void switcher ();
  36. void init ();
  37. void arreter ();
  38. private:
  39. void keyReleaseEvent (QKeyEvent * evenement);
  40. bool marche;
  41. //QGroupBox *groupChrono;
  42. Chronometre *chrono1;
  43. Chronometre *chrono2;
  44. QHBoxLayout *layoutChrono;
  45. QHBoxLayout *layoutBoutons;
  46. QVBoxLayout *layoutComplet;
  47. QPushButton *boutonQuitter;
  48. QPushButton *boutonDemarrer;
  49. QPushButton *boutonSwitch;
  50. QPushButton *boutonArreter;
  51. QPushButton *boutonInit;
  52. QHBoxLayout *layoutBoutonSwitch;
  53. };
  54. #endif