API Documentation
Loading...
Searching...
No Matches
QTIconManager Class Reference

Manages all Icons and Pixmaps used by the UI in the NDEVR Engine. Icons may be fetched remotely so callbacks are used to specify the action to take when the resouce is retrieved. More...

#include <QTIconManager.h>

Collaboration diagram for QTIconManager:
[legend]

Static Public Member Functions

static void AddIconEngine (NDEVRIconEngine *engine)
 
static void addIconTheme (const IconThemeSettings &theme)
 
static void AddResolver (PixmapResolver *resolver)
 
static QImage AutoCrop (const QImage &pixmap, int margin=0, bool preserve_ratio=false)
 
static QImage CleanupImageForIcon (const QImage &image)
 
static void ClearWindowIcon (QWidget *widget)
 
static Buffer< std::pair< LABColor, LABColor > > ConvertColorPalette (const Buffer< std::pair< RGBColor, RGBColor > > &palette)
 
static void ConvertColorTheme (const Buffer< std::pair< LABColor, LABColor > > &color, QImage &image, bool preserve_brightness, bool preserve_alpha)
 
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)
 
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)
 
static const QPixmap & disabledPixmap (const String &icon_name)
 
static const IconThemeSettingsEffectiveIconTheme ()
 
static QImage FillBackground (const QImage &pixmap, RGBColor color)
 
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)
 
static void GetIconResource (const std::function< void(const String &, const QIcon &)> &on_finished, const String &icon, QIcon::Mode mode=QIcon::Mode::Normal)
 
static QIcon GetIconResourceBlocking (const String &icon, const IconThemeSettings &theme, QIcon::Mode mode=QIcon::Mode::Normal)
 
static QIcon GetIconResourceBlocking (const String &icon, QIcon::Mode mode=QIcon::Mode::Normal)
 
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())
 
static String GetSVGPath (const String &icon, const IconThemeSettings &theme)
 
static String IconCacheLocation (const String &icon, const IconThemeSettings &theme)
 
static const Buffer< IconThemeSettings > & iconThemes ()
 
static String ImageCacheLocation (const String &icon)
 
static QPixmap LocalPixmapResource (const String &pixmap, QIcon::Mode mode=QIcon::Mode::Normal, const QSize &requested_size=QSize())
 
static IconThemeSettings NDEVRIconTheme ()
 
static constexpr const char * NDEVRThemeLocation ()
 
static IconThemeSettings OutlineIconTheme ()
 
static void PostIconResourceLoad (const String &id)
 
static void SetLightingTheme (const IconThemeSettings &theme)
 
static void SetOverrideTheme (IconThemeSettings *theme)
 
static void SetWindowIcon (const String &s, QWidget *widget)
 

Static Public Attributes

static Resource< IconThemeSettingss_icon_theme
 
static Resource< IconThemeSettings * > s_overide_icon_theme
 

Static Protected Member Functions

static File GetImagePath (const String &icon)
 
static QIcon icon (const String &icon, const IconThemeSettings &theme, QIcon::Mode mode=QIcon::Mode::Normal)
 
static QIcon icon (const String &icon, QIcon::Mode mode=QIcon::Mode::Normal)
 
static QPixmap pixmap (const String &pixmap, QIcon::Mode mode=QIcon::Mode::Normal, const QSize &requested_size=QSize())
 

Friends

class DeferredImageIconEngine
 
class NDEVRSVGIconEngine
 

Detailed Description

Manages all Icons and Pixmaps used by the UI in the NDEVR Engine. Icons may be fetched remotely so callbacks are used to specify the action to take when the resouce is retrieved.


Member Function Documentation

◆ AddIconEngine()

static void AddIconEngine ( NDEVRIconEngine * engine)
static

◆ addIconTheme()

static void addIconTheme ( const IconThemeSettings & theme)
static

◆ AddResolver()

static void AddResolver ( PixmapResolver * resolver)
static

◆ AutoCrop()

static QImage AutoCrop ( const QImage & pixmap,
int margin = 0,
bool preserve_ratio = false )
static

◆ CleanupImageForIcon()

static QImage CleanupImageForIcon ( const QImage & image)
static

