|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
#include <theme_lua_code_preview.h>
Signals | |
| void | layerPicked (const ThemePreviewPick::Layer &layer) |
| void | pickMenuRequested (QMenu *menu, QAction *before, const QList< ThemePreviewPick::Layer > &layers) |
| void | childDialogClosed () |
Public Member Functions | |
| ThemeLuaCodePreview (QWidget *parent=nullptr) | |
| void | setPreviewColors (const QHash< ThemeManager::ThemeToken, QColor > &colors) |
| void | setPreviewFont (const QFont &monospace) |
| ThemePreviewPicker & | picker () |
Static copy of the Lua Debugger script editor for the Theme Designer.
Shows the udprtt.lua example of the Lua debugger chapter of the Developer's Guide, highlighted by the debugger's own LuaSyntaxHighlighter, with a breakpoint, the line the debugger is paused on and a selection, so every color of the theme's code section is on screen. Colors come only from setPreviewColors(), so a draft can be shown without touching the application. Built only with Lua, like the debugger.
With picking enabled (picker()) a click names the theme color that paints the spot, found with ThemePreviewPick's key render of a hidden copy of this widget.
|
signal |
A dialog opened from this widget (Save Image As) was closed.
|
signal |
A left click while picking; layer has token NoRole on a spot without theme color.
|
inline |
Click-to-pick support, off by default. While on, a pickable spot shows a hand cursor, a left click emits layerPicked() and the context menu offers the colors of the spot.
|
signal |
Emitted synchronously before the context menu opens, only while picking is enabled. Receivers insert color actions before before.
| void ThemeLuaCodePreview::setPreviewColors | ( | const QHash< ThemeManager::ThemeToken, QColor > & | colors | ) |
Replaces the preview's color table and repaints.
| colors | token to resolved color, typically one side of ThemeManager::resolveDraftTokens(). When the map is empty, the live theme is shown. |
| void ThemeLuaCodePreview::setPreviewFont | ( | const QFont & | monospace | ) |
Sets the monospace font of the code and the gutter; an unchanged font is ignored.