KDEUI
kcolorscheme.cpp
Go to the documentation of this file.
93 _amount[Intensity] = cfg.readEntry( "IntensityAmount", state == QPalette::Disabled ? 0.10 : 0.0 );
95 _amount[Contrast] = cfg.readEntry( "ContrastAmount", state == QPalette::Disabled ? 0.65 : 0.25 );
97 _color = cfg.readEntry( "Color", state == QPalette::Disabled ? QColor(56, 56, 56) : QColor(112, 111, 110));
246 explicit KColorSchemePrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors);
247 explicit KColorSchemePrivate(const KSharedConfigPtr&, QPalette::ColorGroup, const char*, SetDefaultColors, const QBrush&);
435 bool inactiveSelectionEffect = group.readEntry("ChangeSelectionColor", group.readEntry("Enable", true));
479 QColor KColorScheme::shade(const QColor &color, ShadeRole role, qreal contrast, qreal chromaAdjust)
530 void KColorScheme::adjustBackground(QPalette &palette, BackgroundRole newRole, QPalette::ColorRole color,
532 palette.setBrush(QPalette::Active, color, KColorScheme(QPalette::Active, set, config).background(newRole));
533 palette.setBrush(QPalette::Inactive, color, KColorScheme(QPalette::Inactive, set, config).background(newRole));
534 palette.setBrush(QPalette::Disabled, color, KColorScheme(QPalette::Disabled, set, config).background(newRole));
537 void KColorScheme::adjustForeground(QPalette &palette, ForegroundRole newRole, QPalette::ColorRole color,
539 palette.setBrush(QPalette::Active, color, KColorScheme(QPalette::Active, set, config).foreground(newRole));
540 palette.setBrush(QPalette::Inactive, color, KColorScheme(QPalette::Inactive, set, config).foreground(newRole));
541 palette.setBrush(QPalette::Disabled, color, KColorScheme(QPalette::Disabled, set, config).foreground(newRole));
QColor darken(const QColor &, qreal amount=0.5, qreal chromaGain=1.0)
Adjust the luma of a color by changing its distance from black.
Definition: kcolorutils.cpp:63
The light color is lighter than dark() or shadow() and contrasts with the base color.
Definition: kcolorscheme.h:280
QBrush background(BackgroundRole=NormalBackground) const
Retrieve the requested background brush.
Definition: kcolorscheme.cpp:454
Sixth color; for example, errors, untrusted content, deletions, etc.
Definition: kcolorscheme.h:234
Fifth color; corresponds to visited links.
Definition: kcolorscheme.h:168
Fourth color; corresponds to (unvisited) links.
Definition: kcolorscheme.h:160
ShadeRole
This enumeration describes the color shade being selected from the given set.
Definition: kcolorscheme.h:275
Third color; for example, items which are new, active, requesting attention, etc. ...
Definition: kcolorscheme.h:151
Color used to draw decorations for items which have input focus.
Definition: kcolorscheme.h:259
QColor tint(const QColor &base, const QColor &color, qreal amount=0.3)
Create a new color by tinting one color with another.
Definition: kcolorutils.cpp:87
Third color; for example items which are new, active, requesting attention, etc.
Definition: kcolorscheme.h:215
Eigth color; for example, additions, success messages, trusted content.
Definition: kcolorscheme.h:243
QColor mix(const QColor &c1, const QColor &c2, qreal bias=0.5)
Blend two colors into a new color by linear combination.
Definition: kcolorutils.cpp:110
Second color; for example, comments, items which are old, inactive or disabled.
Definition: kcolorscheme.h:210
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: kcolorscheme.cpp:537
QColor lighten(const QColor &, qreal amount=0.5, qreal chromaInverseGain=1.0)
Adjust the luma of a color by changing its distance from white.
Definition: kcolorutils.cpp:55
KSharedConfigPtr config()
KColorScheme(const KColorScheme &)
Construct a copy of another KColorScheme.
Definition: kcolorscheme.cpp:406
The dark color is in between mid() and shadow().
Definition: kcolorscheme.h:292
DecorationRole
This enumeration describes the decoration color being selected from the given set.
Definition: kcolorscheme.h:255
The midlight color is in between base() and light().
Definition: kcolorscheme.h:284
QBrush foreground(ForegroundRole=NormalText) const
Retrieve the requested foreground brush.
Definition: kcolorscheme.cpp:459
static qreal contrastF(const KSharedConfigPtr &config=KSharedConfigPtr())
Returns the contrast for borders as a floating point value.
Definition: kglobalsettings.cpp:366
Eigth color; for example, success messages, trusted content.
Definition: kcolorscheme.h:180
QColor shade(ShadeRole) const
Retrieve the requested shade color, using KColorScheme::background(KColorScheme::NormalBackground) as...
Definition: kcolorscheme.cpp:469
Alternate background; for example, for use in lists.
Definition: kcolorscheme.h:141
The shadow color is darker than light() or midlight() and contrasts the base color.
Definition: kcolorscheme.h:297
QColor shade(const QColor &, qreal lumaAmount, qreal chromaAmount=0.0)
Adjust the luma and chroma components of a color.
Definition: kcolorutils.cpp:71
KColorScheme & operator=(const KColorScheme &)
Standard assignment operator.
Definition: kcolorscheme.cpp:410
ForegroundRole
This enumeration describes the foreground color being selected from the given set.
Definition: kcolorscheme.h:199
Sixth color; for example, errors, untrusted content, etc.
Definition: kcolorscheme.h:172
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: kcolorscheme.cpp:530
BackgroundRole
This enumeration describes the background color being selected from the given set.
Definition: kcolorscheme.h:130
QBrush decoration(DecorationRole) const
Retrieve the requested decoration brush.
Definition: kcolorscheme.cpp:464
ColorSet
This enumeration describes the color set for which a color is being selected.
Definition: kcolorscheme.h:81
QBrush brush(QPalette::ColorGroup) const
Retrieve the brush for the specified widget state.
Definition: kcolorscheme.cpp:627
KStatefulBrush & operator=(const KStatefulBrush &)
Standard assignment operator.
Definition: kcolorscheme.cpp:619
Seventh color; for example, warnings, secure/encrypted content.
Definition: kcolorscheme.h:238
T readEntry(const QString &key, const T &aDefault) const
Seventh color; for example, warnings, secure/encrypted content.
Definition: kcolorscheme.h:176
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.