Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
LuaDebuggerVariablesController Class Reference

Variables panel: column sizing, expansion persistence, lazy child fill on expand, context menu, and selection helpers. More...

#include <lua_debugger_variables.h>

Inheritance diagram for LuaDebuggerVariablesController:

Public Slots

void showContextMenu (const QPoint &pos)
 Displays the context menu for the variables tree.
 
void onExpanded (const QModelIndex &index)
 Handles the event when a tree node is expanded.
 
void onCollapsed (const QModelIndex &index)
 Handles the event when a tree node is collapsed.
 

Public Member Functions

 LuaDebuggerVariablesController (LuaDebuggerDialog *host)
 Constructs a new LuaDebuggerVariablesController object.
 
void attach (QTreeView *tree, QStandardItemModel *model)
 Attaches the controller to the given tree view and model.
 
void configureColumns () const
 Configures the tree view columns for the variables panel.
 
void restoreExpansionState () const
 Re-expand Locals/Globals/Upvalues after a variables refresh.
 
void rebuildFromEngine ()
 Clear the model, re-fetch Locals/Globals/Upvalues from the engine, and re-apply persisted expansion.
 
void fetchAndAppend (QStandardItem *parent, const QString &path)
 Append children of path under parent (or as new top-level rows when parent is null). Used by rebuildFromEngine for the initial Locals/Globals/Upvalues fetch and by onExpanded for lazy descent into nested tables. Reaches back to the dialog for change-highlight baselines and the active stack frame.
 
QStandardItem * findItemByPath (const QString &path) const
 Finds a tree item based on its path.
 
QHash< QString, LuaDbgTreeSectionExpansionState > & expansionMap ()
 Retrieves the mutable expansion state map.
 
const QHash< QString, LuaDbgTreeSectionExpansionState > & expansionMap () const
 Retrieves the read-only expansion state map.
 

Detailed Description

Variables panel: column sizing, expansion persistence, lazy child fill on expand, context menu, and selection helpers.

Constructor & Destructor Documentation

◆ LuaDebuggerVariablesController()

LuaDebuggerVariablesController::LuaDebuggerVariablesController ( LuaDebuggerDialog host)
explicit

Constructs a new LuaDebuggerVariablesController object.

Parameters
hostPointer to the hosting Lua debugger dialog.

Member Function Documentation

◆ attach()

void LuaDebuggerVariablesController::attach ( QTreeView *  tree,
QStandardItemModel *  model 
)

Attaches the controller to the given tree view and model.

Parameters
treePointer to the tree view for displaying variables.
modelPointer to the item model for variables.

◆ expansionMap() [1/2]

QHash< QString, LuaDbgTreeSectionExpansionState > & LuaDebuggerVariablesController::expansionMap ( )
inline

Retrieves the mutable expansion state map.

Returns
Reference to the hash map storing tree section expansion states.

◆ expansionMap() [2/2]

const QHash< QString, LuaDbgTreeSectionExpansionState > & LuaDebuggerVariablesController::expansionMap ( ) const
inline

Retrieves the read-only expansion state map.

Returns
Const reference to the hash map storing tree section expansion states.

◆ fetchAndAppend()

void LuaDebuggerVariablesController::fetchAndAppend ( QStandardItem *  parent,
const QString &  path 
)

Append children of path under parent (or as new top-level rows when parent is null). Used by rebuildFromEngine for the initial Locals/Globals/Upvalues fetch and by onExpanded for lazy descent into nested tables. Reaches back to the dialog for change-highlight baselines and the active stack frame.

Parameters
parentThe parent standard item to append to, or nullptr for top-level.
pathThe path string indicating the variable to fetch.

◆ findItemByPath()

QStandardItem * LuaDebuggerVariablesController::findItemByPath ( const QString &  path) const

Finds a tree item based on its path.

Parameters
pathThe path of the item to find.
Returns
Pointer to the found QStandardItem, or nullptr if not found.

◆ onCollapsed

void LuaDebuggerVariablesController::onCollapsed ( const QModelIndex &  index)
slot

Handles the event when a tree node is collapsed.

Parameters
indexThe model index of the collapsed item.

◆ onExpanded

void LuaDebuggerVariablesController::onExpanded ( const QModelIndex &  index)
slot

Handles the event when a tree node is expanded.

Parameters
indexThe model index of the expanded item.

◆ showContextMenu

void LuaDebuggerVariablesController::showContextMenu ( const QPoint &  pos)
slot

Displays the context menu for the variables tree.

Parameters
posThe point where the context menu should be displayed.

The documentation for this class was generated from the following files: