| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
LuaDbgBreakpointModes Namespace Reference

Inline editor mode metadata for the Breakpoints "Location" column. More...

## Classes
struct | ModeSpec

## Enumerations
enum class | Mode : int { Expression = 0 , HitCount = 1 , LogMessage = 2 }
| Selects the operational mode of a conditional breakpoint or debug action. More...

## Functions
QString | translatedLabel (const ModeSpec &spec)
const char * | draftPropertyName (Mode m)
QComboBox * | editorHitModeCombo (QWidget *editor)
QToolButton * | editorPauseToggle (QWidget *editor)
void | applyEditorMode (QWidget *editor, int modeIndex)
QIcon | makePauseIcon (const QPalette &palette)
QString | pauseToggleStyleSheet ()

## Variables
const ModeSpec | kBreakpointEditModes [kModeCount]
constexpr int | kModeCount = 3

## Detailed Description

Inline editor mode metadata for the Breakpoints "Location" column.

The inline editor in BreakpointInlineLineEdit is a single `QLineEdit` reused across three editing modes (Expression / Hit Count / Log Message). This translation unit owns the table that drives the per-mode validator / placeholder / tooltip / auxiliary-control visibility — the delegate stays focused on Qt `QStyledItemDelegate` plumbing, the inline editor stays focused on geometry, and adding a fourth mode is a single-row append to `kBreakpointEditModes` plus an extension of applyEditorMode and the delegate's commit/load logic in `setEditorData` / `setModelData`.

## Enumeration Type Documentation

## ◆ Mode

enum class LuaDbgBreakpointModes::Mode : int
| strong

Selects the operational mode of a conditional breakpoint or debug action.

Enumerator
Expression | Evaluate a boolean expression; break or act when the expression is true
HitCount | Break or act after the location has been reached a specified number of times
LogMessage | Emit a log message instead of suspending execution when the location is reached

## Function Documentation

## ◆ applyEditorMode()

void LuaDbgBreakpointModes::applyEditorMode | ( | QWidget * | editor,
|  | int | modeIndex )

Switch the editor's line edit to display `modeIndex's` mode.

Called by the mode-combo `currentIndexChanged` signal and directly from `setEditorData` on the initial open. Saves the current line-edit text into the previous mode's draft slot, loads the new mode's draft into the line edit, applies the mode-specific validator / placeholder / tooltip, and toggles the visibility of the auxiliary controls. The line edit then re-runs its layout pass so the new auxiliary visibility is reflected in the text margins.

## ◆ draftPropertyName()

const char * LuaDbgBreakpointModes::draftPropertyName | ( | Mode | m | ) |

Property name of the per-mode draft text cache for `m`. The shared editor line edit is one widget across all three modes, so the user's typing under each mode is stashed on the editor via this property and restored when the mode is reactivated.

## ◆ editorHitModeCombo()

QComboBox * LuaDbgBreakpointModes::editorHitModeCombo | ( | QWidget * | editor | ) |

Hit-count comparison combo stashed on the editor by LuaDbgBreakpointConditionDelegate::createEditor; `nullptr` if `editor` is null or the property has not been set.

## ◆ editorPauseToggle()

QToolButton * LuaDbgBreakpointModes::editorPauseToggle | ( | QWidget * | editor | ) |

"Also pause" toggle stashed on the editor by LuaDbgBreakpointConditionDelegate::createEditor; `nullptr` if `editor` is null or the property has not been set.

## ◆ makePauseIcon()

QIcon LuaDbgBreakpointModes::makePauseIcon | ( | const QPalette & | palette | ) |

Build a palette-aware "also pause" icon with separate Off / On variants. The toggled state is signalled by:

- `QIcon::Off` : two solid pause bars in the palette's `ButtonText` color, on a transparent background. The `QToolButton's` background stylesheet is also transparent in this state, so the cell shows the bars on the cell's own background.
- `QIcon::On` : two solid bars in `HighlightedText` (white). The bars sit on top of the `QToolButton's` checked-state stylesheet background — a rounded `Highlight-color` chip that fills the whole button, not just the 16×16 icon.

## ◆ pauseToggleStyleSheet()

QString LuaDbgBreakpointModes::pauseToggleStyleSheet | ( |  | ) |

Stylesheet for the breakpoint-editor pause toggle: transparent when unchecked, filled rounded `Highlight` chip when checked.

## ◆ translatedLabel()

QString LuaDbgBreakpointModes::translatedLabel | ( | const ModeSpec & | spec | ) |

`BreakpointConditionDelegate-context` translation of ModeSpec::label.

## Variable Documentation

## ◆ kBreakpointEditModes

const ModeSpec LuaDbgBreakpointModes::kBreakpointEditModes

Per-mode metadata table; index matches Mode.

## ◆ kModeCount

int LuaDbgBreakpointModes::kModeCount = 3
| constexpr

Number of entries in kBreakpointEditModes (compile-time constant).