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

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

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

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

class CZT1StatsZone : public QGraphicsWidget
{
	Q_OBJECT
public:
	CZT1StatsZone(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 UpdateStats(CZT1ThreadData *DataPtr);
    unsigned int SetTrainParameters(int TrainType, QList<qint16> TrainComposition);
	unsigned int Reset();
	unsigned int SetLastActivationDateTime();
    unsigned int Init(bool ModbusEnabled);

private:
	unsigned int mBogieCount,mS1Count,mS2Count,mFNCount,mActualRank,mActualBogie,mTrainType;
	float mTrainSpeed;
	int mPIValue, mPEValue;
    bool mModbusEnabled;

    QGraphicsTextItem *mTrainSpeedText, *mBogieCountText, *mS1CountText, *mS2CountText, *mFNCountText, *mActualRankText, *mActualBogieText, *mTrainTypeText, *mTrainCompositionText, *mPIValueText, *mPEValueText, *mLastActivationDateTime;
};

#endif // ZT1STATSZONE_H
