#ifndef MERKATOR_INTERACTION_CREATEDOUBLEWAYINTERACTION_H
#define MERKATOR_INTERACTION_CREATEDOUBLEWAYINTERACTION_H

#include <ui_CreateDoubleWayDock.h>
#include "Interaction.h"

class MainWindow;
class Way;
class Way;

class QDockWidget;

class CreateDoubleWayInteraction : public Interaction
{
	Q_OBJECT

	public:
		CreateDoubleWayInteraction(MainWindow* Main, MapView* aView);
		~CreateDoubleWayInteraction();

		virtual void mousePressEvent(QMouseEvent * event);
		virtual void mouseMoveEvent(QMouseEvent* event);
		virtual void mouseReleaseEvent(QMouseEvent* event);
		virtual void paintEvent(QPaintEvent* anEvent, QPainter& thePainter);
		virtual QString toHtml();
#ifndef Q_OS_SYMBIAN
		virtual QCursor cursor() const;
#endif

	private:
		MainWindow* Main;
		QDockWidget* theDock;
		Ui::CreateDoubleWayDock DockData;
		QPoint LastCursor;
		Way* R1;
		Way* R2;
		Coord FirstPoint;
		double FirstDistance;
		bool HaveFirst;
		QHash<int, Coord> PreviousPoints;
};

#endif // INTERACTION\CREATEDOUBLEWAYINTERACTION_H
