|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Owns the dialog's font story end-to-end. More...
#include <lua_debugger_code_editor.h>
Public Member Functions | |
| LuaDebuggerFontPolicy ()=default | |
| Default constructor for the font policy. | |
| 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. | |
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.
| void LuaDebuggerFontPolicy::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.
| font | The specific font to apply, or default to current. |
| void LuaDebuggerFontPolicy::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.
| codeTabs | The code tabs widget. |
| variablesTree | The variables tree view. |
| watchTree | The watch tree view. |
| watchModel | The watch standard item model. |
| stackTree | The stack trace tree view. |
| fileTree | The files tree view. |
| breakpointsTree | The breakpoints tree view. |
| evalInputEdit | The evaluation input plain text edit. |
| evalOutputEdit | The evaluation output plain text edit. |
| QFont LuaDebuggerFontPolicy::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.
| zoomed | True to return the zoomed variant. |
| QFont LuaDebuggerFontPolicy::regularFont | ( | ) | const |
Effective regular UI font for tree-column headers.