Pages
API Documentation
On this page

KIconColors Class

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

  • Header: #include <KIconColors>
  • CMake: find_package(KF6 REQUIRED COMPONENTS IconThemes)
    target_link_libraries(mytarget PRIVATE KF6::IconThemes)

List of all members, including inherited members
Deprecated members

Public Functions

Protected Functions

Detailed Description

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

See also KIconEngine, KDE::icon

Member Function Documentation

KIconColors::KIconColors()

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

[explicit] KIconColors::KIconColors(const QColor &color)

Makes all the color properties be color.

[explicit] KIconColors::KIconColors(const QPalette &palette)

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

QColor KIconColors::accent() const

See also setAccent()

QColor KIconColors::background() const

See also setBackground()

QColor KIconColors::highlight() const

See also setHighlight()

QColor KIconColors::highlightedText() const

See also setHighlightedText()

QColor KIconColors::negativeText() const

See also setNegativeText()

QColor KIconColors::neutralText() const

See also setNeutralText()

QColor KIconColors::positiveText() const

See also setPositiveText()

void KIconColors::setAccent(const QColor &color)

See also accent()

void KIconColors::setBackground(const QColor &color)

See also background()

void KIconColors::setHighlight(const QColor &color)

See also highlight()

void KIconColors::setHighlightedText(const QColor &color)

See also highlightedText()

void KIconColors::setNegativeText(const QColor &color)

See also negativeText()

void KIconColors::setNeutralText(const QColor &color)

See also neutralText()

void KIconColors::setPositiveText(const QColor &color)

See also positiveText()

void KIconColors::setText(const QColor &color)

See also text()

[protected] QString KIconColors::stylesheet(KIconLoader::States state) const

Returns a CSS stylesheet to be used SVG icon files. state defines the state we are rendering the stylesheet for

Specifies: .ColorScheme-Text, .ColorScheme-Background, .ColorScheme-Highlight, .ColorScheme-HighlightedText, .ColorScheme-PositiveText, .ColorScheme-NeutralText .ColorScheme-NegativeText, .ColorScheme-Accent

QColor KIconColors::text() const

See also setText()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.