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

/* ************************************************************************** */
/* Revision:
### 20131104 JFM
	Verision d'origine.
	
### YYYYMMDD Description du besoin ou du bug
	Description du changement.
 */

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

#ifndef ZT2STATSZONE_H
#define ZT2STATSZONE_H
#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include <QGraphicsTextItem>
#include "ZTData.h"

class CZT2StatsZone : public QGraphicsWidget
{
	Q_OBJECT
public:
    CZT2StatsZone(QGraphicsItem *Parent);

//	unsigned int UpdateStats(unsigned int BogieCount, unsigned int S1Count, unsigned int S2Count, unsigned int FNCount, unsigned int Rank, unsigned int Bogie, unsigned int TrainType, float TrainSpeed);
    unsigned int Init(bool ModbusEnabled);
    unsigned int UpdateStats(CZT2ThreadData *DataPtr);
	unsigned int Reset();
	unsigned int SetLastActivationDateTime();
    unsigned int SetTrainParameters(int TrainType, QList<qint16> TrainComposition);

private:
    unsigned int mBogieCount,mS1Count,mActualRank, mTrainType;
	int mPIValue, mPEValue;
    bool mModbusEnabled;

    QGraphicsTextItem  *mBogieCountText, *mS1CountText,*mActualRankText, *mLastActivationDateTime, *mTrainCompoText, *mTrainTypeText;
};

#endif // ZT2STATSZONE_H
