|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
#include <theme_writer.h>
Classes | |
| struct | KeyInfo |
Static Public Member Functions | |
| static const QList< KeyInfo > & | keyTable () |
| static QString | keyPath (ThemeManager::ThemeToken token) |
| static QString | keyPath (const KeyInfo &info) |
| static QString | colorText (const QColor &color) |
| static QByteArray | toJsonc (const ThemeDraft &draft) |
| static QString | sanitizeStem (const QString &name) |
| static QString | uniqueStem (const QString &wanted, const QString &ignoreStem=QString()) |
| static bool | writeFile (const ThemeDraft &draft, const QString &path, QString *errorString=nullptr) |
Serializes a ThemeDraft to a theme file (JSONC) and names theme files.
The output is the one canonical form: fixed section order, schema key spelling, one color per line. Only the keys a draft sets are written.
|
static |
| color | the color. |
|
static |
| info | a row of keyTable(). |
|
static |
| token | the color token. |
|
static |
All settable color keys in the order they are written. The rows come from ThemeManager::settableKeys() (enum order); the descriptions come from the writer's own table and are shown by the Theme Designer. Rows of one section are contiguous; the order of the sections' first rows is the order toJsonc() writes them in.
|
static |
Turns a theme name into a safe file stem: lowercase letters, digits, '-' and '_'; anything else becomes '-'.
| name | theme name. |
|
static |
Serializes a draft. Color entries and graph slots with an invalid side are skipped; callers clean the draft with ThemeDraft::removeInvalidEntries() first.
| draft | the draft to serialize. |
|
static |
Returns a stem for wanted that is neither a bundled theme nor an existing personal theme file, appending -2, -3, ... when needed.
| wanted | theme name or stem. |
| ignoreStem | stem that counts as free (a rename keeping its stem). |
|
static |
Writes a draft to path, creating the parent directory.
| draft | the draft to write. |
| path | destination file. |
| errorString | optional; set on failure. |