Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
stock_icon.h
Go to the documentation of this file.
1
10#ifndef STOCK_ICON_H
11#define STOCK_ICON_H
12
13#include <QIcon>
14#include <QColor>
15
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
37class StockIcon : public QIcon
38{
39public:
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
84private:
89 void fillIconNameMap();
90};
91
92#endif // STOCK_ICON_H
QIcon subclass that loads a named application icon from theme resources, with fallback handling acros...
Definition stock_icon.h:38
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:162
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:219
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:194
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:244