tools/drawMapTest/drawmapscene.h
author unc0rr
Sat, 27 Nov 2010 23:55:39 +0300
changeset 4424 3225ea34e415
parent 4423 4391526e436e
child 4426 969e411c72aa
permissions -rw-r--r--
Some basic functionality
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
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     6
class DrawMapScene : public QGraphicsScene
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     7
{
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     8
Q_OBJECT
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
     9
public:
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    10
    explicit DrawMapScene(QObject *parent = 0);
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
signals:
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
public slots:
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
private:
4424
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    17
    qreal m_halfWidth;
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    18
    QPen m_pen;
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    19
    QBrush m_brush;
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    20
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    21
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    22
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    23
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
4424
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    24
3225ea34e415 Some basic functionality
unc0rr
parents: 4423
diff changeset
    25
    void drawFigure(const QPointF & point);
4423
4391526e436e Initial commit of the Draw Map Scene
unc0rr
parents:
diff changeset
    26
};
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
#endif // DRAWMAPSCENE_H