Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
lua_debugger_goto_line_frame.h
Go to the documentation of this file.
1/* lua_debugger_goto_line_frame.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
15#ifndef LUA_DEBUGGER_GOTO_LINE_FRAME_H
16#define LUA_DEBUGGER_GOTO_LINE_FRAME_H
17
18#include <QPointer>
19
20#include "accordion_frame.h"
21
22class QKeyEvent;
23class QPlainTextEdit;
24
25namespace Ui
26{
28}
29
34{
35 Q_OBJECT
36
37 public:
42 explicit LuaDebuggerGoToLineFrame(QWidget *parent = nullptr);
43
48
53 void setTargetEditor(QPlainTextEdit *editor);
54
57
60
61 protected:
66 void keyPressEvent(QKeyEvent *event) override;
67
68 private:
70 Ui::LuaDebuggerGoToLineFrame *ui_;
71
73 QPointer<QPlainTextEdit> editor_;
74
78 void focusLineField();
79
80 private slots:
84 void on_goButton_clicked();
85
89 void on_cancelButton_clicked();
90};
91
92#endif // LUA_DEBUGGER_GOTO_LINE_FRAME_H
A QFrame that shows and hides itself with a slide animation.
Definition accordion_frame.h:21
Inline "go to line" bar for the Lua debugger code editor (AccordionFrame).
Definition lua_debugger_goto_line_frame.h:34
void scheduleLineFieldFocus()
After animatedShow(), move focus to the line field (call from dialog).
Definition lua_debugger_goto_line_frame.cpp:85
void keyPressEvent(QKeyEvent *event) override
Handles key press events for the frame.
Definition lua_debugger_goto_line_frame.cpp:93
void syncLineFieldFromEditor()
Set the line field from the current editor cursor (before animatedShow).
Definition lua_debugger_goto_line_frame.cpp:72
void setTargetEditor(QPlainTextEdit *editor)
Sets the target editor for the go to line frame.
Definition lua_debugger_goto_line_frame.cpp:51
~LuaDebuggerGoToLineFrame() override
Destroys the LuaDebuggerGoToLineFrame object.
Definition lua_debugger_goto_line_frame.cpp:49