MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / contextMemWidget

Method contextMemWidget

gui/qt/memorywidget.cpp:260–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void MainWindow::contextMemWidget(const QPoint &pos, uint32_t address) {
261 QString addr = int2hex(address, 6);
262
263 QMenu menu;
264 QAction *copyAddr = menu.addAction(ACTION_COPY_ADDR + QStringLiteral(" '") + addr + QStringLiteral("'"));
265 menu.addSeparator();
266 QAction *toggleBreak = menu.addAction(ACTION_TOGGLE_BREAK);
267 QAction *toggleRead = menu.addAction(ACTION_TOGGLE_READ);
268 QAction *toggleWrite = menu.addAction(ACTION_TOGGLE_WRITE);
269 QAction *toggleReadWrite = menu.addAction(ACTION_TOGGLE_RW);
270 menu.addSeparator();
271 QAction *gotoDisasm = gotoDisasmAction(&menu);
272
273 QAction* item = menu.exec(pos);
274 if (item == copyAddr) {
275 qApp->clipboard()->setText(addr.toLatin1());
276 } else if (item == gotoDisasm) {
277 gotoDisasmAddr(address);
278 } else if (item == toggleBreak) {
279 breakAdd(breakNextLabel(), address, true, true, false);
280 memDocksUpdate();
281 } else if (item == toggleRead) {
282 watchAdd(watchNextLabel(), address, address, DBG_MASK_READ, true, false);
283 memDocksUpdate();
284 } else if (item == toggleWrite) {
285 watchAdd(watchNextLabel(), address, address, DBG_MASK_WRITE, true, false);
286 memDocksUpdate();
287 } else if (item == toggleReadWrite) {
288 watchAdd(watchNextLabel(), address, address, DBG_MASK_READ | DBG_MASK_WRITE, true, false);
289 memDocksUpdate();
290 }
291}

Callers

nothing calls this directly

Calls 1

int2hexFunction · 0.85

Tested by

no test coverage detected