/*******************************************************************************
*                                                                              *
* Société de Transports de Montréal.                                    	   *
* 2012                                                                         *
*                                                                              *
* Projet Zones Tests                                                           *
*                                                                              *
*                                                                              *
*                                                                              *
*******************************************************************************/
/*
    Description:
    Description du fichier si nécessaire.

*/

/* ************************************************************************** */
/* Revision:
### 20131122 JFM
    Verision d'origine.

### YYYMMDD Description du besoin ou du bug
    Description du changement.
 */

/* ************************************************************************** */


#ifndef GENERALSETTINGSPAGE_H
#define GENERALSETTINGSPAGE_H

#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include "Guipage.h"
#include <QString>
#include "PushButton.h"
#include "ZTSimulator.h"
#include "TextButtonWidget.h"
#include <QCalendarWidget>
#include <QTimeEdit>
#include <QSpinBox>
#include <QCheckBox>


class CZoneTest;

class CGeneralSettingsPage : public CGuiPage
{
Q_OBJECT
public:
	CGeneralSettingsPage(QGraphicsWidget *Parent = 0);

	CZoneTest *mProgramHandle;

    void UseNetworkTime(bool UseNetworkTime, bool DisableSignal = false);
	virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
	virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
	virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
	virtual void showEvent ( QShowEvent * event );


private:
	QGraphicsRectItem *mBackgroundRect;
    CTextButtonWidget *mCancelButton;
	CTextButtonWidget *mApplyDateTimeBtn;

	QCalendarWidget *mCalendarWidget;
	QTimeEdit *mTimeEdit;



    QSpinBox *mPGTresholdValueSpinBox;
    CTextButtonWidget *mPGValueSetBtn;
    QGraphicsTextItem *mActualPGTresholdValueText;
    QCheckBox *mUseNetworkTimeChkBx;


public slots:
	void ButtonClicked(CTextButtonWidget *);
    void NetworkTimeChkBxClicked(int);

};

#endif // GENERALSETTINGSPAGE_H
