|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
#include <theme_color_editor.h>
Signals | |
| void | draftChanged () |
| void | childDialogClosed () |
Public Member Functions | |
| ThemeColorEditor (QWidget *parent=nullptr) | |
| void | setDrafts (const ThemeDraft &base, const ThemeDraft &draft) |
| const ThemeDraft & | draft () const |
| void | setDarkSide (bool dark) |
| int | editedCount () const |
| int | changedCount () const |
| int | invalidCount () const |
| QString | firstInvalidPath () const |
| bool | selectToken (ThemeManager::ThemeToken token, bool *filter_cleared=nullptr) |
| QString | tokenLabel (ThemeManager::ThemeToken token) const |
| QIcon | tokenSwatch (ThemeManager::ThemeToken token) const |
Static Public Member Functions | |
| static QString | editedMarkHtml () |
Color list and detail panel of the Theme Designer.
Lists every color a theme file can set, the graph color cycle and, read-only, every derived color. Each row is marked "edited" when the draft input differs from the base theme, "changed" when only its resolved value differs (a consequence of another edit), "required" for the brand and accent inputs, or shows the derived value in italics when the key is not set. The detail panel below the list edits both sides of the selected color.
Text that is not a color is kept per field and reported through invalidCount() and firstInvalidPath(); the draft keeps the last valid value.
| int ThemeColorEditor::changedCount | ( | ) | const |
Rows marked "changed" (resolved value differs, input unchanged).
|
signal |
The color dialog was closed, with or without a choice.
|
inline |
The draft with every valid edit applied.
|
signal |
Any input change, including a change of invalidCount().
| int ThemeColorEditor::editedCount | ( | ) | const |
Rows marked "edited", including graph slots removed from the base.
|
static |
The bold " edited" mark appended to a title, in the theme's edit color. Shared so every title in the designer marks edits the same way.
| QString ThemeColorEditor::firstInvalidPath | ( | ) | const |
JSON path of the first field in list order that holds text that is not a color, e.g. "packets.marked.dark"; empty when there is none.
|
inline |
Fields that hold text that is not a color.
| bool ThemeColorEditor::selectToken | ( | ThemeManager::ThemeToken | token, |
| bool * | filter_cleared = nullptr ) |
Selects and centers the row of token. Color and derived rows share the token-valued row id, so either kind is found. A row hidden by the filter text or the "changed only" check box gets both cleared first.
| token | the color to show. |
| filter_cleared | set to true when a filter had to be cleared. |
token has no row. | void ThemeColorEditor::setDarkSide | ( | bool | dark | ) |
Selects the side the list values and swatches show.
| void ThemeColorEditor::setDrafts | ( | const ThemeDraft & | base, |
| const ThemeDraft & | draft ) |
Replaces the base theme the marks compare against and the draft being edited. The selected row is kept when it still exists. Text that is not a color is dropped when another theme or other colors come in.
| base | the saved theme the draft was loaded from. |
| draft | the draft to edit. |
| QString ThemeColorEditor::tokenLabel | ( | ThemeManager::ThemeToken | token | ) | const |
The label the list shows for token, or its name when it has no row.
| QIcon ThemeColorEditor::tokenSwatch | ( | ThemeManager::ThemeToken | token | ) | const |
A swatch of the resolved value of token on the shown side.