Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
lua_debugger_stack.h
Go to the documentation of this file.
1/* lua_debugger_stack.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_STACK_H
16#define LUA_DEBUGGER_STACK_H
17
18#include <QObject>
19
20#include "lua_debugger_utils.h"
21
23class QModelIndex;
24class QPoint;
25class QStandardItemModel;
26class QTreeView;
27
29namespace StackColumn
30{
31constexpr int Function = 0;
32constexpr int Location = 1;
33constexpr int Count = 2;
34} // namespace StackColumn
35
40class LuaDebuggerStackController : public QObject
41{
42 Q_OBJECT
43
44 public:
46
47 void attach(QTreeView *tree, QStandardItemModel *model);
48
49 void configureColumns() const;
50
52 void updateFromEngine();
53
57 int selectionLevel() const { return selectionLevel_; }
58
62 void setSelectionLevel(int level) { selectionLevel_ = level; }
63
64 public slots:
65 void onCurrentItemChanged(const QModelIndex &current, const QModelIndex &previous);
66 void onItemDoubleClicked(const QModelIndex &index);
67 void showContextMenu(const QPoint &pos);
68
69 private:
70 LuaDebuggerDialog *host_ = nullptr;
71 QTreeView *tree_ = nullptr;
72 QStandardItemModel *model_ = nullptr;
73 int selectionLevel_ = 0;
74};
75
76#endif
Top-level dialog hosting the Lua debugger UI components.
Definition lua_debugger_dialog.h:165
Stack trace panel: column layout, rebuild from the engine, selection → variables frame,...
Definition lua_debugger_stack.h:41
void updateFromEngine()
Rebuild rows from wslua_debugger_get_stack.
Definition lua_debugger_stack.cpp:58
void setSelectionLevel(int level)
Update the active stack frame index. Does not refresh anything; callers are expected to follow up wit...
Definition lua_debugger_stack.h:62
int selectionLevel() const
Stack frame index whose locals/upvalues currently drive the Variables and Watch panels (0 = topmost /...
Definition lua_debugger_stack.h:57
Column indices for the Stack Trace tree model.
Definition lua_debugger_stack.h:30