tools/drawMapTest/drawmapscene.h
changeset 4426 969e411c72aa
parent 4424 3225ea34e415
child 4427 c5193713055f
equal deleted inserted replaced
4425:2314bb0c433d 4426:969e411c72aa
     1 #ifndef DRAWMAPSCENE_H
     1 #ifndef DRAWMAPSCENE_H
     2 #define DRAWMAPSCENE_H
     2 #define DRAWMAPSCENE_H
     3 
     3 
     4 #include <QGraphicsScene>
     4 #include <QGraphicsScene>
       
     5 
       
     6 class QGraphicsPathItem;
     5 
     7 
     6 class DrawMapScene : public QGraphicsScene
     8 class DrawMapScene : public QGraphicsScene
     7 {
     9 {
     8 Q_OBJECT
    10 Q_OBJECT
     9 public:
    11 public:
    10     explicit DrawMapScene(QObject *parent = 0);
    12     explicit DrawMapScene(QObject *parent = 0);
    11 
    13 
    12 signals:
    14 signals:
    13 
    15 
    14 public slots:
    16 public slots:
       
    17     void undo();
    15 
    18 
    16 private:
    19 private:
    17     qreal m_halfWidth;
       
    18     QPen m_pen;
    20     QPen m_pen;
    19     QBrush m_brush;
    21     QBrush m_brush;
       
    22     QGraphicsPathItem  * m_currPath;
    20 
    23 
    21     virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    24     virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    22     virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    25     virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    23     virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    26     virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    24 
       
    25     void drawFigure(const QPointF & point);
       
    26 };
    27 };
    27 
    28 
    28 #endif // DRAWMAPSCENE_H
    29 #endif // DRAWMAPSCENE_H