/*******************************************************************************
*                                                                              *
* Société de Transports de Montréal.                                    	   *
* 2012                                                                         *
*                                                                              *
* 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.
 */

/* ************************************************************************** */
#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include <QString>
#include "CDVItem.h"
#include <QPainterPath>


#ifndef SWITCHCDVITEM_H
#define SWITCHCDVITEM_H

class CCDV;
class CSwitchCDV;

class CSwitchCDVItem : public CCDVItem
{
	Q_OBJECT

public:
	CSwitchCDVItem(CCDV *CDVPtr,QGraphicsItem *Parent = 0);

	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
	unsigned int SetParameters(QString Label/*, unsigned int posx, unsigned int posy*/);
	unsigned int SetState(unsigned int State);
//	unsigned int UpdateState();

protected:
//	virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent * event);
//	virtual void mousePressEvent ( QGraphicsSceneMouseEvent * event );
//	virtual void resizeEvent();

private:

	CSwitchCDV *mSwitchCDV;
	unsigned int mSwitchPosition;
	QPainterPath mNormalPainterPath, mReversedPainterPath;
    QRectF mNormalCDVRect;

//signals:
//	void CDVRightClicked(CCDVItem*);
};

#endif // SWITCHCDVITEM_H
