QIcon subclass that loads a named application icon from theme resources, with fallback handling across platforms, plus factory methods for generating solid-colour shape icons at runtime.
More...
#include <stock_icon.h>
|
| | StockIcon (const QString icon_name) |
| | Constructs a StockIcon by resolving icon_name against the application's icon theme and resource paths.
|
| |
|
| 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.
|
| |
|
static QIcon | colorIcon (const QColor bg_color, const QRgb fg_color, const QString glyph=QString()) |
| |
| 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.
|
| |
| 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.
|
| |
| 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.
|
| |
QIcon subclass that loads a named application icon from theme resources, with fallback handling across platforms, plus factory methods for generating solid-colour shape icons at runtime.
◆ StockIcon()
| StockIcon::StockIcon |
( |
const QString |
icon_name | ) |
|
|
explicit |
Constructs a StockIcon by resolving icon_name against the application's icon theme and resource paths.
- Parameters
-
| icon_name | Canonical icon name (e.g. "x-capture-file-close"). |
◆ colorIcon()
| QIcon StockIcon::colorIcon |
( |
const QRgb |
bg_color, |
|
|
const QRgb |
fg_color, |
|
|
const QString |
glyph = QString() |
|
) |
| |
|
static |
Creates a square icon filled with bg_color, optionally overlaying glyph in fg_color.
- Parameters
-
| bg_color | Background fill colour (ARGB). |
| fg_color | Foreground/glyph colour (ARGB). |
| glyph | Optional single-character string to render centred on the icon. |
- Returns
- Generated QIcon.
◆ colorIconCircle()
| QIcon StockIcon::colorIconCircle |
( |
const QRgb |
bg_color, |
|
|
const QRgb |
fg_color |
|
) |
| |
|
static |
Creates a square icon containing a filled circle in fg_color on a bg_color background.
- Parameters
-
| bg_color | Background fill colour (ARGB). |
| fg_color | Circle fill colour (ARGB). |
- Returns
- Generated QIcon.
◆ colorIconCross()
| QIcon StockIcon::colorIconCross |
( |
const QRgb |
bg_color, |
|
|
const QRgb |
fg_color |
|
) |
| |
|
static |
Creates a square icon containing a filled cross (×) in fg_color on a bg_color background.
- Parameters
-
| bg_color | Background fill colour (ARGB). |
| fg_color | Cross fill colour (ARGB). |
- Returns
- Generated QIcon.
◆ colorIconTriangle()
| QIcon StockIcon::colorIconTriangle |
( |
const QRgb |
bg_color, |
|
|
const QRgb |
fg_color |
|
) |
| |
|
static |
Creates a square icon containing a filled triangle in fg_color on a bg_color background.
- Parameters
-
| bg_color | Background fill colour (ARGB). |
| fg_color | Triangle fill colour (ARGB). |
- Returns
- Generated QIcon.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/utils/stock_icon.h
- /builds/wireshark/wireshark/ui/qt/utils/stock_icon.cpp