#include "mPathItem.h"
#include <QGraphicsSceneMouseEvent>

void mPathItem::mPathItemInit()
{
	index = 0;
	clicked = 0;
	setAcceptedMouseButtons(Qt::LeftButton);
}

void mPathItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
	clicked = 1;
	QGraphicsPathItem::mousePressEvent(event);
}

void mPathItem::init(int _index)
{
	index = _index;
}

int mPathItem::wasClicked()
{
	int res = clicked;
	clicked = 0;
	return res;
}

