MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / mousePressEvent

Method mousePressEvent

examples/triage/byte.cpp:1025–1039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023
1024
1025void ByteView::mousePressEvent(QMouseEvent* event)
1026{
1027 if (event->button() != Qt::LeftButton)
1028 return;
1029 int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
1030 int y = (event->pos().y() - 2) / m_render.getFontHeight();
1031 m_lastMouseX = x;
1032 m_lastMouseY = y;
1033 m_cursorAddr = addressFromLocation(x, y);
1034 if ((event->modifiers() & Qt::ShiftModifier) == 0)
1035 selectNone();
1036 repositionCaret();
1037 if ((event->modifiers() & Qt::ShiftModifier) != 0)
1038 viewport()->update();
1039}
1040
1041
1042void ByteView::mouseMoveEvent(QMouseEvent* event)

Callers

nothing calls this directly

Calls 4

viewportFunction · 0.85
xMethod · 0.80
yMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected