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 accent () const
 
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 setAccent (const QColor &color)
 
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/4]

KIconColors::KIconColors ( )

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

Definition at line 69 of file kiconcolors.cpp.

◆ KIconColors() [2/4]

KIconColors::KIconColors ( const QColor & colors)
explicit

Makes all the color property be colors.

Definition at line 87 of file kiconcolors.cpp.

◆ KIconColors() [3/4]

KIconColors::KIconColors ( const QPalette & palette)
explicit

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

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

Definition at line 101 of file kiconcolors.cpp.

◆ KIconColors() [4/4]

KIconColors::KIconColors ( const KIconColors & other)

Definition at line 74 of file kiconcolors.cpp.

◆ ~KIconColors()

KIconColors::~KIconColors ( )

Definition at line 126 of file kiconcolors.cpp.

Member Function Documentation

◆ accent()

QColor KIconColors::accent ( ) const

Definition at line 182 of file kiconcolors.cpp.

◆ activeText()

QColor KIconColors::activeText ( ) const

Definition at line 218 of file kiconcolors.cpp.

◆ background()

QColor KIconColors::background ( ) const

Definition at line 188 of file kiconcolors.cpp.

◆ highlight()

QColor KIconColors::highlight ( ) const

Definition at line 170 of file kiconcolors.cpp.

◆ highlightedText()

QColor KIconColors::highlightedText ( ) const

Definition at line 176 of file kiconcolors.cpp.

◆ negativeText()

QColor KIconColors::negativeText ( ) const

Definition at line 200 of file kiconcolors.cpp.

◆ neutralText()

QColor KIconColors::neutralText ( ) const

Definition at line 212 of file kiconcolors.cpp.

◆ operator=()

KIconColors KIconColors::operator= ( const KIconColors & other)

Definition at line 79 of file kiconcolors.cpp.

◆ positiveText()

QColor KIconColors::positiveText ( ) const

Definition at line 206 of file kiconcolors.cpp.

◆ setAccent()

void KIconColors::setAccent ( const QColor & color)

Definition at line 248 of file kiconcolors.cpp.

◆ setActiveText()

void KIconColors::setActiveText ( const QColor & color)

Definition at line 272 of file kiconcolors.cpp.

◆ setBackground()

void KIconColors::setBackground ( const QColor & color)

Definition at line 230 of file kiconcolors.cpp.

◆ setHighlight()

void KIconColors::setHighlight ( const QColor & color)

Definition at line 236 of file kiconcolors.cpp.

◆ setHighlightedText()

void KIconColors::setHighlightedText ( const QColor & color)

Definition at line 242 of file kiconcolors.cpp.

◆ setNegativeText()

void KIconColors::setNegativeText ( const QColor & color)

Definition at line 254 of file kiconcolors.cpp.

◆ setNeutralText()

void KIconColors::setNeutralText ( const QColor & color)

Definition at line 260 of file kiconcolors.cpp.

◆ setPositiveText()

void KIconColors::setPositiveText ( const QColor & color)

Definition at line 266 of file kiconcolors.cpp.

◆ setText()

void KIconColors::setText ( const QColor & color)

Definition at line 224 of file kiconcolors.cpp.

◆ 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, .ColorScheme-Accent,

Definition at line 134 of file kiconcolors.cpp.

◆ text()

QColor KIconColors::text ( ) const

Definition at line 194 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-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:50:32 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.