QTfrontend/drawmapscene.h
changeset 6873 30840365af0a
parent 6781 23f627ba8ee9
child 6934 14a230552c2e
--- a/QTfrontend/drawmapscene.h	Mon Apr 09 22:01:13 2012 +0400
+++ b/QTfrontend/drawmapscene.h	Mon Apr 09 22:01:36 2012 +0400
@@ -24,7 +24,14 @@
 
 class QGraphicsPathItem;
 
-typedef QList<QPair<quint8, QList<QPoint> > > Paths;
+struct PathParams
+{
+    quint8 width;
+    bool erasing;
+    QList<QPoint> points;
+};
+
+typedef QList<PathParams> Paths;
 
 class DrawMapScene : public QGraphicsScene
 {
@@ -42,13 +49,16 @@
         void undo();
         void clearMap();
         void simplifyLast();
+        void setErasing(bool erasing);
 
     private:
         QPen m_pen;
+        QBrush m_eraser;
         QBrush m_brush;
         QGraphicsPathItem  * m_currPath;
         Paths paths;
         Paths oldPaths;
+        bool m_isErasing;
         QList<QGraphicsItem *> oldItems;
 
         virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);