QTfrontend/drawmapscene.h
changeset 6781 23f627ba8ee9
parent 6700 e04da46ee43c
child 6873 30840365af0a
equal deleted inserted replaced
6780:166ee5275915 6781:23f627ba8ee9
    22 #include <QGraphicsScene>
    22 #include <QGraphicsScene>
    23 #include <QPainterPath>
    23 #include <QPainterPath>
    24 
    24 
    25 class QGraphicsPathItem;
    25 class QGraphicsPathItem;
    26 
    26 
    27 typedef QList<QList<QPoint> > Paths;
    27 typedef QList<QPair<quint8, QList<QPoint> > > Paths;
    28 
    28 
    29 class DrawMapScene : public QGraphicsScene
    29 class DrawMapScene : public QGraphicsScene
    30 {
    30 {
    31         Q_OBJECT
    31         Q_OBJECT
    32     public:
    32     public:
    52         QList<QGraphicsItem *> oldItems;
    52         QList<QGraphicsItem *> oldItems;
    53 
    53 
    54         virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    54         virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    55         virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    55         virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    56         virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    56         virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
       
    57         virtual void wheelEvent(QGraphicsSceneWheelEvent *);
    57 
    58 
    58         QPainterPath pointsToPath(const QList<QPoint> points);
    59         QPainterPath pointsToPath(const QList<QPoint> points);
       
    60 
       
    61         quint8 serializePenWidth(int width);
       
    62         int deserializePenWidth(quint8 width);
    59 };
    63 };
    60 
    64 
    61 #endif // DRAWMAPSCENE_H
    65 #endif // DRAWMAPSCENE_H