KIconThemes 5.109.0
kiconcolors.h
1/* vi: ts=8 sts=4 sw=4
2
3 This file is part of the KDE project, module kdecore.
4 SPDX-FileCopyrightText: 2000 Geert Jansen <jansen@kde.org>
5 SPDX-FileCopyrightText: 2000 Antonio Larrosa <larrosa@kde.org>
6
7 SPDX-License-Identifier: LGPL-2.0-only
8*/
9
10#ifndef KICONCOLORS_H
11#define KICONCOLORS_H
12
13#include "kiconloader.h"
14#include <QPalette>
15#include <QSharedDataPointer>
16
17class KIconColorsPrivate;
18
30class KICONTHEMES_EXPORT KIconColors
31{
32public:
37
41 explicit KIconColors(const QColor &colors);
42
48 explicit KIconColors(const QPalette &palette);
49
50 KIconColors(const KIconColors &other);
52 KIconColors operator=(const KIconColors &other);
53
54 QColor text() const;
55 QColor highlight() const;
56 QColor highlightedText() const;
57 QColor background() const;
58 QColor neutralText() const;
59 QColor positiveText() const;
60 QColor negativeText() const;
61 QColor activeText() const;
62
63 void setText(const QColor &color);
64 void setHighlight(const QColor &color);
65 void setHighlightedText(const QColor &color);
66 void setBackground(const QColor &color);
67 void setNeutralText(const QColor &color);
68 void setPositiveText(const QColor &color);
69 void setNegativeText(const QColor &color);
70 void setActiveText(const QColor& color);
71
72protected:
82 QString stylesheet(KIconLoader::States state) const;
83
84private:
85 Q_DECLARE_PRIVATE(KIconColors)
86 friend class KIconLoaderPrivate;
87
88 QExplicitlySharedDataPointer<KIconColorsPrivate> d_ptr;
89};
90
91#endif
Sepecifies which colors will be used when recoloring icons as its stylesheet.
Definition kiconcolors.h:31
KIconColors(const QColor &colors)
Makes all the color property be colors.
KIconColors(const QPalette &palette)
Uses @palette to define text, highlight, highlightedText and background.
KIconColors()
Will fill the colors based on the default QPalette() constructor.
QString stylesheet(KIconLoader::States state) const
States
Defines the possible states of an icon.
Definition kiconloader.h:175