| 1040 | |
| 1041 | |
| 1042 | void ByteView::mouseMoveEvent(QMouseEvent* event) |
| 1043 | { |
| 1044 | if (event->buttons() != Qt::LeftButton) |
| 1045 | return; |
| 1046 | int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2); |
| 1047 | int y = (event->pos().y() - 2) / m_render.getFontHeight(); |
| 1048 | if ((x == m_lastMouseX) && (y == m_lastMouseY)) |
| 1049 | return; |
| 1050 | m_lastMouseX = x; |
| 1051 | m_lastMouseY = y; |
| 1052 | m_cursorAddr = addressFromLocation(x, y); |
| 1053 | repositionCaret(); |
| 1054 | viewport()->update(); |
| 1055 | } |
| 1056 | |
| 1057 | |
| 1058 | ByteViewType::ByteViewType() : ViewType("Bytes", "Byte Overview") {} |