◆ ClearWindowIcon()

static void ClearWindowIcon ( QWidget * widget)
static

◆ ConvertColorPalette()

static Buffer< std::pair< LABColor, LABColor > > ConvertColorPalette ( const Buffer< std::pair< RGBColor, RGBColor > > & palette)
static

◆ ConvertColorTheme() [1/3]

static void ConvertColorTheme ( const Buffer< std::pair< LABColor, LABColor > > & color,
QImage & image,
bool preserve_brightness,
bool preserve_alpha )
static

◆ ConvertColorTheme() [2/3]

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 )
static

◆ ConvertColorTheme() [3/3]

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 )
static

◆ disabledPixmap()

static const QPixmap & disabledPixmap ( const String & icon_name)
static

◆ EffectiveIconTheme()

static const IconThemeSettings & EffectiveIconTheme ( )
static

◆ FillBackground()

static QImage FillBackground ( const QImage & pixmap,
RGBColor color )
static

◆ GetIconResource() [1/2]

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 )
static

◆ GetIconResource() [2/2]

static void GetIconResource ( const std::function< void(const String &, const QIcon &)> & on_finished,
const String & icon,
QIcon::Mode mode = QIcon::Mode::Normal )
static

◆ GetIconResourceBlocking() [1/2]

static QIcon GetIconResourceBlocking ( const String & icon,
const IconThemeSettings & theme,
QIcon::Mode mode = QIcon::Mode::Normal )
static

◆ GetIconResourceBlocking() [2/2]

static QIcon GetIconResourceBlocking ( const String & icon,
QIcon::Mode mode = QIcon::Mode::Normal )
static

◆ GetImagePath()

static File GetImagePath ( const String & icon)
staticprotected

◆ GetPixmapResource()

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() )
static

◆ GetSVGPath()

static String GetSVGPath ( const String & icon,
const IconThemeSettings & theme )
static

◆ icon() [1/2]

static QIcon icon ( const String & icon,
const IconThemeSettings & theme,
QIcon::Mode mode = QIcon::Mode::Normal )
staticprotected

◆ icon() [2/2]

static QIcon icon ( const String & icon,
QIcon::Mode mode = QIcon::Mode::Normal )
staticprotected

◆ IconCacheLocation()

static String IconCacheLocation ( const String & icon,
const IconThemeSettings & theme )
static

◆ iconThemes()

static const Buffer< IconThemeSettings > & iconThemes ( )
static

◆ ImageCacheLocation()

static String ImageCacheLocation ( const String & icon)
static

◆ LocalPixmapResource()

static QPixmap LocalPixmapResource ( const String & pixmap,
QIcon::Mode mode = QIcon::Mode::Normal,
const QSize & requested_size = QSize() )
static

◆ NDEVRIconTheme()

static IconThemeSettings NDEVRIconTheme ( )
static

◆ NDEVRThemeLocation()

static constexpr const char * NDEVRThemeLocation ( )
inlinestaticconstexpr

◆ OutlineIconTheme()

static IconThemeSettings OutlineIconTheme ( )
static

◆ pixmap()

static QPixmap pixmap ( const String & pixmap,
QIcon::Mode mode = QIcon::Mode::Normal,
const QSize & requested_size = QSize() )
staticprotected

◆ PostIconResourceLoad()

static void PostIconResourceLoad ( const String & id)
static

◆ SetLightingTheme()

static void SetLightingTheme ( const IconThemeSettings & theme)
static

◆ SetOverrideTheme()

static void SetOverrideTheme ( IconThemeSettings * theme)
static

◆ SetWindowIcon()

static void SetWindowIcon ( const String & s,
QWidget * widget )
static

Friends And Related Symbol Documentation

◆ DeferredImageIconEngine

friend class DeferredImageIconEngine
friend

◆ NDEVRSVGIconEngine

friend class NDEVRSVGIconEngine
friend

Member Data Documentation

◆ s_icon_theme

Resource<IconThemeSettings> s_icon_theme
static

◆ s_overide_icon_theme

Resource<IconThemeSettings*> s_overide_icon_theme
static

The documentation for this class was generated from the following file: