|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <QBrush>#include <QChar>#include <QColor>#include <QFont>#include <QHash>#include <QIcon>#include <QKeySequence>#include <QModelIndex>#include <QSet>#include <QStandardItem>#include <QStandardItemModel>#include <QString>#include <QStringList>#include <QTreeView>#include <QVariant>#include <QtGlobal>#include "epan/wslua/wslua_debugger.h"Go to the source code of this file.
Classes | |
| struct | LuaDbgTreeSectionExpansionState |
| struct | LuaDebuggerPath::LuaDbgInvalidFilterColors |
| struct | LuaDebuggerPath::VariableRowFields |
| class | LuaDebuggerKeyRouter |
Centralised keyboard-shortcut dispatcher for the Lua debugger dialog's eventFilter(). More... | |
| class | LuaDebuggerChangeHighlightTracker |
| "Value changed since last pause" highlighter for the Watch and Variables trees. More... | |
Typedefs | |
| using | LuaDebuggerPath::TreePathKeyFinder = QStandardItem *(*)(QStandardItem *, const QString &) |
Enumerations | |
| enum class | LuaDbgBpHeaderIconMode { NoBreakpoints , ActivateAll , DeactivateAll } |
| Controls the state of the header toggle icon in the Lua debugger breakpoint list. More... | |
Functions | |
| QStandardItem * | luaDbgWatchRootItem (QStandardItem *item) |
| Finds the root item of a QStandardItem hierarchy. | |
| void | luaDbgRecordTreeSectionRootExpansion (QHash< QString, LuaDbgTreeSectionExpansionState > &map, const QString &rootKey, bool expanded) |
Record / clear root-level expansion for rootKey in map. Mutates map in place; collapsing a root with no remembered subpaths drops the entry entirely so the map stays minimal. | |
| void | luaDbgRecordTreeSectionSubpathExpansion (QHash< QString, LuaDbgTreeSectionExpansionState > &map, const QString &rootKey, const QString &key, bool expanded) |
Add / remove one descendant subpath key under rootKey in map. Mirrors luaDbgRecordTreeSectionRootExpansion: removing the last subpath of a collapsed root erases the root entry too. | |
| QStringList | luaDbgTreeSectionExpandedSubpaths (const QHash< QString, LuaDbgTreeSectionExpansionState > &map, const QString &rootKey) |
Expanded-descendant subpaths recorded for rootKey, or empty. | |
| QString | luaDebuggerSettingsFilePath () |
| Returns the file path for Lua debugger settings. | |
| QKeySequence | luaDbgSeqFromKeyEvent (const QKeyEvent *ke) |
Build a key sequence from a key event for matching against QAction shortcuts. Wraps the Qt5/Qt6 modifier-encoding split so callers do not have to repeat the version check. | |
| QString | LuaDebuggerItems::rowColumnDisplayText (const QModelIndex &indexInRow, int col) |
Qt::DisplayRole text for column col in the same row as indexInRow. | |
| QStandardItem * | LuaDebuggerItems::rowCol0 (QStandardItemModel *model, QStandardItem *cell) |
Column-0 item for the same row as cell. | |
| QStandardItem * | LuaDebuggerItems::cellAt (QStandardItemModel *model, QStandardItem *col0, int col) |
Cell in column col for a row whose column-0 anchor is col0. | |
| QString | LuaDebuggerItems::text (QStandardItemModel *model, QStandardItem *col0, int col) |
Return the text for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setText (QStandardItemModel *model, QStandardItem *col0, int col, const QString &t) |
Set the text for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setToolTip (QStandardItemModel *model, QStandardItem *col0, int col, const QString &tip) |
Set the tool tip for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setFont (QStandardItemModel *model, QStandardItem *col0, int col, const QFont &font) |
Set the font for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setForeground (QStandardItemModel *model, QStandardItem *col0, int col, const QBrush &brush) |
Set the foreground brush for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setBackground (QStandardItemModel *model, QStandardItem *col0, int col, const QBrush &brush) |
Set the background brush for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setIcon (QStandardItemModel *model, QStandardItem *col0, int col, const QIcon &icon) |
Set the icon for a cell in column col for a row whose column-0 anchor is col0. | |
| void | LuaDebuggerItems::setTextAlignment (QStandardItemModel *model, QStandardItem *col0, int col, Qt::Alignment align) |
Set the text alignment for a cell in column col for a row whose column-0 anchor is col0. | |
| QModelIndex | LuaDebuggerItems::indexCol0 (QStandardItemModel *model, QStandardItem *col0) |
Check whether a cell in column col for a row whose column-0 anchor is col0 is expanded in the tree view. | |
| bool | LuaDebuggerItems::isExpanded (QTreeView *tree, QStandardItemModel *model, QStandardItem *col0) |
Check whether a cell in column col for a row whose column-0 anchor is col0 is expanded in the tree view. | |
| void | LuaDebuggerItems::setExpanded (QTreeView *tree, QStandardItemModel *model, QStandardItem *col0, bool expanded) |
Set the expansion state for a cell in column col for a row whose column-0 anchor is col0. | |
| LuaDbgInvalidFilterColors | LuaDebuggerPath::invalidFilterColors () |
| Return the foreground and background colors used to indicate an invalid filter expression in the Lua debugger. | |
| bool | LuaDebuggerPath::watchSpecIsGlobalScoped (const QString &spec) |
| Check whether a watch specification is globally scoped. | |
| bool | LuaDebuggerPath::variablesPathIsGlobalScoped (const QString &path) |
| Check whether a variables path is globally scoped. | |
| QString | LuaDebuggerPath::changeKey (int stackLevel, const QString &path) |
| Return the change key for a variable at a given stack level and path. | |
| QString | LuaDebuggerPath::watchSpecFromChangeKey (const QString &key) |
| Return the watch specification corresponding to a change key. | |
| QString | LuaDebuggerPath::stripWatchExpressionErrorPrefix (const QString &errStr) |
| Strip the error prefix from a watch expression error string. | |
| template<class Key , class Map > | |
| bool | LuaDebuggerPath::shouldMarkChanged (const Map &baseline, const Key &key, const QString &newVal, bool flashNew=false) |
| Determine whether a variable has changed based on its current and baseline values. | |
| QString | LuaDebuggerPath::variableSectionRootKeyFromItem (const QStandardItem *item) |
| Return the root key of the variable section containing an item. | |
| bool | LuaDebuggerPath::watchSpecUsesPathResolution (const QString &spec) |
| Check whether a watch specification uses path resolution. | |
| QString | LuaDebuggerPath::variableTreeChildPath (const QString &parentPath, const QString &nameText) |
| Return the path of a child node in the variable tree. | |
| QString | LuaDebuggerPath::expressionWatchChildSubpath (const QString &parentSubpath, const QString &nameText) |
| Return the subpath of a child node in an expression watch tree. | |
| bool | LuaDebuggerPath::variableChildrenShouldSortByName (const QString &parentPath) |
| Check whether children of a variable node should be sorted by name. | |
| VariableRowFields | LuaDebuggerPath::readVariableRowFields (const wslua_variable_t &v, const QString &parentPath) |
| Read the display fields of a variable row from a Lua variable. | |
| void | LuaDebuggerPath::applyVariableExpansionIndicator (QStandardItem *anchor, bool canExpand, bool enabledOnlyPlaceholder, int columnCount=3) |
| Apply an expansion indicator to a variable row anchor item. | |
| QString | LuaDebuggerPath::watchVariablePathForSpec (const QString &spec) |
| Return the variable path for a watch specification. | |
| QString | LuaDebuggerPath::watchResolvedVariablePathForTooltip (const QString &spec) |
| Return the resolved variable path for a watch tooltip. | |
| void | LuaDebuggerPath::watchRootSetVariablePathRoleFromSpec (QStandardItem *row, const QString &spec) |
| Set the variable path role on a watch root row item from a watch specification. | |
| QString | LuaDebuggerPath::watchPathOriginSuffix (const QStandardItem *item, const QString &spec) |
| Return the origin suffix for a watch path tooltip. | |
| QString | LuaDebuggerPath::capWatchTooltipText (const QString &s) |
| Truncate a watch tooltip text string to a reasonable length. | |
| QString | LuaDebuggerPath::watchPathParentKey (const QString &path) |
| Return the parent key of a watch path. | |
| void | LuaDebuggerPath::applyWatchChildRowTextAndTooltip (QStandardItem *specItem, const QString &rawVal, const QString &typeText) |
| Apply the raw value and type text to a watch child row item. | |
| int | LuaDebuggerPath::watchSubpathBoundaryCount (const QString &subpath) |
| Return the number of subpath boundaries in a watch subpath. | |
| QStandardItem * | LuaDebuggerPath::findWatchItemBySubpathOrPathKey (QStandardItem *subtree, const QString &key) |
| Find a watch item in a subtree by its subpath or path key. | |
| QStandardItem * | LuaDebuggerPath::findVariableTreeItemByPathKey (QStandardItem *subtree, const QString &key) |
| Find a variable tree item in a subtree by its path key. | |
| void | LuaDebuggerPath::reexpandTreeDescendantsByPathKeys (QTreeView *tree, QStandardItemModel *model, QStandardItem *subtree, QStringList pathKeys, TreePathKeyFinder findByKey) |
| Re-expand previously expanded descendants of a subtree by their path keys. | |
| void | LuaDebuggerPath::reexpandWatchDescendantsByPathKeys (QTreeView *tree, QStandardItemModel *model, QStandardItem *subtree, QStringList pathKeys) |
| Re-expand previously expanded watch descendants of a subtree by their path keys. | |
| void | LuaDebuggerPath::clearWatchFilterErrorChrome (QStandardItem *specItem, QTreeView *tree) |
| Clear the filter error chrome from a watch specification item. | |
| void | LuaDebuggerPath::applyWatchFilterErrorChrome (QStandardItem *specItem, QTreeView *tree) |
| Apply filter error chrome to a watch specification item. | |
| void | LuaDebuggerPath::setupWatchRootItemFromSpec (QStandardItem *specItem, QStandardItem *valueItem, const QString &spec) |
| Set up a watch root item from a watch specification. | |
| QStandardItem * | LuaDebuggerPath::findVariableItemByPathRecursive (QStandardItem *node, const QString &path) |
| Find a variable item by path in a subtree, searching recursively. | |
| QString | LuaDebuggerPath::watchItemExpansionKey (const QStandardItem *item) |
| Return the expansion key for a watch item. | |
| QIcon | luaDbgMakeSelectionAwareIcon (const QIcon &base, const QPalette &palette) |
| Create a selection-aware icon for tree icons (breakpoints, variables, and watch) that applies a selected-row tint. | |
| QIcon | luaDbgPaintedGlyphIcon (const QString &glyph, int side, qreal dpr, const QFont &baseFont, const QColor &color, int margin=1) |
| Paint a glyph centred into a square pixmap and return it as an icon. | |
| QIcon | luaDbgPaintedGlyphButtonIcon (const QString &glyph, int side, qreal dpr, const QFont &baseFont, const QPalette &palette, int margin=2) |
| Creates an icon for a painted glyph button. | |
| void | luaDbgDrawBreakpointDot (QPainter &painter, qreal dotLeft, qreal dotTop, qreal radius, bool enabled, bool hasExtras=false, int alpha=255) |
| Draws a breakpoint dot on the given painter. | |
| QIcon | luaDbgBreakpointHeaderIconForMode (const QFont *editorFont, LuaDbgBpHeaderIconMode mode, int headerSide, qreal dpr) |
| Return the appropriate breakpoint header icon for the given mode. | |
| void | styleLuaDebuggerHeaderBreakpointToggleButton (QToolButton *btn, int side) |
| Style a Lua debugger header breakpoint toggle button. | |
| void | styleLuaDebuggerHeaderFittedTextButton (QToolButton *btn, int side, const QFont &titleFont, const QStringList &glyphs) |
| Style a Lua debugger header button with fitted text glyphs. | |
| void | styleLuaDebuggerHeaderPlusMinusButton (QToolButton *btn, int side, const QFont &titleFont) |
| Style a Lua debugger header plus/minus button. | |
| void | styleLuaDebuggerHeaderIconOnlyButton (QToolButton *btn, int side) |
| Style a Lua debugger header icon-only button. | |
| QIcon | luaDbgErrorBreakHeaderIcon (bool checked, int side, qreal dpr, const QFont &titleFont, const QPalette &palette) |
| Build a colored Break-on-Error toggle icon for the breakpoints section header. | |
Variables | |
| constexpr const char * | LuaDebuggerSettingsKeys::Theme = "theme" |
| constexpr const char * | LuaDebuggerSettingsKeys::DebuggerEnabled = "debuggerEnabled" |
| constexpr const char * | LuaDebuggerSettingsKeys::MainSplitter = "mainSplitterState" |
| constexpr const char * | LuaDebuggerSettingsKeys::LeftSplitter = "leftSplitterState" |
| constexpr const char * | LuaDebuggerSettingsKeys::EvalSplitter = "evalSplitterState" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionVariables = "sectionVariables" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionStack = "sectionStack" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionFiles = "sectionFiles" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionBreakpoints = "sectionBreakpoints" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionEval = "sectionEval" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionSettings = "sectionSettings" |
| constexpr const char * | LuaDebuggerSettingsKeys::SectionWatch = "sectionWatch" |
| constexpr const char * | LuaDebuggerSettingsKeys::Breakpoints = "breakpoints" |
| constexpr const char * | LuaDebuggerSettingsKeys::Watches = "watches" |
| constexpr const char * | LuaDebuggerSettingsKeys::BreakOnError = "breakOnError" |
| constexpr qint32 | FileTreePathRole = static_cast<qint32>(Qt::UserRole) |
| constexpr qint32 | FileTreeIsDirectoryRole = static_cast<qint32>(Qt::UserRole + 1) |
| constexpr qint32 | BreakpointFileRole = static_cast<qint32>(Qt::UserRole + 2) |
| constexpr qint32 | BreakpointLineRole = static_cast<qint32>(Qt::UserRole + 3) |
| constexpr qint32 | BreakpointConditionRole = static_cast<qint32>(Qt::UserRole + 30) |
| constexpr qint32 | BreakpointHitCountRole = static_cast<qint32>(Qt::UserRole + 31) |
| constexpr qint32 | BreakpointHitTargetRole = static_cast<qint32>(Qt::UserRole + 32) |
| constexpr qint32 | BreakpointConditionErrRole = static_cast<qint32>(Qt::UserRole + 33) |
| constexpr qint32 | BreakpointLogMessageRole = static_cast<qint32>(Qt::UserRole + 34) |
| constexpr qint32 | BreakpointHitModeRole = static_cast<qint32>(Qt::UserRole + 35) |
| constexpr qint32 | BreakpointLogAlsoPauseRole = static_cast<qint32>(Qt::UserRole + 36) |
| constexpr qint32 | StackItemFileRole = static_cast<qint32>(Qt::UserRole + 4) |
| constexpr qint32 | StackItemLineRole = static_cast<qint32>(Qt::UserRole + 5) |
| constexpr qint32 | StackItemNavigableRole = static_cast<qint32>(Qt::UserRole + 6) |
| constexpr qint32 | StackItemLevelRole = static_cast<qint32>(Qt::UserRole + 7) |
| constexpr qint32 | VariablePathRole = static_cast<qint32>(Qt::UserRole + 8) |
| constexpr qint32 | VariableTypeRole = static_cast<qint32>(Qt::UserRole + 9) |
| constexpr qint32 | VariableCanExpandRole = static_cast<qint32>(Qt::UserRole + 10) |
| constexpr qint32 | WatchSpecRole = static_cast<qint32>(Qt::UserRole + 11) |
| constexpr qint32 | WatchSubpathRole = static_cast<qint32>(Qt::UserRole + 13) |
| constexpr qint32 | WatchPendingNewRole = static_cast<qint32>(Qt::UserRole + 15) |
| constexpr qint32 | ChangedFlashSerialRole = static_cast<qint32>(Qt::UserRole + 20) |
| constexpr qsizetype | WATCH_TOOLTIP_MAX_CHARS = 4096 |
| constexpr int | WATCH_EXPR_MAX_CHARS = 65536 |
| constexpr int | CHANGED_FLASH_MS = 500 |
| constexpr int | WATCH_PLACEHOLDER_DEFER_MS = 250 |
| constexpr QChar | CHANGE_KEY_SEP = QChar(0x1F) |
| constexpr int | kLuaDbgEvalOutputMaxLines = 5000 |
| const QKeySequence | kLuaDbgCtxGoToLine |
| const QKeySequence | kLuaDbgCtxRunToLine |
| const QKeySequence | kLuaDbgCtxWatchEdit |
| const QKeySequence | kLuaDbgCtxWatchCopyValue |
| const QKeySequence | kLuaDbgCtxWatchDuplicate |
| const QKeySequence | kLuaDbgCtxWatchRemoveAll |
| const QKeySequence | kLuaDbgCtxAddWatch |
| const QKeySequence | kLuaDbgCtxToggleBreakpoint |
| const QKeySequence | kLuaDbgCtxReloadLuaPlugins |
| const QKeySequence | kLuaDbgCtxRemoveAllBreakpoints |
| const QString | kLuaDbgHeaderPlus |
| const QString | kLuaDbgHeaderMinus |
| const QString | kLuaDbgHeaderEdit |
| const QString | kLuaDbgRowLog |
| const QString | kLuaDbgRowExtras |
| const QString | kLuaDbgHeaderRemoveAll |
| const QString | kLuaDbgHeaderToolButtonStyle |
Shared helpers used across the debugger panels.
|
strong |
Controls the state of the header toggle icon in the Lua debugger breakpoint list.
| void LuaDebuggerPath::applyVariableExpansionIndicator | ( | QStandardItem * | anchor, |
| bool | canExpand, | ||
| bool | enabledOnlyPlaceholder, | ||
| int | columnCount = 3 |
||
| ) |
Apply an expansion indicator to a variable row anchor item.
| anchor | The anchor item in the variable tree. |
| canExpand | Whether the item can be expanded. |
| enabledOnlyPlaceholder | Whether to use an enabled-only placeholder. |
| columnCount | The number of columns in the tree (default 3). |
| void LuaDebuggerPath::applyWatchChildRowTextAndTooltip | ( | QStandardItem * | specItem, |
| const QString & | rawVal, | ||
| const QString & | typeText | ||
| ) |
Apply the raw value and type text to a watch child row item.
| specItem | The watch specification item. |
| rawVal | The raw value string. |
| typeText | The type text string. |
| void LuaDebuggerPath::applyWatchFilterErrorChrome | ( | QStandardItem * | specItem, |
| QTreeView * | tree | ||
| ) |
Apply filter error chrome to a watch specification item.
| specItem | The watch specification item. |
| tree | The tree view. |
| QString LuaDebuggerPath::capWatchTooltipText | ( | const QString & | s | ) |
Truncate a watch tooltip text string to a reasonable length.
| s | The tooltip text string. |
|
inline |
Cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to query. |
| QString LuaDebuggerPath::changeKey | ( | int | stackLevel, |
| const QString & | path | ||
| ) |
Return the change key for a variable at a given stack level and path.
| stackLevel | The stack level of the variable. |
| path | The path of the variable. |
| void LuaDebuggerPath::clearWatchFilterErrorChrome | ( | QStandardItem * | specItem, |
| QTreeView * | tree | ||
| ) |
Clear the filter error chrome from a watch specification item.
| specItem | The watch specification item. |
| tree | The tree view. |
| QString LuaDebuggerPath::expressionWatchChildSubpath | ( | const QString & | parentSubpath, |
| const QString & | nameText | ||
| ) |
Return the subpath of a child node in an expression watch tree.
| parentSubpath | The subpath of the parent node. |
| nameText | The name of the child node. |
| QStandardItem * LuaDebuggerPath::findVariableItemByPathRecursive | ( | QStandardItem * | node, |
| const QString & | path | ||
| ) |
Find a variable item by path in a subtree, searching recursively.
| node | The root item of the subtree to search. |
| path | The path to search for. |
| QStandardItem * LuaDebuggerPath::findVariableTreeItemByPathKey | ( | QStandardItem * | subtree, |
| const QString & | key | ||
| ) |
Find a variable tree item in a subtree by its path key.
| subtree | The root item of the subtree to search. |
| key | The path key to search for. |
| QStandardItem * LuaDebuggerPath::findWatchItemBySubpathOrPathKey | ( | QStandardItem * | subtree, |
| const QString & | key | ||
| ) |
Find a watch item in a subtree by its subpath or path key.
| subtree | The root item of the subtree to search. |
| key | The subpath or path key to search for. |
|
inline |
Check whether a cell in column col for a row whose column-0 anchor is col0 is expanded in the tree view.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
QModelIndex for col0, or an invalid index on failure. | LuaDbgInvalidFilterColors LuaDebuggerPath::invalidFilterColors | ( | ) |
Return the foreground and background colors used to indicate an invalid filter expression in the Lua debugger.
Background is read from ThemeManager::FilterInvalid; foreground is derived locally via ColorMath::contrastingText against that background (WCAG luminance pick — black on light tints, white on dark).
|
inline |
Check whether a cell in column col for a row whose column-0 anchor is col0 is expanded in the tree view.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| QIcon luaDbgBreakpointHeaderIconForMode | ( | const QFont * | editorFont, |
| LuaDbgBpHeaderIconMode | mode, | ||
| int | headerSide, | ||
| qreal | dpr | ||
| ) |
Return the appropriate breakpoint header icon for the given mode.
| editorFont | The font used in the editor. |
| mode | The breakpoint header icon mode. |
| headerSide | The side length of the header icon in pixels. |
| dpr | The device pixel ratio for HiDPI scaling. |
QIcon for the breakpoint header in the given mode. | void luaDbgDrawBreakpointDot | ( | QPainter & | painter, |
| qreal | dotLeft, | ||
| qreal | dotTop, | ||
| qreal | radius, | ||
| bool | enabled, | ||
| bool | hasExtras = false, |
||
| int | alpha = 255 |
||
| ) |
Draws a breakpoint dot on the given painter.
| painter | The QPainter object to draw on. |
| dotLeft | The left coordinate of the dot. |
| dotTop | The top coordinate of the dot. |
| radius | The radius of the dot. |
| enabled | Whether the breakpoint is enabled. |
| hasExtras | Whether the dot has additional extras. |
| alpha | The transparency level of the dot. |
| QIcon luaDbgErrorBreakHeaderIcon | ( | bool | checked, |
| int | side, | ||
| qreal | dpr, | ||
| const QFont & | titleFont, | ||
| const QPalette & | palette | ||
| ) |
Build a colored Break-on-Error toggle icon for the breakpoints section header.
Paints a warning-sign glyph, red (#DC3545) when checked (active), gray (disabled text color) when unchecked.
| checked | true to paint yellow, false to paint gray |
| side | icon size in pixels |
| dpr | device pixel ratio |
| titleFont | font to use for glyph rendering |
| palette | palette for disabled text color |
| QIcon luaDbgMakeSelectionAwareIcon | ( | const QIcon & | base, |
| const QPalette & | palette | ||
| ) |
Create a selection-aware icon for tree icons (breakpoints, variables, and watch) that applies a selected-row tint.
| base | The base icon to tint. |
| palette | The palette to derive the selection tint from. |
QIcon that applies a tint when the row is selected. | QIcon luaDbgPaintedGlyphButtonIcon | ( | const QString & | glyph, |
| int | side, | ||
| qreal | dpr, | ||
| const QFont & | baseFont, | ||
| const QPalette & | palette, | ||
| int | margin = 2 |
||
| ) |
Creates an icon for a painted glyph button.
Returns a header-button-flavoured QIcon with two pixmaps painted from glyph: a Normal pixmap in palette.color(Active, ButtonText) and a Disabled pixmap in palette.color(Disabled, ButtonText). The Disabled pixmap is added so QToolButton renders it directly when the button is disabled instead of falling back to QStyle::generatedIcon- Pixmap()'s synthesised filter (which on Linux produces a darker tone than the palette's disabled-text gray used by neighbouring text-only buttons).
| glyph | The glyph to be displayed on the button. |
| side | The size of the icon in pixels. |
| dpr | The device pixel ratio. |
| baseFont | The base font for rendering the glyph. |
| palette | The color palette to use for rendering the glyph. |
| margin | The margin around the glyph. |
| QIcon luaDbgPaintedGlyphIcon | ( | const QString & | glyph, |
| int | side, | ||
| qreal | dpr, | ||
| const QFont & | baseFont, | ||
| const QColor & | color, | ||
| int | margin = 1 |
||
| ) |
Paint a glyph centred into a square pixmap and return it as an icon.
Paints glyph centred into a square side x side pixmap (scaled by dpr for HiDPI), sized so the glyph's inked extent fills the cell.
| glyph | The glyph string to paint. |
| side | The side length of the square pixmap in pixels. |
| dpr | The device pixel ratio for HiDPI scaling. |
| baseFont | The font to use for painting the glyph. |
| color | The color to paint the glyph with. |
| margin | The margin around the glyph in pixels (default 1). |
QIcon containing the painted glyph. | void luaDbgRecordTreeSectionRootExpansion | ( | QHash< QString, LuaDbgTreeSectionExpansionState > & | map, |
| const QString & | rootKey, | ||
| bool | expanded | ||
| ) |
Record / clear root-level expansion for rootKey in map. Mutates map in place; collapsing a root with no remembered subpaths drops the entry entirely so the map stays minimal.
| map | Reference to the hash map that stores the expansion state of tree sections. |
| rootKey | The key representing the root section whose expansion state is to be recorded or cleared. |
| expanded | Boolean indicating whether the root section should be expanded (true) or collapsed (false). |
| void luaDbgRecordTreeSectionSubpathExpansion | ( | QHash< QString, LuaDbgTreeSectionExpansionState > & | map, |
| const QString & | rootKey, | ||
| const QString & | key, | ||
| bool | expanded | ||
| ) |
Add / remove one descendant subpath key under rootKey in map. Mirrors luaDbgRecordTreeSectionRootExpansion: removing the last subpath of a collapsed root erases the root entry too.
| map | Reference to the hash map that stores the expansion state of tree sections. |
| rootKey | The root key under which the subpath is being expanded or collapsed. |
| key | The subpath key to be added or removed. |
| expanded | Boolean indicating whether the subpath is being expanded (true) or collapsed (false). |
| QKeySequence luaDbgSeqFromKeyEvent | ( | const QKeyEvent * | ke | ) |
Build a key sequence from a key event for matching against QAction shortcuts. Wraps the Qt5/Qt6 modifier-encoding split so callers do not have to repeat the version check.
| ke | Pointer to the QKeyEvent object containing the key event information. |
| QStringList luaDbgTreeSectionExpandedSubpaths | ( | const QHash< QString, LuaDbgTreeSectionExpansionState > & | map, |
| const QString & | rootKey | ||
| ) |
Expanded-descendant subpaths recorded for rootKey, or empty.
| map | Hash containing expansion states for LuaDbgTreeSection objects. |
| rootKey | Key of the root section to retrieve expanded subpaths for. |
|
inline |
Finds the root item of a QStandardItem hierarchy.
Walk watch-tree items to the top-level row (same row family as WatchSpecRole root).
| item | The starting item in the hierarchy. |
| QString luaDebuggerSettingsFilePath | ( | ) |
Returns the file path for Lua debugger settings.
Global personal config path — debugger settings are not profile-specific.
| VariableRowFields LuaDebuggerPath::readVariableRowFields | ( | const wslua_variable_t & | v, |
| const QString & | parentPath | ||
| ) |
Read the display fields of a variable row from a Lua variable.
| v | The Lua variable to read from. |
| parentPath | The path of the parent variable node. |
VariableRowFields struct containing the display fields. | void LuaDebuggerPath::reexpandTreeDescendantsByPathKeys | ( | QTreeView * | tree, |
| QStandardItemModel * | model, | ||
| QStandardItem * | subtree, | ||
| QStringList | pathKeys, | ||
| TreePathKeyFinder | findByKey | ||
| ) |
Re-expand previously expanded descendants of a subtree by their path keys.
| tree | The tree view. |
| model | The tree model. |
| subtree | The root item of the subtree to re-expand. |
| pathKeys | The list of path keys to re-expand. |
| findByKey | The function to find an item by path key. |
| void LuaDebuggerPath::reexpandWatchDescendantsByPathKeys | ( | QTreeView * | tree, |
| QStandardItemModel * | model, | ||
| QStandardItem * | subtree, | ||
| QStringList | pathKeys | ||
| ) |
Re-expand previously expanded watch descendants of a subtree by their path keys.
| tree | The tree view. |
| model | The tree model. |
| subtree | The root item of the subtree to re-expand. |
| pathKeys | The list of path keys to re-expand. |
|
inline |
Column-0 item for the same row as cell.
| model | The standard item model. |
| cell | The cell for which to find the column-0 item. |
cell.
|
inline |
Qt::DisplayRole text for column col in the same row as indexInRow.
| indexInRow | The index of the row to query. |
| col | The column to query. |
|
inline |
Set the background brush for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| brush | The background brush to set for the specified cell. |
|
inline |
Set the expansion state for a cell in column col for a row whose column-0 anchor is col0.
| tree | The tree view to set expansion state. |
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| expanded | The expansion state to set for the specified cell. |
|
inline |
Set the font for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| font | The font to set for the specified cell. |
|
inline |
Set the foreground brush for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| brush | The foreground brush to set for the specified cell. |
|
inline |
Set the icon for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| icon | The icon to set for the specified cell. |
|
inline |
Set the text for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| t | The text to set for the specified cell. |
|
inline |
Set the text alignment for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| align | The text alignment to set for the specified cell. |
|
inline |
Set the tool tip for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to set. |
| tip | The tool tip to set for the specified cell. |
| void LuaDebuggerPath::setupWatchRootItemFromSpec | ( | QStandardItem * | specItem, |
| QStandardItem * | valueItem, | ||
| const QString & | spec | ||
| ) |
Set up a watch root item from a watch specification.
| specItem | The watch specification item. |
| valueItem | The watch value item. |
| spec | The watch specification string. |
| bool LuaDebuggerPath::shouldMarkChanged | ( | const Map & | baseline, |
| const Key & | key, | ||
| const QString & | newVal, | ||
| bool | flashNew = false |
||
| ) |
Determine whether a variable has changed based on its current and baseline values.
| baseline | The baseline map of variable values. |
| key | The key for the variable to check. |
| newVal | The new value for the variable. |
| flashNew | Whether to flash the new value. |
| QString LuaDebuggerPath::stripWatchExpressionErrorPrefix | ( | const QString & | errStr | ) |
Strip the error prefix from a watch expression error string.
| errStr | The error string to strip. |
| void styleLuaDebuggerHeaderBreakpointToggleButton | ( | QToolButton * | btn, |
| int | side | ||
| ) |
Style a Lua debugger header breakpoint toggle button.
| btn | The tool button to style. |
| side | The side length of the button in pixels. |
| void styleLuaDebuggerHeaderFittedTextButton | ( | QToolButton * | btn, |
| int | side, | ||
| const QFont & | titleFont, | ||
| const QStringList & | glyphs | ||
| ) |
Style a Lua debugger header button with fitted text glyphs.
| btn | The tool button to style. |
| side | The side length of the button in pixels. |
| titleFont | The font used for sizing the glyphs. |
| glyphs | The list of glyph strings to fit within the button. |
| void styleLuaDebuggerHeaderIconOnlyButton | ( | QToolButton * | btn, |
| int | side | ||
| ) |
Style a Lua debugger header icon-only button.
| btn | The tool button to style. |
| side | The side length of the button in pixels. |
| void styleLuaDebuggerHeaderPlusMinusButton | ( | QToolButton * | btn, |
| int | side, | ||
| const QFont & | titleFont | ||
| ) |
Style a Lua debugger header plus/minus button.
| btn | The tool button to style. |
| side | The side length of the button in pixels. |
| titleFont | The font used for sizing the plus/minus glyph. |
|
inline |
Return the text for a cell in column col for a row whose column-0 anchor is col0.
| model | The standard item model. |
| col0 | The column-0 item for the row. |
| col | The column to query. |
| bool LuaDebuggerPath::variableChildrenShouldSortByName | ( | const QString & | parentPath | ) |
Check whether children of a variable node should be sorted by name.
| parentPath | The path of the parent variable node. |
| QString LuaDebuggerPath::variableSectionRootKeyFromItem | ( | const QStandardItem * | item | ) |
Return the root key of the variable section containing an item.
| item | The item in the variable tree. |
| bool LuaDebuggerPath::variablesPathIsGlobalScoped | ( | const QString & | path | ) |
Check whether a variables path is globally scoped.
| path | The variables path string. |
| QString LuaDebuggerPath::variableTreeChildPath | ( | const QString & | parentPath, |
| const QString & | nameText | ||
| ) |
Return the path of a child node in the variable tree.
| parentPath | The path of the parent node. |
| nameText | The name of the child node. |
| QString LuaDebuggerPath::watchItemExpansionKey | ( | const QStandardItem * | item | ) |
Return the expansion key for a watch item.
| item | The watch item. |
| QString LuaDebuggerPath::watchPathOriginSuffix | ( | const QStandardItem * | item, |
| const QString & | spec | ||
| ) |
Return the origin suffix for a watch path tooltip.
| item | The item in the watch tree. |
| spec | The watch specification string. |
| QString LuaDebuggerPath::watchPathParentKey | ( | const QString & | path | ) |
Return the parent key of a watch path.
| path | The watch path string. |
| QString LuaDebuggerPath::watchResolvedVariablePathForTooltip | ( | const QString & | spec | ) |
Return the resolved variable path for a watch tooltip.
| spec | The watch specification string. |
| void LuaDebuggerPath::watchRootSetVariablePathRoleFromSpec | ( | QStandardItem * | row, |
| const QString & | spec | ||
| ) |
Set the variable path role on a watch root row item from a watch specification.
| row | The root row item. |
| spec | The watch specification string. |
| QString LuaDebuggerPath::watchSpecFromChangeKey | ( | const QString & | key | ) |
Return the watch specification corresponding to a change key.
| key | The change key string. |
| bool LuaDebuggerPath::watchSpecIsGlobalScoped | ( | const QString & | spec | ) |
Check whether a watch specification is globally scoped.
| spec | The watch specification string. |
| bool LuaDebuggerPath::watchSpecUsesPathResolution | ( | const QString & | spec | ) |
Check whether a watch specification uses path resolution.
| spec | The watch specification string. |
| int LuaDebuggerPath::watchSubpathBoundaryCount | ( | const QString & | subpath | ) |
Return the number of subpath boundaries in a watch subpath.
| subpath | The watch subpath string. |
| QString LuaDebuggerPath::watchVariablePathForSpec | ( | const QString & | spec | ) |
Return the variable path for a watch specification.
| spec | The watch specification string. |
|
constexpr |
Last toolbar "Enable debugger" checkbox state (persisted across dialog instances).
|
constexpr |
Maximum number of lines the Evaluate / logpoint output retains.
|
extern |
Gear (U+2699 + U+FE0E text presentation) for the Edit Breakpoint header button.
|
extern |
Fullwidth +/- and flat tool button style for section headers.
|
extern |
Circled Latin capital letter X (U+24CD) for the Remove All header buttons (Watch and Breakpoints).
|
extern |
Reference mark (U+203B) for the Active-column condition / hit-count row indicator.
|
extern |
Three stacked horizontal lines (U+2630 trigram for heaven) for the Active-column logpoint row indicator.