MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / event

Method event

gui/nwebview.cpp:363–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361
362
363bool NWebView::event(QEvent *event)
364{
365 if (event->type() == QEvent::KeyPress) {
366 QKeyEvent *ke = (QKeyEvent*)event;
367 if (ke->key() == Qt::Key_Tab) {
368 parent->tabPressed();
369 ke->accept();
370 return true;
371 }
372 if (ke->key() == Qt::Key_Backtab) {
373 parent->backtabPressed();
374 ke->accept();
375 return true;
376 }
377 if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) {
378 bool retval = parent->enterPressed();
379 if (retval) {
380 ke->accept();
381 return true;
382 }
383 }
384
385 }
386 if (event->type() == QEvent::MouseButtonDblClick) {
387 QLOG_DEBUG() << "DOUBLE CLICK!!!";
388 }
389 return QWebView::event(event);
390}
391
392
393

Callers

nothing calls this directly

Calls 5

typeMethod · 0.80
tabPressedMethod · 0.80
backtabPressedMethod · 0.80
acceptMethod · 0.45
enterPressedMethod · 0.45

Tested by

no test coverage detected