15#ifndef LUA_DEBUGGER_VARIABLES_H
16#define LUA_DEBUGGER_VARIABLES_H
28class QStandardItemModel;
34constexpr int Name = 0;
35constexpr int Value = 1;
36constexpr int Type = 2;
37constexpr int Count = 3;
60 void attach(QTreeView *tree, QStandardItemModel *model);
100 QHash<QString, LuaDbgTreeSectionExpansionState> &
expansionMap() {
return expansion_; }
106 const QHash<QString, LuaDbgTreeSectionExpansionState> &
expansionMap()
const {
return expansion_; }
132 QTreeView *tree_ =
nullptr;
135 QStandardItemModel *model_ =
nullptr;
138 QHash<QString, LuaDbgTreeSectionExpansionState> expansion_;
Top-level dialog hosting the Lua debugger UI components.
Definition lua_debugger_dialog.h:189
Variables panel: column sizing, expansion persistence, lazy child fill on expand, context menu,...
Definition lua_debugger_variables.h:45
void rebuildFromEngine()
Clear the model, re-fetch Locals/Globals/Upvalues from the engine, and re-apply persisted expansion.
Definition lua_debugger_variables.cpp:60
void onCollapsed(const QModelIndex &index)
Handles the event when a tree node is collapsed.
Definition lua_debugger_variables.cpp:340
void fetchAndAppend(QStandardItem *parent, const QString &path)
Append children of path under parent (or as new top-level rows when parent is null)....
Definition lua_debugger_variables.cpp:70
QStandardItem * findItemByPath(const QString &path) const
Finds a tree item based on its path.
Definition lua_debugger_variables.cpp:224
void showContextMenu(const QPoint &pos)
Displays the context menu for the variables tree.
Definition lua_debugger_variables.cpp:242
const QHash< QString, LuaDbgTreeSectionExpansionState > & expansionMap() const
Retrieves the read-only expansion state map.
Definition lua_debugger_variables.h:106
void restoreExpansionState() const
Re-expand Locals/Globals/Upvalues after a variables refresh.
Definition lua_debugger_variables.cpp:184
void attach(QTreeView *tree, QStandardItemModel *model)
Attaches the controller to the given tree view and model.
Definition lua_debugger_variables.cpp:38
QHash< QString, LuaDbgTreeSectionExpansionState > & expansionMap()
Retrieves the mutable expansion state map.
Definition lua_debugger_variables.h:100
void onExpanded(const QModelIndex &index)
Handles the event when a tree node is expanded.
Definition lua_debugger_variables.cpp:309
void configureColumns() const
Configures the tree view columns for the variables panel.
Definition lua_debugger_variables.cpp:46
Column indices for the Variables tree model.
Definition lua_debugger_variables.h:33