| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
stock_icon.h
Go to the documentation of this file.
1
9
10#ifndef STOCK_ICON_H
11#define STOCK_ICON_H
12
13#include <QIcon>
14#include <QColor>
15
19
20// Supported standard names:
21// document-open
22
23// Supported custom names (see images/toolbar):
24// x-capture-file-close
25// x-capture-file-save
26// x-lua-debug-continue
27// x-lua-debug-step-in
28// x-lua-debug-step-out
29// x-lua-debug-step-over
30// x-lua-debug-run-to-line
31
37 class StockIcon : public QIcon
38{
39 public:
45 explicit StockIcon(const QString icon_name);
46
55 static QIcon colorIcon(const QRgb bg_color, const QRgb fg_color, const QString glyph = QString());
56 static QIcon colorIcon(const QColor bg_color, const QRgb fg_color, const QString glyph = QString());
64 static QIcon colorIconTriangle(const QRgb bg_color, const QRgb fg_color);
65
73 static QIcon colorIconCross(const QRgb bg_color, const QRgb fg_color);
74
82 static QIcon colorIconCircle(const QRgb bg_color, const QRgb fg_color);
83
84 private:
89 void fillIconNameMap();
90};
91
92#endif // STOCK_ICON_H
StockIcon::colorIcon
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:155
StockIcon::colorIconCross
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:212
StockIcon::colorIconTriangle
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:187
StockIcon::colorIconCircle
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:237
StockIcon::StockIcon
StockIcon(const QString icon_name)
Constructs a StockIcon by resolving icon_name against the application's icon theme and resource paths...
Definition stock_icon.cpp:57