KDEUI
KStyle::ColorMode Class Reference
[KStyle option representation]
A representation for colors for use as a widget layout property. More...
#include <kstyle.h>
Public Types | |
| enum | Mode { PaletteEntryMode, BWAutoContrastMode = 0x8000000 } |
Public Member Functions | |
| QColor | color (const QPalette &palette) |
| ColorMode (int encoded) | |
| ColorMode (Mode _mode, QPalette::ColorRole _role) | |
| ColorMode (QPalette::ColorRole _role) | |
| operator int () const | |
Detailed Description
A representation for colors for use as a widget layout property.
This marshals to and from integers.
Definition at line 190 of file kstyle.h.
Member Enumeration Documentation
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.
Constructor & Destructor Documentation
| KStyle::ColorMode::ColorMode | ( | QPalette::ColorRole | _role | ) |
Constructor, using a the given palette role _role and a default mode.
Definition at line 4397 of file kstyle.cpp.
| KStyle::ColorMode::ColorMode | ( | Mode | _mode, | |
| QPalette::ColorRole | _role | |||
| ) |
Constructor with explicit color mode and palette roles.
Definition at line 4402 of file kstyle.cpp.
| KStyle::ColorMode::ColorMode | ( | int | encoded | ) |
Decode from an int.
Definition at line 4412 of file kstyle.cpp.
Member Function Documentation
| 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 4418 of file kstyle.cpp.
| KStyle::ColorMode::operator int | ( | ) | const |
Represent as an int to store as a property.
Definition at line 4407 of file kstyle.cpp.
The documentation for this class was generated from the following files:
KDE 4.3 API Reference