|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
#include <theme_welcome_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 | |
| ThemeWelcomePreview (QWidget *parent=nullptr) | |
| void | setTheme (const QHash< ThemeManager::ThemeToken, ThemeColorPair > &tokens, bool dark, const QPalette &palette) |
| void | setPreviewFont (const QFont ®ular) |
| ThemePreviewPicker & | picker () |
Protected Member Functions | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | contextMenuEvent (QContextMenuEvent *event) override |
Compact, static copy of the Welcome Page for the Theme Designer.
The widget tree reuses the object names of the real welcome widgets and styles itself from the real welcome style sheets, resolved against a draft token map instead of the live theme. The widget never reads the live theme: colors and palette come only from setTheme(), so the draft can be shown without touching the application. The learn card is the real LearnCardWidget, told to leave its styling to this widget's sheet.
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 ThemeWelcomePreview::setPreviewFont | ( | const QFont & | regular | ) |
Sets the regular (proportional) font used for all preview text; an unchanged font is ignored.
| void ThemeWelcomePreview::setTheme | ( | const QHash< ThemeManager::ThemeToken, ThemeColorPair > & | tokens, |
| bool | dark, | ||
| const QPalette & | palette ) |
Applies a draft to the preview.
| tokens | draft token map (both sides of every color pair) |
| dark | which side of the pairs to show |
| palette | palette for the preview (the draft's Palette* tokens) |