equal
deleted
inserted
replaced
38 QLinearGradient gradient(0, 0, 0, 2048); |
38 QLinearGradient gradient(0, 0, 0, 2048); |
39 gradient.setColorAt(0, QColor(60, 60, 155)); |
39 gradient.setColorAt(0, QColor(60, 60, 155)); |
40 gradient.setColorAt(1, QColor(155, 155, 60)); |
40 gradient.setColorAt(1, QColor(155, 155, 60)); |
41 setBackgroundBrush(QBrush(gradient)); |
41 setBackgroundBrush(QBrush(gradient)); |
42 |
42 |
43 m_pen.setWidth(72); |
43 m_pen.setWidth(76); |
44 m_pen.setJoinStyle(Qt::RoundJoin); |
44 m_pen.setJoinStyle(Qt::RoundJoin); |
45 m_pen.setCapStyle(Qt::RoundCap); |
45 m_pen.setCapStyle(Qt::RoundCap); |
46 m_currPath = 0; |
46 m_currPath = 0; |
47 } |
47 } |
48 |
48 |
100 } |
100 } |
101 } |
101 } |
102 |
102 |
103 void DrawMapScene::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent) |
103 void DrawMapScene::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent) |
104 { |
104 { |
105 if(wheelEvent->delta() > 0 && m_pen.width() < 512) |
105 if(wheelEvent->delta() > 0 && m_pen.width() < 516) |
106 m_pen.setWidth(m_pen.width() + 10); |
106 m_pen.setWidth(m_pen.width() + 10); |
107 else if(wheelEvent->delta() < 0 && m_pen.width() >= 12) |
107 else if(wheelEvent->delta() < 0 && m_pen.width() >= 16) |
108 m_pen.setWidth(m_pen.width() - 10); |
108 m_pen.setWidth(m_pen.width() - 10); |
109 |
109 |
110 if(m_currPath) |
110 if(m_currPath) |
111 { |
111 { |
112 m_currPath->setPen(m_pen); |
112 m_currPath->setPen(m_pen); |