/*******************************************************************************
*                                                                              *
* 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 STATUSBAR_H
#define STATUSBAR_H

#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include "LedWidget.h"
#include "EthConnWidget.h"

enum eZTStatus
{
    SB_ZT_ACTIVE_STATUS,
    SB_ZT_INACTIVE_STATUS,
    SB_ZT_NOT_PRESENT_STATUS,
	SB_ZT_DISABLED_STATUS,
    SB_ZT_MAX_STATUS
};

enum eModbusState
{
    SB_MODBUS_NOT_PRESENT,
    SB_MODBUS_DISCONNECTED,
    SB_MODBUS_CONNECTED
};

class CStatusBar : public QGraphicsWidget
{
	Q_OBJECT
public:
	CStatusBar(QGraphicsItem *Parent = 0);

	 void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
     unsigned int SetZT1Status(unsigned int Status);
     unsigned int SetZT2Status(unsigned int Status);
	 unsigned int SetNbPass(unsigned int Value);
	 unsigned int SetNbTriggers(unsigned int Value);
     unsigned int SetCCModbusState(unsigned int State);
     unsigned int SetSEIModbusState(unsigned int State);
     unsigned int SetHistorienModbusState(unsigned int State);

private:
	 QString mZT1StatusString, mZT2StatusString;
     unsigned int mZT1Status, mZT2Status;
	 unsigned int mNbTrainsPass, mNbTriggers;
     unsigned int mCCModbusState, mSEIModbusState, mHistoModbusState;
     CEthConnWidget mCCModbusONOFF, mSEIModbusONOFF, mHistorienModbusONOFF;
     //CLedWidget mCCModbusONOFF, mSEIModbusONOFF;

};

#endif // STATUSBAR_H
