tools/drawMapTest/drawmapscene.h
author unc0rr
Sun, 28 Nov 2010 17:23:51 +0300
changeset 4426 969e411c72aa
parent 4424 3225ea34e415
child 4427 c5193713055f
permissions -rw-r--r--
Improve map editor a bit
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     1
#ifndef DRAWMAPSCENE_H
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     2
#define DRAWMAPSCENE_H
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 <QGraphicsScene>
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     5
4426
969e411c72aa Improve map editor a bit
unc0rr
parents: 4424
diff changeset
     6
class QGraphicsPathItem;
969e411c72aa Improve map editor a bit
unc0rr
parents: 4424
diff changeset
     7
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     8
class DrawMapScene : public QGraphicsScene
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     9
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    10
Q_OBJECT
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    11
public:
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    12
    explicit DrawMapScene(QObject *parent = 0);
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
signals:
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    15
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    16
public slots:
4426
969e411c72aa Improve map editor a bit
unc0rr
parents: 4424
diff changeset
    17
    void undo();
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    18
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    19
private:
4424
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    20
    QPen m_pen;
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    21
    QBrush m_brush;
4426
969e411c72aa Improve map editor a bit
unc0rr
parents: 4424
diff changeset
    22
    QGraphicsPathItem  * m_currPath;
4424
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    23
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    24
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    25
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    26
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    27
};
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    28
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    29
#endif // DRAWMAPSCENE_H