equal
deleted
inserted
replaced
134 } |
134 } |
135 } |
135 } |
136 |
136 |
137 void DrawMapScene::showCursor() |
137 void DrawMapScene::showCursor() |
138 { |
138 { |
139 qDebug() << "show cursor"; |
|
140 if(!m_isCursorShown) |
139 if(!m_isCursorShown) |
141 addItem(m_cursor); |
140 addItem(m_cursor); |
142 |
141 |
143 m_isCursorShown = true; |
142 m_isCursorShown = true; |
144 } |
143 } |
145 |
144 |
146 void DrawMapScene::hideCursor() |
145 void DrawMapScene::hideCursor() |
147 { |
146 { |
148 qDebug() << "hide cursor"; |
|
149 if(m_isCursorShown) |
147 if(m_isCursorShown) |
150 removeItem(m_cursor); |
148 removeItem(m_cursor); |
151 |
149 |
152 m_isCursorShown = false; |
150 m_isCursorShown = false; |
153 } |
151 } |
222 foreach(QPoint point, params.points) |
220 foreach(QPoint point, params.points) |
223 { |
221 { |
224 qint16 px = qToBigEndian((qint16)point.x()); |
222 qint16 px = qToBigEndian((qint16)point.x()); |
225 qint16 py = qToBigEndian((qint16)point.y()); |
223 qint16 py = qToBigEndian((qint16)point.y()); |
226 quint8 flags = 0; |
224 quint8 flags = 0; |
227 if(!cnt) flags = 0x80 + params.width; |
225 if(!cnt) |
228 if(params.erasing) flags |= 0x40; |
226 { |
|
227 flags = 0x80 + params.width; |
|
228 if(params.erasing) flags |= 0x40; |
|
229 } |
229 b.append((const char *)&px, 2); |
230 b.append((const char *)&px, 2); |
230 b.append((const char *)&py, 2); |
231 b.append((const char *)&py, 2); |
231 b.append((const char *)&flags, 1); |
232 b.append((const char *)&flags, 1); |
232 |
233 |
233 ++cnt; |
234 ++cnt; |