Wireshark 4.7.0
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
treeThe tree view the delegate operates on.
commitThe commit callback function.
parentThe 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
parentThe parent widget.
optionThe style option used for the item.
indexThe 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
editorThe editor widget.
indexThe 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
editorThe editor widget.
modelThe data model.
indexThe model index of the item.

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