kstars
schememanager.cpp
Go to the documentation of this file.
533 _effects[Intensity] = cfg.readEntry("IntensityEffect", (int)((state == QPalette::Disabled) ? IntensityDarken : IntensityNoEffect));
534 _effects[Color] = cfg.readEntry("ColorEffect", (int)((state == QPalette::Disabled) ? ColorNoEffect : ColorDesaturate));
535 _effects[Contrast] = cfg.readEntry("ContrastEffect", (int)((state == QPalette::Disabled) ? ContrastFade : ContrastTint));
536 _amount[Intensity] = cfg.readEntry("IntensityAmount", (state == QPalette::Disabled) ? 0.10 : 0.0);
538 _amount[Contrast] = cfg.readEntry("ContrastAmount", (state == QPalette::Disabled) ? 0.65 : 0.25);
723 explicit SchemeManagerPrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors);
724 explicit SchemeManagerPrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors, const QBrush&);
931 bool inactiveSelectionEffect = group.readEntry("ChangeSelectionColor", group.readEntry("Enable", true));
954 d = new SchemeManagerPrivate(config, state, "Colors:Complementary", defaultComplementaryColors);
1005 QColor SchemeManager::shade(const QColor& color, ShadeRole role, qreal contrast, qreal chromaAdjust)
1065 void SchemeManager::adjustBackground(QPalette& palette, BackgroundRole newRole, QPalette::ColorRole color,
1068 palette.setBrush(QPalette::Active, color, SchemeManager(QPalette::Active, set, config).background(newRole));
1069 palette.setBrush(QPalette::Inactive, color, SchemeManager(QPalette::Inactive, set, config).background(newRole));
1070 palette.setBrush(QPalette::Disabled, color, SchemeManager(QPalette::Disabled, set, config).background(newRole));
1073 void SchemeManager::adjustForeground(QPalette& palette, ForegroundRole newRole, QPalette::ColorRole color,
1076 palette.setBrush(QPalette::Active, color, SchemeManager(QPalette::Active, set, config).foreground(newRole));
1077 palette.setBrush(QPalette::Inactive, color, SchemeManager(QPalette::Inactive, set, config).foreground(newRole));
1078 palette.setBrush(QPalette::Disabled, color, SchemeManager(QPalette::Disabled, set, config).foreground(newRole));
1119 palette.setBrush(state, QPalette::AlternateBase, schemeView.background(SchemeManager::AlternateBackground));
1121 palette.setBrush(state, QPalette::LinkVisited, schemeView.foreground(SchemeManager::VisitedText));
void setBrush(ColorRole role, const QBrush &brush)
Fourth color; corresponds to (unvisited) links.
Definition: schememanager.h:168
Eigth color; for example, success messages, trusted content.
Definition: schememanager.h:188
bool end()
QColor darken(const QColor &color, qreal ky=0.5, qreal kc=1.0)
Adjust the luma of a color by changing its distance from black.
Definition: schememanager.cpp:158
void fillRect(const QRectF &rectangle, const QBrush &brush)
void setCompositionMode(CompositionMode mode)
qreal alphaF() const
void setColor(ColorGroup group, ColorRole role, const QColor &color)
qreal redF() const
qreal blueF() const
Fifth color; corresponds to visited links.
Definition: schememanager.h:176
void setAlpha(int alpha)
The midlight color is in between base() and light().
Definition: schememanager.h:295
static const SetDefaultColors defaultSelectionColors
Definition: schememanager.cpp:669
static const SetDefaultColors defaultComplementaryColors
Definition: schememanager.cpp:697
QBrush foreground(ForegroundRole=NormalText) const
Retrieve the requested foreground brush.
Definition: schememanager.cpp:985
SchemeManager(const SchemeManager &)
Construct a copy of another SchemeManager.
Definition: schememanager.cpp:898
static qreal mixQreal(qreal a, qreal b, qreal bias)
Definition: schememanager.cpp:81
Non-editable window elements; for example, menus.
Definition: schememanager.h:90
Color used to draw decorations for items which have input focus.
Definition: schememanager.h:269
const QColor & color() const
QColor lighten(const QColor &color, qreal ky=0.5, qreal kc=1.0)
Adjust the luma of a color by changing its distance from white.
Definition: schememanager.cpp:146
QRgb pixel(int x, int y) const
Seventh color; for example, warnings, secure/encrypted content.
Definition: schememanager.h:247
Seventh color; for example, warnings, secure/encrypted content.
Definition: schememanager.h:184
static qreal contrastRatioForLuma(qreal y1, qreal y2)
Calculate the contrast ratio between two colors, according to the W3C/WCAG2.0 algorithm, (Lmax + 0.05)/(Lmin + 0.05), where Lmax and Lmin are the luma values of the lighter color and the darker color, respectively.
Definition: schememanager.cpp:128
Eigth color; for example, additions, success messages, trusted content.
Definition: schememanager.h:252
QBrush decoration(DecorationRole) const
Retrieve the requested decoration brush.
Definition: schememanager.cpp:990
bool isEmpty() const
static QColor tintHelper(const QColor &base, qreal baseLuma, const QColor &color, qreal amount)
Definition: schememanager.cpp:208
QColor mix(const QColor &c1, const QColor &c2, qreal bias)
Blend two colors into a new color by linear combination.
Definition: schememanager.cpp:183
qreal greenF() const
ColorSet
This enumeration describes the color set for which a color is being selected.
Definition: schememanager.h:77
Sixth color; for example, errors, untrusted content, deletions, etc.
Definition: schememanager.h:243
static qreal contrastF(const KSharedConfigPtr &config=KSharedConfigPtr())
Returns the contrast for borders as a floating point value.
Definition: schememanager.cpp:968
QColor shade(ShadeRole) const
Retrieve the requested shade color, using SchemeManager::background(SchemeManager::NormalBackground) ...
Definition: schememanager.cpp:995
Sixth color; for example, errors, untrusted content, etc.
Definition: schememanager.h:180
QColor fromRgbF(qreal r, qreal g, qreal b, qreal a)
qreal contrastRatio(const QColor &c1, const QColor &c2)
Definition: schememanager.cpp:138
static const SetDefaultColors defaultTooltipColors
Definition: schememanager.cpp:683
QColor shade(const QColor &color, qreal ky, qreal kc=0.0)
Adjust the luma and chroma components of a color.
Definition: schememanager.cpp:171
Third color; for example, items which are new, active, requesting attention, etc. ...
Definition: schememanager.h:159
ForegroundRole
This enumeration describes the foreground color being selected from the given set.
Definition: schememanager.h:207
The dark color is in between mid() and shadow().
Definition: schememanager.h:303
static const SetDefaultColors defaultButtonColors
Definition: schememanager.cpp:655
Third color; for example items which are new, active, requesting attention, etc.
Definition: schememanager.h:224
QColor tint(const QColor &base, const QColor &color, qreal amount=0.3)
Create a new color by tinting one color with another.
Definition: schememanager.cpp:228
Alternate background; for example, for use in lists.
Definition: schememanager.h:149
SchemeManager & operator=(const SchemeManager &)
Standard assignment operator.
Definition: schememanager.cpp:906
The mid color is in between base() and dark().
Definition: schememanager.h:299
The light color is lighter than dark() or shadow() and contrasts with the base color.
Definition: schememanager.h:291
BackgroundRole
This enumeration describes the background color being selected from the given set.
Definition: schememanager.h:137
static qreal normalize(qreal a)
normalize: like qBound(a, 0.0, 1.0) but without needing the args and with "safer" behavior on NaN (is...
Definition: schememanager.cpp:76
QBrush background(BackgroundRole=NormalBackground) const
Retrieve the requested background brush.
Definition: schememanager.cpp:980
static const SetDefaultColors defaultWindowColors
Definition: schememanager.cpp:641
QColor overlayColors(const QColor &base, const QColor &paint, QPainter::CompositionMode comp)
Blend two colors into a new color by painting the second color over the first using the specified com...
Definition: schememanager.cpp:278
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:1065
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:1073
static const DecoDefaultColors defaultDecorationColors
Definition: schememanager.cpp:711
The shadow color is darker than light() or midlight() and contrasts the base color.
Definition: schememanager.h:308
Second color; for example, comments, items which are old, inactive or disabled.
Definition: schememanager.h:219
void getHcy(const QColor &color, qreal *h, qreal *c, qreal *y, qreal *a=0)
Calculate hue, chroma and luma of a color in one call.
Definition: schememanager.cpp:100
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:1081
DecorationRole
This enumeration describes the decoration color being selected from the given set.
Definition: schememanager.h:264
ShadeRole
This enumeration describes the color shade being selected from the given set.
Definition: schememanager.h:285
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Wed Dec 11 2019 07:20:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Wed Dec 11 2019 07:20:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.