| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LuaDbgWatchRootDelegate Class Reference

Root watch cell: inline line edit for the expression column. More...

`#include <lua_debugger_watch.h>`

Inheritance diagram for LuaDbgWatchRootDelegate:

## Public Types
using | CommitFn = std::function<void(QStandardItem *item, const QString &text)>
| Callback invoked from setModelData when the user finishes editing a top-level watch row's expression. The owner (the watch controller) decides how to persist or reject the new spec.

## Public Member Functions
| LuaDbgWatchRootDelegate (QTreeView *tree, CommitFn commit, QObject *parent=nullptr)
| Constructs the root watch delegate.
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
| Creates the inline line editor for the cell.
void | setEditorData (QWidget *editor, const QModelIndex &index) const override
| Sets the data to be displayed and edited in the editor.
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
| Saves the editor's data back to the model.

## Detailed Description

Root watch cell: inline line edit for the expression column.

## Constructor & Destructor Documentation

## ◆ LuaDbgWatchRootDelegate()

LuaDbgWatchRootDelegate::LuaDbgWatchRootDelegate | ( | QTreeView * | tree,
|  | CommitFn | commit,
|  | QObject * | parent = nullptr )

Constructs the root watch delegate.

Parameters

  tree | The tree view the delegate operates on.
  commit | The commit callback function.
  parent | The parent object.

## Member Function Documentation

## ◆ createEditor()

QWidget * LuaDbgWatchRootDelegate::createEditor | ( | QWidget * | parent,
|  | const QStyleOptionViewItem & | option,
|  | const QModelIndex & | index ) const
| override

Creates the inline line editor for the cell.

Parameters

  parent | The parent widget.
  option | The style option used for the item.
  index | The model index of the item.

Returns
  The created editor widget.

## ◆ setEditorData()

void LuaDbgWatchRootDelegate::setEditorData | ( | QWidget * | editor,
|  | const QModelIndex & | index ) const
| override

Sets the data to be displayed and edited in the editor.

Parameters

  editor | The editor widget.
  index | The model index of the item.

## ◆ setModelData()

void LuaDbgWatchRootDelegate::setModelData | ( | QWidget * | editor,
|  | QAbstractItemModel * | model,
|  | const QModelIndex & | index ) const
| override

Saves the editor's data back to the model.

Parameters

  editor | The editor widget.
  model | The data model.
  index | The model index of the item.

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

- /builds/wireshark/wireshark/ui/qt/lua_debugger/lua_debugger_watch.h
- /builds/wireshark/wireshark/ui/qt/lua_debugger/lua_debugger_watch.cpp