+void MainWindow::customContextMenuRequested(QPoint pos)
+{
+ QMenu menu;
+ QModelIndex index = m_ui.callView->indexAt(pos);
+
+ callItemSelected(index);
+ if (!index.isValid())
+ return;
+
+ ApiTraceEvent *event =
+ index.data(ApiTraceModel::EventRole).value<ApiTraceEvent*>();
+ if (!event || event->type() != ApiTraceEvent::Call)
+ return;
+
+ menu.addAction(QIcon(":/resources/media-record.png"),
+ tr("Lookup state"), this, SLOT(lookupState()));
+ menu.addAction(tr("Edit"), this, SLOT(editCall()));
+
+ menu.exec(QCursor::pos());
+}
+
+void MainWindow::editCall()
+{
+ if (m_selectedEvent && m_selectedEvent->type() == ApiTraceEvent::Call) {
+ ApiTraceCall *call = static_cast<ApiTraceCall*>(m_selectedEvent);
+ m_argsEditor->setCall(call);
+ m_argsEditor->show();
+ }
+}
+