Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
lua_debugger_error_frame.h
Go to the documentation of this file.
1/* lua_debugger_error_frame.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <[email protected]>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
15#ifndef LUA_DEBUGGER_ERROR_FRAME_H
16#define LUA_DEBUGGER_ERROR_FRAME_H
17
18#include <QFrame>
19
20namespace Ui
21{
23}
24
25class QKeyEvent;
26
30class LuaDebuggerErrorFrame : public QFrame
31{
32 Q_OBJECT
33
34public:
39 explicit LuaDebuggerErrorFrame(QWidget *parent = nullptr);
40
44 ~LuaDebuggerErrorFrame() override;
45
50 void setErrorMessage(const QString &message);
51
56 void setEditorStyleFont(const QFont &font);
57
61 void clearErrorContent();
62
67
68protected:
73 void keyPressEvent(QKeyEvent *event) override;
74
79 void resizeEvent(QResizeEvent *event) override;
80
85 void showEvent(QShowEvent *event) override;
86
87private:
88 Ui::LuaDebuggerErrorFrame *ui_;
93 void focusPrimaryControl();
94
99 void updateCompactHeight();
100};
101
102#endif // LUA_DEBUGGER_ERROR_FRAME_H
Inline error details bar for paused break-on-error states.
Definition lua_debugger_error_frame.h:31
void resizeEvent(QResizeEvent *event) override
Recalculates the compact height of the frame when its width changes.
Definition lua_debugger_error_frame.cpp:123
void keyPressEvent(QKeyEvent *event) override
Handles key-press events; closes the frame on Escape.
Definition lua_debugger_error_frame.cpp:118
void showEvent(QShowEvent *event) override
Schedules focus transfer to the primary control when the frame becomes visible.
Definition lua_debugger_error_frame.cpp:129
void setEditorStyleFont(const QFont &font)
Synchronises the error text box font with the Lua editor.
Definition lua_debugger_error_frame.cpp:89
void schedulePrimaryFocus()
After show(), move focus to the text box.
Definition lua_debugger_error_frame.cpp:110
void clearErrorContent()
Clears the displayed error message and resets the frame to its empty state.
Definition lua_debugger_error_frame.cpp:95
void setErrorMessage(const QString &message)
Displays message as the current Lua error text.
Definition lua_debugger_error_frame.cpp:82
~LuaDebuggerErrorFrame() override
Destroys the error frame and releases all owned resources.
Definition lua_debugger_error_frame.cpp:77