Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
LuaDbgWatchTreeWidget Class Reference

Watch tree: top-level reorder only; nested rows are not drop targets. More...

#include <lua_debugger_watch.h>

Inheritance diagram for LuaDbgWatchTreeWidget:

Signals

void requestNewRow ()
 Emitted on double-click on an empty tree area to insert a new pending row.
void requestRemoveAll ()
 Emitted on Ctrl+Shift+K with at least one row present to confirm and clear all rows.
void requestCopyValue (QStandardItem *item, const QModelIndex &index)
 Emitted on Ctrl+Shift+C to request a value copy for the given item.
void requestDuplicateRoot (QStandardItem *item)
 Emitted on Ctrl+Shift+D to request duplication of a top-level item.
void requestDeleteRows (const QList< QStandardItem * > &items)
 Emitted on Delete or Backspace to remove the specified top-level rows.

Public Member Functions

 LuaDbgWatchTreeWidget (LuaDebuggerFontPolicy *fontPolicy, QWidget *parent)
 Constructs the watch tree widget.

Protected Member Functions

void startDrag (Qt::DropActions supportedActions) override
 Initiates a drag operation for top-level row reordering.
void dragMoveEvent (QDragMoveEvent *event) override
 Validates and constrains drag-move events to top-level drop targets only.
void dropEvent (QDropEvent *event) override
 Handles drop events, restricting reordering to top-level rows.
void mouseDoubleClickEvent (QMouseEvent *event) override
 Inserts a new pending row when the user double-clicks on empty space.
void keyPressEvent (QKeyEvent *event) override
 Handles watch-local keyboard shortcuts (remove-all, copy, duplicate, delete, inline edit). The dialog's ShortcutOverride filter still claims shortcuts that overlap main-window actions; this handler runs on KeyPress once Qt has dispatched the key to the focused widget.

Detailed Description

Watch tree: top-level reorder only; nested rows are not drop targets.

Constructor & Destructor Documentation

◆ LuaDbgWatchTreeWidget()

LuaDbgWatchTreeWidget::LuaDbgWatchTreeWidget ( LuaDebuggerFontPolicy * fontPolicy,
QWidget * parent )

Constructs the watch tree widget.

Parameters
fontPolicyRequired so the tree can re-seat panel fonts after a layout-changing drag-drop reorder.
parentThe QWidget parent.

Member Function Documentation

◆ dragMoveEvent()

void LuaDbgWatchTreeWidget::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected

Validates and constrains drag-move events to top-level drop targets only.

Parameters
eventThe drag move event to handle.

◆ dropEvent()

void LuaDbgWatchTreeWidget::dropEvent ( QDropEvent * event)
overrideprotected

Handles drop events, restricting reordering to top-level rows.

Parameters
eventThe drop event to handle.

◆ keyPressEvent()

void LuaDbgWatchTreeWidget::keyPressEvent ( QKeyEvent * event)
overrideprotected

Handles watch-local keyboard shortcuts (remove-all, copy, duplicate, delete, inline edit). The dialog's ShortcutOverride filter still claims shortcuts that overlap main-window actions; this handler runs on KeyPress once Qt has dispatched the key to the focused widget.

Parameters
eventThe key press event to handle.

◆ mouseDoubleClickEvent()

void LuaDbgWatchTreeWidget::mouseDoubleClickEvent ( QMouseEvent * event)
overrideprotected

Inserts a new pending row when the user double-clicks on empty space.

Parameters
eventThe mouse double-click event to handle.

◆ requestCopyValue

void LuaDbgWatchTreeWidget::requestCopyValue ( QStandardItem * item,
const QModelIndex & index )
signal

Emitted on Ctrl+Shift+C to request a value copy for the given item.

Parameters
itemThe item on which the shortcut was invoked (any row, top-level or child).
indexThe model index corresponding to item.

◆ requestDeleteRows

void LuaDbgWatchTreeWidget::requestDeleteRows ( const QList< QStandardItem * > & items)
signal

Emitted on Delete or Backspace to remove the specified top-level rows.

Parameters
itemsThe list of top-level items to remove.

◆ requestDuplicateRoot

void LuaDbgWatchTreeWidget::requestDuplicateRoot ( QStandardItem * item)
signal

Emitted on Ctrl+Shift+D to request duplication of a top-level item.

Parameters
itemThe top-level item to duplicate.

◆ startDrag()

void LuaDbgWatchTreeWidget::startDrag ( Qt::DropActions supportedActions)
overrideprotected

Initiates a drag operation for top-level row reordering.

Parameters
supportedActionsThe set of drop actions the drag source supports.

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