Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LuaDebuggerFontPolicy Class Reference

Owns the dialog's font story end-to-end. More...

#include <lua_debugger_code_editor.h>

Public Member Functions

void attach (QTabWidget *codeTabs, QTreeView *variablesTree, QTreeView *watchTree, QStandardItemModel *watchModel, QTreeView *stackTree, QTreeView *fileTree, QTreeView *breakpointsTree, QPlainTextEdit *evalInputEdit, QPlainTextEdit *evalOutputEdit)
 Seed the policy with the dialog's panel widgets. Idempotent.
 
void applyAll ()
 Apply zoomed monospace to code editors and panel mono + regular header fonts to the side panels. Single entry point for "font preference changed".
 
void applyToCodeEditors (const QFont &font=QFont())
 Apply the (optionally explicit) monospace to all open code-view tabs. When font is empty, falls back to the current zoomed monospace.
 
void applyToPanels ()
 Apply panel-mono bodies + regular headers to all side panels and re-sync watch QStandardItem fonts. Public so layout-changing widgets (e.g. the watch tree after a DnD reorder) can request a re-seat.
 
void reapplyToWatchItemModel ()
 Re-walk the watch model and seed each item's font to panel-mono, preserving its current bold flag (used by change-highlight).
 
QFont monospaceFont (bool zoomed) const
 Effective monospace font; respects the main-app preference and the optional zoom step. Falls back to the system fixed font before main-app init.
 
QFont regularFont () const
 Effective regular UI font for tree-column headers.
 

Detailed Description

Owns the dialog's font story end-to-end.

One place to ask: "what monospace + header font should the panels use, and how do we re-seat them across the open code-view tabs and watch model?". Construction is widget-pointer-free so the dialog can declare the policy as a value member; attach is called once the panel widgets exist.

The watch widget keeps a pointer to this so it can call applyToPanels after a row reorder without needing a back-pointer to the dialog.


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