Kstars
schememanager.cpp
519 _effects[Intensity] = cfg.readEntry("IntensityEffect", (int)((state == QPalette::Disabled) ? IntensityDarken : IntensityNoEffect));
520 _effects[Color] = cfg.readEntry("ColorEffect", (int)((state == QPalette::Disabled) ? ColorNoEffect : ColorDesaturate));
521 _effects[Contrast] = cfg.readEntry("ContrastEffect", (int)((state == QPalette::Disabled) ? ContrastFade : ContrastTint));
522 _amount[Intensity] = cfg.readEntry("IntensityAmount", (state == QPalette::Disabled) ? 0.10 : 0.0);
524 _amount[Contrast] = cfg.readEntry("ContrastAmount", (state == QPalette::Disabled) ? 0.65 : 0.25);
709 explicit SchemeManagerPrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors);
710 explicit SchemeManagerPrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors, const QBrush&);
917 bool inactiveSelectionEffect = group.readEntry("ChangeSelectionColor", group.readEntry("Enable", true));
991QColor SchemeManager::shade(const QColor& color, ShadeRole role, qreal contrast, qreal chromaAdjust)
1051void SchemeManager::adjustBackground(QPalette& palette, BackgroundRole newRole, QPalette::ColorRole color,
1054 palette.setBrush(QPalette::Active, color, SchemeManager(QPalette::Active, set, config).background(newRole));
1055 palette.setBrush(QPalette::Inactive, color, SchemeManager(QPalette::Inactive, set, config).background(newRole));
1056 palette.setBrush(QPalette::Disabled, color, SchemeManager(QPalette::Disabled, set, config).background(newRole));
1059void SchemeManager::adjustForeground(QPalette& palette, ForegroundRole newRole, QPalette::ColorRole color,
1062 palette.setBrush(QPalette::Active, color, SchemeManager(QPalette::Active, set, config).foreground(newRole));
1063 palette.setBrush(QPalette::Inactive, color, SchemeManager(QPalette::Inactive, set, config).foreground(newRole));
1064 palette.setBrush(QPalette::Disabled, color, SchemeManager(QPalette::Disabled, set, config).foreground(newRole));
1105 palette.setBrush(state, QPalette::AlternateBase, schemeView.background(SchemeManager::AlternateBackground));
1107 palette.setBrush(state, QPalette::LinkVisited, schemeView.foreground(SchemeManager::VisitedText));
QString readEntry(const char *key, const char *aDefault=nullptr) const
ColorSet
This enumeration describes the color set for which a color is being selected.
Definition schememanager.h:64
QBrush background(BackgroundRole=NormalBackground) const
Retrieve the requested background brush.
Definition schememanager.cpp:966
static void adjustBackground(QPalette &, BackgroundRole newRole=NormalBackground, QPalette::ColorRole color=QPalette::Base, ColorSet set=View, KSharedConfigPtr=KSharedConfigPtr())
Adjust a QPalette by replacing the specified QPalette::ColorRole with the requested background color ...
Definition schememanager.cpp:1051
static qreal contrastF(const KSharedConfigPtr &config=KSharedConfigPtr())
Returns the contrast for borders as a floating point value.
Definition schememanager.cpp:954
BackgroundRole
This enumeration describes the background color being selected from the given set.
Definition schememanager.h:124
@ PositiveBackground
Eigth color; for example, success messages, trusted content.
Definition schememanager.h:174
@ AlternateBackground
Alternate background; for example, for use in lists.
Definition schememanager.h:135
@ ActiveBackground
Third color; for example, items which are new, active, requesting attention, etc.
Definition schememanager.h:145
@ NegativeBackground
Sixth color; for example, errors, untrusted content, etc.
Definition schememanager.h:166
@ NeutralBackground
Seventh color; for example, warnings, secure/encrypted content.
Definition schememanager.h:170
ForegroundRole
This enumeration describes the foreground color being selected from the given set.
Definition schememanager.h:194
@ InactiveText
Second color; for example, comments, items which are old, inactive or disabled.
Definition schememanager.h:205
@ ActiveText
Third color; for example items which are new, active, requesting attention, etc.
Definition schememanager.h:210
@ NegativeText
Sixth color; for example, errors, untrusted content, deletions, etc.
Definition schememanager.h:229
@ NeutralText
Seventh color; for example, warnings, secure/encrypted content.
Definition schememanager.h:233
@ PositiveText
Eigth color; for example, additions, success messages, trusted content.
Definition schememanager.h:238
SchemeManager & operator=(const SchemeManager &)
Standard assignment operator.
Definition schememanager.cpp:892
static void adjustForeground(QPalette &, ForegroundRole newRole=NormalText, QPalette::ColorRole color=QPalette::Text, ColorSet set=View, KSharedConfigPtr=KSharedConfigPtr())
Adjust a QPalette by replacing the specified QPalette::ColorRole with the requested foreground color ...
Definition schememanager.cpp:1059
DecorationRole
This enumeration describes the decoration color being selected from the given set.
Definition schememanager.h:251
@ FocusColor
Color used to draw decorations for items which have input focus.
Definition schememanager.h:255
static QPalette createApplicationPalette(const KSharedConfigPtr &config)
Used to obtain the QPalette that will be used to set the application palette from KDE Platform theme.
Definition schememanager.cpp:1067
QColor shade(ShadeRole) const
Retrieve the requested shade color, using SchemeManager::background(SchemeManager::NormalBackground) ...
Definition schememanager.cpp:981
QBrush decoration(DecorationRole) const
Retrieve the requested decoration brush.
Definition schememanager.cpp:976
ShadeRole
This enumeration describes the color shade being selected from the given set.
Definition schememanager.h:272
@ LightShade
The light color is lighter than dark() or shadow() and contrasts with the base color.
Definition schememanager.h:277
@ ShadowShade
The shadow color is darker than light() or midlight() and contrasts the base color.
Definition schememanager.h:294
QBrush foreground(ForegroundRole=NormalText) const
Retrieve the requested foreground brush.
Definition schememanager.cpp:971
SchemeManager(const SchemeManager &)
Construct a copy of another SchemeManager.
Definition schememanager.cpp:884
KGUIADDONS_EXPORT QColor darken(const QColor &, qreal amount=0.5, qreal chromaGain=1.0)
KGUIADDONS_EXPORT QColor overlayColors(const QColor &base, const QColor &paint, QPainter::CompositionMode comp=QPainter::CompositionMode_SourceOver)
KGUIADDONS_EXPORT void getHcy(const QColor &, qreal *hue, qreal *chroma, qreal *luma, qreal *alpha=nullptr)
KGUIADDONS_EXPORT qreal luma(const QColor &)
KGUIADDONS_EXPORT QColor shade(const QColor &, qreal lumaAmount, qreal chromaAmount=0.0)
KGUIADDONS_EXPORT QColor mix(const QColor &c1, const QColor &c2, qreal bias=0.5)
KGUIADDONS_EXPORT QColor tint(const QColor &base, const QColor &color, qreal amount=0.3)
KGUIADDONS_EXPORT QColor lighten(const QColor &, qreal amount=0.5, qreal chromaInverseGain=1.0)
KGUIADDONS_EXPORT qreal contrastRatio(const QColor &, const QColor &)
QString normalize(QStringView str)
const QColor & color() const const
float alphaF() const const
float blueF() const const
QColor fromRgbF(float r, float g, float b, float a)
float greenF() const const
float redF() const const
void setAlpha(int alpha)
Format_ARGB32_Premultiplied
CompositionMode
ColorGroup
ColorRole
void setBrush(ColorGroup group, ColorRole role, const QBrush &brush)
void setColor(ColorGroup group, ColorRole role, const QColor &color)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.