tools/drawMapTest/drawmapscene.cpp
author unc0rr
Sat, 27 Nov 2010 22:40:29 +0300
changeset 4423 4391526e436e
child 4424 3225ea34e415
permissions -rw-r--r--
Initial commit of the Draw Map Scene
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     1
#include <QDebug>
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     2
#include <QGraphicsSceneMouseEvent>
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     3
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     4
#include "drawmapscene.h"
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     5
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     6
DrawMapScene::DrawMapScene(QObject *parent) :
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     7
    QGraphicsScene(parent)
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     8
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     9
    setSceneRect(0, 0, 4096, 2048);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    10
}
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    11
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    12
void DrawMapScene::mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent)
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    13
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    14
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    15
    qDebug() << "move" << mouseEvent->scenePos();
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    16
}
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    17
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    18
void DrawMapScene::mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent)
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    19
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    20
    qDebug() << "press" << mouseEvent->scenePos();
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    21
}
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    22
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    23
void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    24
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    25
    qDebug() << "release" << mouseEvent->scenePos();
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    26
}