MCPcopy Create free account
hub / github.com/clementgallet/libTAS / mouseDoubleClickEvent

Method mouseDoubleClickEvent

src/program/ui/RamWatchView.cpp:82–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void RamWatchView::mouseDoubleClickEvent(QMouseEvent *event)
83{
84 const QModelIndex index = indexAt(event->pos());
85 if (!index.isValid()) {
86 return QTableView::mouseDoubleClickEvent(event);
87 }
88 if (index.column() != 0)
89 return QTableView::mouseDoubleClickEvent(event);
90
91 int row = index.row();
92
93 /* Fill and show the watch edit window */
94 RamWatchEditWindow *window = ensureEditWindow();
95 window->fill(ramWatchModel->ramwatches.at(row));
96 window->exec();
97
98 /* Modify the watch */
99 if (window->ramwatch) {
100 ramWatchModel->ramwatches[row] = std::move(window->ramwatch);
101 ramWatchModel->update();
102 }
103
104 event->accept();
105}
106
107void RamWatchView::slotAdd()
108{

Callers

nothing calls this directly

Calls 5

columnMethod · 0.80
fillMethod · 0.80
isValidMethod · 0.45
atMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected