Root watch cell: inline line edit for the expression column.
More...
#include <lua_debugger_watch.h>
|
|
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.
|
| |
|
| | 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.
|
| |
Root watch cell: inline line edit for the expression column.
◆ 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. |
◆ 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: