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

Stack trace panel: column layout, rebuild from the engine, selection → variables frame, open-source gestures, and context menu. More...

#include <lua_debugger_stack.h>

Inheritance diagram for LuaDebuggerStackController:

Public Slots

void onCurrentItemChanged (const QModelIndex &current, const QModelIndex &previous)
 Handles the event when the current item in the stack tree changes.
 
void onItemDoubleClicked (const QModelIndex &index)
 Handles the event when an item in the stack tree is double-clicked.
 
void showContextMenu (const QPoint &pos)
 Displays the context menu for the stack tree.
 

Public Member Functions

 LuaDebuggerStackController (LuaDebuggerDialog *host)
 Constructs a new LuaDebuggerStackController 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 stack trace panel.
 
void updateFromEngine ()
 Rebuild rows from wslua_debugger_get_stack.
 
int selectionLevel () const
 Stack frame index whose locals/upvalues currently drive the Variables and Watch panels (0 = topmost / paused frame). Owned here because every panel that needs it is downstream of stack selection.
 
void setSelectionLevel (int level)
 Update the active stack frame index. Does not refresh anything; callers are expected to follow up with the appropriate variable/watch refresh.
 

Detailed Description

Stack trace panel: column layout, rebuild from the engine, selection → variables frame, open-source gestures, and context menu.

Constructor & Destructor Documentation

◆ LuaDebuggerStackController()

LuaDebuggerStackController::LuaDebuggerStackController ( LuaDebuggerDialog host)
explicit

Constructs a new LuaDebuggerStackController object.

Parameters
hostPointer to the hosting Lua debugger dialog.

Member Function Documentation

◆ attach()

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

Attaches the controller to the given tree view and model.

Parameters
treePointer to the tree view displaying the stack.
modelPointer to the item model storing the stack data.

◆ onCurrentItemChanged

void LuaDebuggerStackController::onCurrentItemChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
slot

Handles the event when the current item in the stack tree changes.

Parameters
currentThe newly selected model index.
previousThe previously selected model index.

◆ onItemDoubleClicked

void LuaDebuggerStackController::onItemDoubleClicked ( const QModelIndex &  index)
slot

Handles the event when an item in the stack tree is double-clicked.

Parameters
indexThe model index of the double-clicked item.

◆ selectionLevel()

int LuaDebuggerStackController::selectionLevel ( ) const
inline

Stack frame index whose locals/upvalues currently drive the Variables and Watch panels (0 = topmost / paused frame). Owned here because every panel that needs it is downstream of stack selection.

Returns
The currently selected stack level.

◆ setSelectionLevel()

void LuaDebuggerStackController::setSelectionLevel ( int  level)
inline

Update the active stack frame index. Does not refresh anything; callers are expected to follow up with the appropriate variable/watch refresh.

Parameters
levelThe new stack selection level.

◆ showContextMenu

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

Displays the context menu for the stack tree.

Parameters
posThe point where the context menu should be displayed.

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