# HG changeset patch # User unc0rr # Date 1290886829 -10800 # Node ID 4391526e436e38d65f6cf329d36442f9f9351db9 # Parent 5e8cfef25ccbd602b500ed9df5c467af68af9f53 Initial commit of the Draw Map Scene diff -r 5e8cfef25ccb -r 4391526e436e tools/drawMapTest/drawmapscene.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/drawMapTest/drawmapscene.cpp Sat Nov 27 22:40:29 2010 +0300 @@ -0,0 +1,26 @@ +#include +#include + +#include "drawmapscene.h" + +DrawMapScene::DrawMapScene(QObject *parent) : + QGraphicsScene(parent) +{ + setSceneRect(0, 0, 4096, 2048); +} + +void DrawMapScene::mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent) +{ + + qDebug() << "move" << mouseEvent->scenePos(); +} + +void DrawMapScene::mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent) +{ + qDebug() << "press" << mouseEvent->scenePos(); +} + +void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent) +{ + qDebug() << "release" << mouseEvent->scenePos(); +} diff -r 5e8cfef25ccb -r 4391526e436e tools/drawMapTest/drawmapscene.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/drawMapTest/drawmapscene.h Sat Nov 27 22:40:29 2010 +0300 @@ -0,0 +1,22 @@ +#ifndef DRAWMAPSCENE_H +#define DRAWMAPSCENE_H + +#include + +class DrawMapScene : public QGraphicsScene +{ +Q_OBJECT +public: + explicit DrawMapScene(QObject *parent = 0); + +signals: + +public slots: + +private: + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent); + virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent); +}; + +#endif // DRAWMAPSCENE_H