|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Centralised keyboard-shortcut dispatcher for the Lua debugger dialog's eventFilter().
More...
#include <lua_debugger_utils.h>
Public Member Functions | |
| LuaDebuggerKeyRouter (LuaDebuggerDialog *host) | |
| void | attach (Ui::LuaDebuggerDialog *ui, QTreeView *breakpointsTree) |
Wire the router to the dialog's Ui struct and breakpoints tree. Must be called once, after setupUi() and the programmatic-widget construction in LuaDebuggerDialog::buildAccordionUi. | |
| bool | reserveShortcutOverride (const QKeyEvent *ke) const |
Pre-empt a debugger-owned shortcut on QEvent::ShortcutOverride. | |
| bool | handleKeyPress (QObject *obj, const QKeyEvent *ke) |
Handle a QEvent::KeyPress delivered to the debugger UI. | |
Centralised keyboard-shortcut dispatcher for the Lua debugger dialog's eventFilter().
The debugger dialog observes key events delivered to any descendant widget so it can:
Lifetime: owned by the dialog; non-owning pointers to the dialog and its Ui struct (and the breakpoints tree view) are passed via attach() once the setupUi() pass has finished.
| bool LuaDebuggerKeyRouter::handleKeyPress | ( | QObject * | obj, |
| const QKeyEvent * | ke | ||
| ) |
Handle a QEvent::KeyPress delivered to the debugger UI.
true if the event has been consumed (caller's eventFilter should return true); false to fall through to QDialog::eventFilter. | bool LuaDebuggerKeyRouter::reserveShortcutOverride | ( | const QKeyEvent * | ke | ) | const |
Pre-empt a debugger-owned shortcut on QEvent::ShortcutOverride.
true if ke matches a shortcut the dialog wants to claim from the main window; the caller should accept() the event and return false from its eventFilter so Qt re-delivers the same key as a KeyPress to this dialog.