KDEUI
#include <kstyle.h>
Public Types | |
enum | Mode { PaletteEntryMode , BWAutoContrastMode = 0x8000000 } |
Public Member Functions | |
ColorMode (int encoded) | |
ColorMode (Mode _mode, QPalette::ColorRole _role) | |
ColorMode (QPalette::ColorRole _role) | |
QColor | color (const QPalette &palette) |
operator int () const | |
Detailed Description
A representation for colors for use as a widget layout property.
This marshals to and from integers.
Member Enumeration Documentation
◆ Mode
KStyle understands two kinds of colors:
- Palette entries. This means the item must be painted with a specific color role from the palette.
- Auto-selected black or white, dependent on the brightness of a certain color role from the palette.
Enumerator | |
---|---|
PaletteEntryMode | |
BWAutoContrastMode |
Constructor & Destructor Documentation
◆ ColorMode() [1/3]
KStyle::ColorMode::ColorMode | ( | QPalette::ColorRole | _role | ) |
Constructor, using a the given palette role _role
and a default mode.
Definition at line 4432 of file kstyle.cpp.
◆ ColorMode() [2/3]
KStyle::ColorMode::ColorMode | ( | Mode | _mode, |
QPalette::ColorRole | _role | ||
) |
Constructor with explicit color mode and palette roles.
Definition at line 4437 of file kstyle.cpp.
◆ ColorMode() [3/3]
KStyle::ColorMode::ColorMode | ( | int | encoded | ) |
Decode from an int.
Definition at line 4447 of file kstyle.cpp.
Member Function Documentation
◆ color()
QColor KStyle::ColorMode::color | ( | const QPalette & | palette | ) |
Return the color corresponding to our role from the palette, automatically compensating for the contrast mode.
Definition at line 4453 of file kstyle.cpp.
◆ operator int()
KStyle::ColorMode::operator int | ( | ) | const |
Represent as an int to store as a property.
Definition at line 4442 of file kstyle.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.