KIconColors

Search for usage in LXR

#include <kiconcolors.h>

Public Member Functions

 KIconColors ()
 
 KIconColors (const KIconColors &other)
 
 KIconColors (const QColor &colors)
 
 KIconColors (const QPalette &palette)
 
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

Definition at line 30 of file kiconcolors.h.

Constructor & Destructor Documentation

◆ KIconColors() [1/3]

KIconColors::KIconColors ( )

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

Definition at line 66 of file kiconcolors.cpp.

◆ KIconColors() [2/3]

KIconColors::KIconColors ( const QColor colors)
explicit

Makes all the color property be colors.

Definition at line 84 of file kiconcolors.cpp.

◆ 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);

Definition at line 97 of file kiconcolors.cpp.

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

Definition at line 125 of file kiconcolors.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:00:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.