/*
 * MaFenetre.h
 * This file is part of ChronoCheckMate
 *
 * Copyright (C) 2010 - François Drouhard
 *
 * ChronoCheckMate is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * ChronoCheckMate is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ChronoCheckMate; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifndef DEF_MAFENETRE
#define DEF_MAFENETRE
 

#include <QMainWindow>
class Chronometre;
class QVBoxLayout;
class QHBoxLayout;
class QPushButton;
class QLineEdit;
class Options;

class MaFenetre : public QMainWindow { // On hérite de QMainWindow (IMPORTANT)
	Q_OBJECT

	public:
	MaFenetre();
    void etatBoutons (bool etatBoutonStart , bool etatBoutonStop);
    void modifierNomJoueurs ();
    void modifierTemps();

	private slots:
	void demarrer ();
	void switcher ();
	void init ();
	void arreter ();
    void definirNomJoueurs();
    void inverser ();
	
	private:
	void keyReleaseEvent (QKeyEvent * evenement);

	bool marche;
    Options     *option;
	Chronometre *chrono1;
	Chronometre *chrono2;
    QLineEdit   *joueur1LineEdit;
    QLineEdit   *joueur2LineEdit;
    QHBoxLayout *layoutChrono;
	QHBoxLayout *layoutBoutons;
    QVBoxLayout *layoutComplet;
	QPushButton *boutonDemarrer;
    QPushButton *boutonArreter;
    QPushButton *boutonInverser;
    QHBoxLayout *layoutBoutonSwitch;


};

#endif