34#include <NDEVR/Buffer.h>
35#include <NDEVR/String.h>
36#include <NDEVR/File.h>
37#include <NDEVR/Dictionary.h>
38#include <NDEVR/RGBColor.h>
39#include <NDEVR/LABColor.h>
40#include <NDEVR/Resource.h>
41#include <NDEVR/UUID.h>
42#include <qiconengine.h>
79 [[nodiscard]]
UUID id()
const {
return m_id; }
89 virtual void paint(QPainter* painter,
const QRect& rect, QIcon::Mode mode, QIcon::State state)
override;
90 virtual QPixmap pixmap(
const QSize& size, QIcon::Mode mode, QIcon::State state)
override;
91 virtual QIconEngine* clone(
void)
const override;
92 QSize actualSize(
const QSize& size, QIcon::Mode mode, QIcon::State state)
override;
109 friend class NDEVRSVGIconEngine;
116 static void GetIconResource(
const std::function<
void(
const String&,
const QIcon&)>& on_finished,
const String& icon, QIcon::Mode mode = QIcon::Mode::Normal);
117 static void GetIconResource(
const std::function<
void(
const String&,
const QIcon&)>& on_finished,
const String& icon,
const IconThemeSettings& theme, QIcon::Mode mode = QIcon::Mode::Normal);
118 static void GetPixmapResource(
const std::function<
void(
const String&,
const QPixmap&)>& on_finished,
const String& pixmap, QIcon::Mode mode = QIcon::Mode::Normal,
const QSize& requested_size = QSize());
120 static QIcon GetIconResourceBlocking(
const String& icon, QIcon::Mode mode = QIcon::Mode::Normal);
121 static QIcon GetIconResourceBlocking(
const String& icon,
const IconThemeSettings& theme, QIcon::Mode mode = QIcon::Mode::Normal);
122 static QPixmap LocalPixmapResource(
const String& pixmap, QIcon::Mode mode = QIcon::Mode::Normal,
const QSize& requested_size = QSize());
123 static void PostIconResourceLoad(
const String&
id);
124 static void SetWindowIcon(
const String& s, QWidget* widget);
125 static void ClearWindowIcon(QWidget* widget);
127 static void ConvertColorTheme(
const Buffer<std::pair<RGBColor, RGBColor>>& colors,
const Buffer<File>& in,
const File& out_location,
bool preserve_brightness,
bool preserve_alpha,
Log* log =
nullptr);
128 static void ConvertColorTheme(
const Buffer<std::pair<RGBColor, RGBColor>>& colors,
const File& in_location,
const File& out_location,
bool preserve_brightness,
bool preserve_alpha,
Log* log =
nullptr);
129 static void ConvertColorTheme(
const Buffer<std::pair<LABColor, LABColor>>& color, QImage& image,
bool preserve_brightness,
bool preserve_alpha);
130 static QImage AutoCrop(
const QImage& pixmap,
int margin = 0,
bool preserve_ratio =
false);
131 static const QPixmap& disabledPixmap(
const String& icon_name);
132 static QImage FillBackground(
const QImage& pixmap,
RGBColor color);
133 static QImage CleanupImageForIcon(
const QImage& image);
149 static QIcon icon(
const String& icon, QIcon::Mode mode = QIcon::Mode::Normal);
151 static QPixmap pixmap(
const String& pixmap, QIcon::Mode mode = QIcon::Mode::Normal,
const QSize& requested_size = QSize());
bool operator!=(const VkVertexInputAttributeDescription &a, const VkVertexInputAttributeDescription &b)
Definition VulkanRenderObject.cpp:10
bool operator==(const VkVertexInputAttributeDescription &a, const VkVertexInputAttributeDescription &b)
Definition VulkanRenderObject.cpp:18
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition QTIconManager.h:84
QIcon::Mode m_override_mode
Definition QTIconManager.h:96
QSize m_default_size
Definition QTIconManager.h:97
String m_icon
Definition QTIconManager.h:95
QPixmap m_cached_pixmap
Definition QTIconManager.h:94
Definition Dictionary.h:48
Definition QTIconManager.h:72
virtual QIcon createIcon(const String &icon, const IconThemeSettings &theme, QIcon::Mode mode=QIcon::Mode::Normal)=0
NDEVRIconEngine(const UUID &id)
Definition QTIconManager.h:74
UUID id() const
Definition QTIconManager.h:79
virtual bool canProcess(const String &icon, const IconThemeSettings &theme, QIcon::Mode mode) const =0
Definition QTIconManager.h:100
virtual bool canPotentiallyResolve(const String &pixmap_resource)=0
virtual UUID id() const =0
virtual QPixmap resolve(const String &pixmap_resource, QIcon::Mode mode, const QSize &requested_size, Dictionary< String, QPixmap > &pixmaps)=0
Definition QTIconManager.h:108
static Resource< IconThemeSettings > s_icon_theme
Definition QTIconManager.h:138
static Resource< IconThemeSettings * > s_overide_icon_theme
Definition QTIconManager.h:137
static constexpr const char * NDEVRThemeLocation()
Definition QTIconManager.h:141
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Definition StringStream.h:62
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition QTIconManager.h:55
RGBColor secondary_color
Definition QTIconManager.h:62
String theme_name
Definition QTIconManager.h:58
bool blend_color
Definition QTIconManager.h:67
fltp08 pixel_size
Definition QTIconManager.h:65
String theme_icon_location
Definition QTIconManager.h:59
String theme_icon
Definition QTIconManager.h:57
RGBColor primary_color
Definition QTIconManager.h:61
RGBColor highlight_color
Definition QTIconManager.h:60
bool colorize_svgs
Definition QTIconManager.h:66
RGBColor accent_color
Definition QTIconManager.h:63
RGBColor outline_color
Definition QTIconManager.h:64