| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
color_utils.h
Go to the documentation of this file.
1
10#ifndef COLOR_UTILS_H
11#define COLOR_UTILS_H
12
13#include <config.h>
14
15#include <epan/color_filters.h>
16
17#include <QBrush>
18#include <QColor>
19#include <QObject>
20
21 class ColorUtils : public QObject
22{
23public:
24 explicit ColorUtils(QObject *parent = 0);
25
26 static QColor fromColorT(const color_t *color);
27 static QColor fromColorT(color_t color);
28 static const color_t toColorT(const QColor color);
29 static QRgb alphaBlend(const QColor &color1, const QColor &color2, qreal alpha);
30 static QRgb alphaBlend(const QBrush &brush1, const QBrush &brush2, qreal alpha);
31
32 // ...because they don't really fit anywhere else?
33 static const QColor expert_color_comment; /* green */
34 static const QColor expert_color_chat; /* light blue */
35 static const QColor expert_color_note; /* bright turquoise */
36 static const QColor expert_color_warn; /* yellow */
37 static const QColor expert_color_error; /* pale red */
38 static const QColor expert_color_foreground; /* black */
39 static const QColor hidden_proto_item; /* gray */
40
41 static const QList<QRgb> graphColors();
42 static QRgb graphColor(int item);
43 static QRgb sequenceColor(int item);
44
51 static bool themeIsDark();
52
53 static void setScheme(int scheme);
58 static QBrush themeLinkBrush();
63 static QString themeLinkStyle();
71 static const QColor contrastingTextColor(const QColor color);
72
77 static const QColor hoverBackground();
78
83 static const QColor warningBackground();
84
89 static const QColor disabledForeground();
90
91private:
92 static QList<QRgb> graph_colors_;
93 static QList<QRgb> sequence_colors_;
94};
95
96void color_filter_qt_add_cb(color_filter_t *colorf, void *user_data);
97
98#endif // COLOR_UTILS_H
ColorUtils
Definition color_utils.h:22
ColorUtils::warningBackground
static const QColor warningBackground()
Definition color_utils.cpp:223
ColorUtils::contrastingTextColor
static const QColor contrastingTextColor(const QColor color)
Definition color_utils.cpp:201
ColorUtils::disabledForeground
static const QColor disabledForeground()
Definition color_utils.cpp:231
ColorUtils::themeIsDark
static bool themeIsDark()
Definition color_utils.cpp:149
ColorUtils::hoverBackground
static const QColor hoverBackground()
Definition color_utils.cpp:212
ColorUtils::themeLinkBrush
static QBrush themeLinkBrush()
Definition color_utils.cpp:185
ColorUtils::themeLinkStyle
static QString themeLinkStyle()
Definition color_utils.cpp:190
color_filters.h
_color_filter
Definition color_filters.h:33
color_t
RGB color representation with 16-bit precision per channel.
Definition color.h:27