Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
stock_icon.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include <QIcon>
13#include <QColor>
14
18
19
25class StockIcon : public QIcon
26{
27public:
33 explicit StockIcon(const char *icon_name);
34
43 static QIcon colorIcon(const QRgb bg_color, const QRgb fg_color, const QString glyph = QString());
44 static QIcon colorIcon(const QColor bg_color, const QRgb fg_color, const QString glyph = QString());
52 static QIcon colorIconTriangle(const QRgb bg_color, const QRgb fg_color);
53
61 static QIcon colorIconCross(const QRgb bg_color, const QRgb fg_color);
62
70 static QIcon colorIconCircle(const QRgb bg_color, const QRgb fg_color);
71
72private:
77 void fillIconNameMap();
78};
static QIcon colorIcon(const QRgb bg_color, const QRgb fg_color, const QString glyph=QString())
Creates a square icon filled with bg_color, optionally overlaying glyph in fg_color.
Definition stock_icon.cpp:62
static QIcon colorIconCross(const QRgb bg_color, const QRgb fg_color)
Creates a square icon containing a filled cross (×) in fg_color on a bg_color background.
Definition stock_icon.cpp:119
static QIcon colorIconTriangle(const QRgb bg_color, const QRgb fg_color)
Creates a square icon containing a filled triangle in fg_color on a bg_color background.
Definition stock_icon.cpp:94
static QIcon colorIconCircle(const QRgb bg_color, const QRgb fg_color)
Creates a square icon containing a filled circle in fg_color on a bg_color background.
Definition stock_icon.cpp:144
StockIcon(const char *icon_name)
Constructs a StockIcon by resolving icon_name against the application's icon theme and resource paths...
Definition stock_icon.cpp:54