Item delegate for the Breakpoints list Location column (condition / hit count / log message inline editor).
More...
#include <lua_debugger_breakpoints.h>
|
| | LuaDbgBreakpointConditionDelegate (LuaDebuggerDialog *dialog) |
| | Construct a LuaDbgBreakpointConditionDelegate.
|
| |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Create a QLineEdit editor for a breakpoint condition cell.
|
| |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| | Populate the editor with the cell's current condition string.
|
| |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| | Write the edited condition expression back to the model.
|
| |
| void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Position and size the editor to fill the cell rectangle.
|
| |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Return the preferred size for a condition cell.
|
| |
|
| bool | eventFilter (QObject *watched, QEvent *event) override |
| | Filter key events on the editor to control commit and cancel.
|
| |
Item delegate for the Breakpoints list Location column (condition / hit count / log message inline editor).
The editor is a single QLineEdit configured per-mode by a small mode-picker combo on the left. A hit-count comparison combo and an "also pause" toggle are embedded as children of the line edit and are shown only for the modes that own them. See the implementation file for the full design rationale.
◆ LuaDbgBreakpointConditionDelegate()
| LuaDbgBreakpointConditionDelegate::LuaDbgBreakpointConditionDelegate |
( |
LuaDebuggerDialog * |
dialog | ) |
|
|
explicit |
◆ createEditor()
| QWidget * LuaDbgBreakpointConditionDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Create a QLineEdit editor for a breakpoint condition cell.
- Parameters
-
| parent | The parent widget for the editor (the view's viewport). |
| option | Style options for the cell being edited. |
| index | The model index of the condition cell being edited. |
- Returns
- A new
QLineEdit widget; ownership passes to the view.
◆ eventFilter()
| bool LuaDbgBreakpointConditionDelegate::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
event |
|
) |
| |
|
overrideprotected |
Filter key events on the editor to control commit and cancel.
- Parameters
-
| watched | The object that received the event (the editor widget). |
| event | The event to inspect. |
- Returns
- true if the event was consumed; false to let it propagate.
◆ setEditorData()
| void LuaDbgBreakpointConditionDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Populate the editor with the cell's current condition string.
- Parameters
-
| editor | The QLineEdit created by createEditor(). |
| index | The model index whose data should be loaded. |
◆ setModelData()
| void LuaDbgBreakpointConditionDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Write the edited condition expression back to the model.
- Parameters
-
| editor | The QLineEdit created by createEditor(). |
| model | The breakpoint model to update. |
| index | The model index of the condition cell being committed. |
◆ sizeHint()
| QSize LuaDbgBreakpointConditionDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Return the preferred size for a condition cell.
- Parameters
-
| option | Style options for the cell. |
| index | The model index of the cell. |
- Returns
- A
QSize with the natural editor height and the base-class width.
◆ updateEditorGeometry()
| void LuaDbgBreakpointConditionDelegate::updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Position and size the editor to fill the cell rectangle.
- Parameters
-
| editor | The QLineEdit to reposition. |
| option | Style options supplying the cell's bounding rectangle. |
| index | The model index of the cell being edited (unused here). |
The documentation for this class was generated from the following files: