|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
Applies the active theme's palette to a QCustomPlot. More...
#include <plot_theme.h>
Static Public Member Functions | |
| static void | apply (QCustomPlot *plot) |
| Recolor a plot from the current theme. | |
| static void | applyToAxis (QCPAxis *axis) |
| Recolor one axis from the current theme. | |
| static void | track (QCustomPlot *plot, std::function< void()> afterApply=nullptr) |
| Apply the theme now and again whenever the theme changes. | |
| static QColor | textColor () |
| The theme's primary text color for plot elements. | |
Applies the active theme's palette to a QCustomPlot.
QCustomPlot defaults to a white background with black axes, which is unreadable in dark themes. This helper recolors the background, axes, grids, legend and titles from the theme tokens and keeps them current across theme switches.
|
static |
Recolor a plot from the current theme.
Pen widths and styles are preserved. Does not replot.
| plot | The plot to recolor. |
|
static |
|
static |
The theme's primary text color for plot elements.
|
static |
Apply the theme now and again whenever the theme changes.
Calls apply(), then afterApply, then replots, immediately and on every ThemeManager::themeChanged. The connection is bound to the plot's lifetime.
| plot | The plot to track. |
| afterApply | Optional hook for plot-specific colors that must be reapplied after the generic recoloring. |