Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkStyleManager Class Reference

Utility class for theme-aware icon and color management. More...

#include <QmitkStyleManager.h>

Public Member Functions

 QmitkStyleManager ()=delete
 
 ~QmitkStyleManager ()=delete
 

Static Public Member Functions

static QIcon ThemeIcon (const QByteArray &originalSVG)
 Creates a theme-colored icon from raw SVG data. More...
 
static QIcon ThemeIcon (const QString &resourcePath)
 Creates a theme-colored icon from an SVG resource file. More...
 
static QString GetIconColor ()
 Returns the primary icon color for the current theme. More...
 
static QString GetIconAccentColor ()
 Returns the accent icon color for the current theme. More...
 

Detailed Description

Utility class for theme-aware icon and color management.

Provides static methods to create icons whose colors adapt to the current application theme (dark/light mode). SVG icons are recolored by replacing a placeholder color with the theme-appropriate icon color.

This class cannot be instantiated.

See also
QmitkColoredNodeDescriptor

Definition at line 33 of file QmitkStyleManager.h.

Constructor & Destructor Documentation

◆ QmitkStyleManager()

QmitkStyleManager::QmitkStyleManager ( )
delete

◆ ~QmitkStyleManager()

QmitkStyleManager::~QmitkStyleManager ( )
delete

Member Function Documentation

◆ GetIconAccentColor()

static QString QmitkStyleManager::GetIconAccentColor ( )
static

Returns the accent icon color for the current theme.

Returns
A CSS-compatible color string.

◆ GetIconColor()

static QString QmitkStyleManager::GetIconColor ( )
static

Returns the primary icon color for the current theme.

Returns
A CSS-compatible color string (e.g., "#ffffff").

◆ ThemeIcon() [1/2]

static QIcon QmitkStyleManager::ThemeIcon ( const QByteArray &  originalSVG)
static

Creates a theme-colored icon from raw SVG data.

Parameters
[in]originalSVGThe original SVG content as a byte array.
Returns
A QIcon with colors adapted to the current theme.

◆ ThemeIcon() [2/2]

static QIcon QmitkStyleManager::ThemeIcon ( const QString &  resourcePath)
static

Creates a theme-colored icon from an SVG resource file.

Parameters
[in]resourcePathThe Qt resource path to the SVG file.
Returns
A QIcon with colors adapted to the current theme.

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