KIconThemes 5.109.0
Public Member Functions | Protected Member Functions | List of all members
KIconColors

Sepecifies which colors will be used when recoloring icons as its stylesheet. More...

#include <kiconcolors.h>

Public Member Functions

 KIconColors ()
 Will fill the colors based on the default QPalette() constructor.
 
 KIconColors (const KIconColors &other)
 
 KIconColors (const QColor &colors)
 Makes all the color property be colors.
 
 KIconColors (const QPalette &palette)
 Uses @palette to define text, highlight, highlightedText and background.
 
QColor activeText () const
 
QColor background () const
 
QColor highlight () const
 
QColor highlightedText () const
 
QColor negativeText () const
 
QColor neutralText () const
 
KIconColors operator= (const KIconColors &other)
 
QColor positiveText () const
 
void setActiveText (const QColor &color)
 
void setBackground (const QColor &color)
 
void setHighlight (const QColor &color)
 
void setHighlightedText (const QColor &color)
 
void setNegativeText (const QColor &color)
 
void setNeutralText (const QColor &color)
 
void setPositiveText (const QColor &color)
 
void setText (const QColor &color)
 
QColor text () const
 

Protected Member Functions

QString stylesheet (KIconLoader::States state) const
 

Detailed Description

Sepecifies which colors will be used when recoloring icons as its stylesheet.

KIconLoader supports re-coloring svg icons based on a set of colors. This class will define them.

See also
KIconEngine
KDE::icon

Constructor & Destructor Documentation

◆ KIconColors() [1/3]

KIconColors::KIconColors ( )

Will fill the colors based on the default QPalette() constructor.

◆ KIconColors() [2/3]

KIconColors::KIconColors ( const QColor &  colors)
explicit

Makes all the color property be colors.

◆ KIconColors() [3/3]

KIconColors::KIconColors ( const QPalette &  palette)
explicit

Uses @palette to define text, highlight, highlightedText and background.

The rest being positiveText, negativeText and neutralText are filled from KColorScheme(QPalette::Active, KColorScheme::Window);

Member Function Documentation

◆ stylesheet()

QString KIconColors::stylesheet ( KIconLoader::States  state) const
protected
Returns
a CSS stylesheet to be used SVG icon files.
Parameters
statedefines the state we are rendering the stylesheet for

Specifies: .ColorScheme-Text, .ColorScheme-Background, .ColorScheme-Highlight, .ColorScheme-HighlightedText, .ColorScheme-PositiveText, .ColorScheme-NeutralText .ColorScheme-NegativeText, .ColorScheme-ActiveText, .ColorScheme-Complement, .ColorScheme-Contrast